Update LLM providers and constants (#1937)

- Updated constants in app/lib/.server/llm/constants.ts
- Modified stream-text functionality in app/lib/.server/llm/stream-text.ts
- Updated Anthropic provider in app/lib/modules/llm/providers/anthropic.ts
- Modified GitHub provider in app/lib/modules/llm/providers/github.ts
- Updated Google provider in app/lib/modules/llm/providers/google.ts
- Modified OpenAI provider in app/lib/modules/llm/providers/openai.ts
- Updated LLM types in app/lib/modules/llm/types.ts
- Modified API route in app/routes/api.llmcall.ts
This commit is contained in:
Stijnus
2025-08-29 22:55:02 +02:00
committed by GitHub
parent b5d9055851
commit 38c13494c2
8 changed files with 251 additions and 26 deletions

View File

@@ -22,6 +22,7 @@ export default class AnthropicProvider extends BaseProvider {
label: 'Claude 3.5 Sonnet',
provider: 'Anthropic',
maxTokenAllowed: 200000,
maxCompletionTokens: 128000,
},
// Claude 3 Haiku: 200k context, fastest and most cost-effective
@@ -30,6 +31,7 @@ export default class AnthropicProvider extends BaseProvider {
label: 'Claude 3 Haiku',
provider: 'Anthropic',
maxTokenAllowed: 200000,
maxCompletionTokens: 128000,
},
];
@@ -84,6 +86,7 @@ export default class AnthropicProvider extends BaseProvider {
label: `${m.display_name} (${Math.floor(contextWindow / 1000)}k context)`,
provider: this.name,
maxTokenAllowed: contextWindow,
maxCompletionTokens: 128000, // Claude models support up to 128k completion tokens
};
});
}