diff options
| author | ideallove <[email protected]> | 2026-01-29 11:28:15 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-28 21:28:15 -0600 |
| commit | 870c38a6aa61e821f90d7d17b100db82c07188fa (patch) | |
| tree | a4d52e0487989e53af6a681a36373d10eb6e8869 | |
| parent | b937fe94500dc521366e0ab5d441731c8e90b375 (diff) | |
| download | opencode-870c38a6aa61e821f90d7d17b100db82c07188fa.tar.gz opencode-870c38a6aa61e821f90d7d17b100db82c07188fa.zip | |
fix: maxOutputTokens was accidentally hardcoded to undefined (#10995)
| -rw-r--r-- | packages/opencode/src/session/llm.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/opencode/src/session/llm.ts b/packages/opencode/src/session/llm.ts index d65130803..033e4862c 100644 --- a/packages/opencode/src/session/llm.ts +++ b/packages/opencode/src/session/llm.ts @@ -150,7 +150,14 @@ export namespace LLM { }, ) - const maxOutputTokens = isCodex ? undefined : undefined + const maxOutputTokens = isCodex + ? undefined + : ProviderTransform.maxOutputTokens( + input.model.api.npm, + params.options, + input.model.limit.output, + OUTPUT_TOKEN_MAX, + ) log.info("max_output_tokens", { tokens: ProviderTransform.maxOutputTokens( input.model.api.npm, |
