-
Notifications
You must be signed in to change notification settings - Fork 2k
model.generationConfig won't work when update credentials using /auth -> openai #1506
Copy link
Copy link
Closed
Labels
status/needs-triageIssue needs to be triaged and labeledIssue needs to be triaged and labeledtype/bugSomething isn't working as expectedSomething isn't working as expected
Description
What happened?
- Because the
modelProviderstakes precedence overmodelinsettings.json, after updating credentials using/auth->openai, the manual input credentials take effect but themodel.generationConfigdoesn't. - If
security.auth.selectedTypeandmodel.namecan not hit a provider's model, qwen-code will always auto select the first available provider's model, ignoring the settings. - With a proper API key AND without a model set in env variables, say only
GEMINI_API_KEYbut noGEMINI_MODEL, qwen-code still infers the authType asgeminiand complains about noGEMINI_MODEL, this should be improved.
What did you expect to happen?
- Merge
model.generationConfigwhen update credentials manually. - Refine the fallback strategy, do not enforce to use models in providers.
- Auto select inferred authType should only be happening when all required env variables present.
What's next?
#1510 mainly addressed authType/model fallback issues and ensures model.generationConfig being effective when selecting a non-provider model.
The root cause of the unexpected behaviours above is that we treated model.apiKey,model.baseUrl,model.name as programmatic override via '/auth' AND at the same time some kind of conditionally 'fallback' that may take precedence at startup.
This ambiguity and confusion has led to some parsing problems.
One feasible solution is to parse out the non-provider model configurations in settings and environment together, and use them as /model options to provide a stable and consistent model switching function.
Client information
Client Information
CLI Version 0.7.0Login information
No response
Anything else we need to know?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status/needs-triageIssue needs to be triaged and labeledIssue needs to be triaged and labeledtype/bugSomething isn't working as expectedSomething isn't working as expected