I claim we can know the secret within 9 guesses. For convenience I'm going to assume we are guessing a string of 4 letters chosen from {A, B, C, D, E, F}. Also, sometimes the remaining possibilities is low and I omit the details.

Guess AAAA BBBB CCCC DDDD. Your next guess is going to be either EEEE or of the form XXYY. Here, eg. [AAB] denotes that we know there is two A's, one B, no C's, and no D's in the final answer. Let's say +N to mean that we need at most N additional guesses.

When we know there is say, exactly one A and exactly one B, then guessing AABB has 4 states where you get result 0, 4 states where you get result 1, and 4 states where you get result 2, all of which are easy to find ways to distinguish within 2 additional guesses. This is what I mean by "place AB in +3".

[AAAB]: 4 possibilities = +2.

[AAA]: Guess EEEE, then it becomes like [AAAB], so +3.

[AABB]: 6 possibilities = +3.

[AABC]: Guess BBCC, +3.

[AAB]: Guess AABB, +4.

[AA]: Guess EEEE. Now it's like [AABB] or [AABC] which are +3, so answer +4.

[ABCD]: Place AB in +3, now distinguish C and D in +1, answer +4.

[ABC]: Place AB in +3, now find C in +1 and distinguish E/F in +1, so answer +5.

[AB]: Place AB in +3. Now from the remaining places it's the four possibilities EE EF FE FF, so answer +5.

[A]: Guess EEEE. It's either like [AAAB] or [AABC], so answer +4.

[]: Guess EEEE. It's either like [EEEE] (+0), [EEEF] (+2), [EEFF] (+3), so answer +4.