mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: set horizon-beta model max tokens to 32k for OpenRouter (#6577)
Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
69685c779d
commit
19c157e51c
2 changed files with 28 additions and 0 deletions
|
|
@ -276,6 +276,29 @@ describe("OpenRouter API", () => {
|
|||
expect(result.contextWindow).toBe(128000)
|
||||
})
|
||||
|
||||
it("sets horizon-beta model to 32k max tokens", () => {
|
||||
const mockModel = {
|
||||
name: "Horizon Beta",
|
||||
description: "Test model",
|
||||
context_length: 128000,
|
||||
max_completion_tokens: 128000,
|
||||
pricing: {
|
||||
prompt: "0.000003",
|
||||
completion: "0.000015",
|
||||
},
|
||||
}
|
||||
|
||||
const result = parseOpenRouterModel({
|
||||
id: "openrouter/horizon-beta",
|
||||
model: mockModel,
|
||||
modality: "text",
|
||||
maxTokens: 128000,
|
||||
})
|
||||
|
||||
expect(result.maxTokens).toBe(32768)
|
||||
expect(result.contextWindow).toBe(128000)
|
||||
})
|
||||
|
||||
it("does not override max tokens for other models", () => {
|
||||
const mockModel = {
|
||||
name: "Other Model",
|
||||
|
|
|
|||
|
|
@ -237,5 +237,10 @@ export const parseOpenRouterModel = ({
|
|||
modelInfo.maxTokens = 32768
|
||||
}
|
||||
|
||||
// Set horizon-beta model to 32k max tokens
|
||||
if (id === "openrouter/horizon-beta") {
|
||||
modelInfo.maxTokens = 32768
|
||||
}
|
||||
|
||||
return modelInfo
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue