This is an attempt to prove that there is only one possible setup, namely the one that Beastly Gerbil describes in their answer.
First, a couple of observations:
We must have guessed all colors on the first try, i.e. we got four (white or black) pegs as our first score. This must be true, otherwise we would have to guess a color on the second try. That is a contradiction to Bob's confidence.
We used between two and four colors on the first try. If we used only one color, we would have solved the code, based on the first observation. Since the code is of length four, we can use at most four colors.
The order of the colors does not matter, neither does the order of the scoring pegs.
The possible scores of the first try are WWWW, BWWW and BBWW. BBBW is not possible, it is an invalid state. BBBB would mean that we solved the code already.
That leaves us with
twelve different configurations (there are two possible ways to use two colors). That's few enough to check each for possible solutions of the code. If there's only one, the configuration is a solution to the puzzle.
Two colors AABB:
score WWWW: all colors are in the wrong position. The only way to solve this is BBAA. This configuration is a solution of the puzzle, and identical to the one that Beastly Gerbil found.
score BWWW: this is an invalid configuration. No matter which color we lock in place, we can not switch the other three colors around without one ending up in the same spot as before, which is a contradiction to the initial score of only one color being in the right spot.
score BBWW: BABA and ABAB are possible solutions.
Two colors AAAB (thanks @Joel Rondeau)
score WWWW: this is an invalid configuration. There is no way to switch all the colors without two of the As landing on a spot that was previously colored A. This is a contradiction to the initial score.
score BWWW: this is an invalid configuration. There is no way to lock one color and switch the remaining three without at least one of the As landing on a spot that was previously colored A. This is a contradiction to the initial score.
score BBWW: AABA and ABAA are possible solutions.
Three colors ABCC:
score WWWW: CCAB and CCBA are possible solutions.
score BWWW: CABC and BCAC are possible solutions.
score BBWW: CBCA and ACBC are possible solutions.
Four colors ABCD:
score WWWW: DCBA and BADC are possible solutions.
score BWWW: ACDB and CBDA are possible solutions.
score BBWW: ABDC and BACD are possible solutions.
So as a result
there is only one possible configuration. Two colors, AABB, and four white pegs as first score.