We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8556b61 commit e59af53Copy full SHA for e59af53
1 file changed
src/shared/api.ts
@@ -135,7 +135,7 @@ export const getModelMaxOutputTokens = ({
135
// Models that expose a configurable max-output slider (e.g. Z.ai GLM) honor the user's
136
// explicit override instead of the default 20% context-window clamp, capped at the model's
137
// own ceiling. This keeps the runtime budget consistent with the value sent to the provider.
138
- if (model.supportsMaxTokens && settings?.modelMaxTokens) {
+ if (model.supportsMaxTokens && settings?.modelMaxTokens != null && settings.modelMaxTokens > 0) {
139
return model.maxTokens ? Math.min(settings.modelMaxTokens, model.maxTokens) : settings.modelMaxTokens
140
}
141
0 commit comments