Repository navigation
fix(config): support QWEN_CODE_API_TIMEOUT_MS across OAuth and non-OAuth paths #3629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,6 +247,24 @@ export function resolveModelConfig( | |
| sources, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] The timeout env override is only applied in the non-OAuth path because Please move this override into shared generation-config resolution used by both paths, preserving — gpt-5.5 via Qwen Code /review |
||
| ); | ||
|
|
||
| // ---- Env override: QWEN_CODE_API_TIMEOUT_MS ---- | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] This override is applied only after the Please apply the same env-timeout merge in — gpt-5.5 via Qwen Code /review |
||
| // Precedence: modelProvider > env > settings > default (CLI doesn't set timeout) | ||
| const modelProviderSetTimeout = | ||
| modelProvider?.generationConfig?.timeout !== undefined; | ||
| if (!modelProviderSetTimeout) { | ||
| const envTimeout = env['QWEN_CODE_API_TIMEOUT_MS']; | ||
| if (envTimeout !== undefined) { | ||
| const parsed = Number(envTimeout); | ||
| if (Number.isFinite(parsed) && parsed > 0) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Nice to have] Use |
||
| generationConfig.timeout = parsed; | ||
| sources['timeout'] = { | ||
| kind: 'env', | ||
| envKey: 'QWEN_CODE_API_TIMEOUT_MS', | ||
| }; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Build final config | ||
| const config: ContentGeneratorConfig = { | ||
| authType, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] Add a test case to verify that
QWEN_CODE_API_TIMEOUT_MScorrectly overrides settings whenauthTypeisAuthType.QWEN_OAUTH. This would have helped catch the missing support in the implementation.\n\n_— Gemini CLI /review_