File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export async function getOpenRouterModels(options?: ApiHandlerOptions): Promise<
7272 typeof cacheWritesPrice !== "undefined" && typeof cacheReadsPrice !== "undefined"
7373
7474 const modelInfo : ModelInfo = {
75- maxTokens : rawModel . top_provider ?. max_completion_tokens ,
75+ maxTokens : 0 ,
7676 contextWindow : rawModel . context_length ,
7777 supportsImages : rawModel . architecture ?. modality ?. includes ( "image" ) ,
7878 supportsPromptCache,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
106106 // https://openrouter.ai/docs/transforms
107107 const completionParams : OpenRouterChatCompletionParams = {
108108 model : modelId ,
109- max_tokens : maxTokens ,
109+ ... ( maxTokens && maxTokens > 0 && { max_tokens : maxTokens } ) ,
110110 temperature,
111111 thinking, // OpenRouter is temporarily supporting this.
112112 top_p : topP ,
You can’t perform that action at this time.
0 commit comments