mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
feat: increase max token limit for Claude model claude-3-7-sonnet-20250219
- Added logging for dynamic max tokens based on model details. - Increased max token limit for Claude model from 8000 to 128000. - Included beta header for Anthropik API call.
This commit is contained in:
parent
dac37b4344
commit
208ba2a54b
@ -108,6 +108,9 @@ export async function streamText(props: {
|
||||
}
|
||||
|
||||
const dynamicMaxTokens = modelDetails && modelDetails.maxTokenAllowed ? modelDetails.maxTokenAllowed : MAX_TOKENS;
|
||||
logger.info(
|
||||
`Max tokens for model ${modelDetails.name} is ${dynamicMaxTokens} based on ${modelDetails.maxTokenAllowed} or ${MAX_TOKENS}`,
|
||||
);
|
||||
|
||||
let systemPrompt =
|
||||
PromptLibrary.getPropmtFromLibrary(promptId || 'default', {
|
||||
|
@ -17,7 +17,7 @@ export default class AnthropicProvider extends BaseProvider {
|
||||
name: 'claude-3-7-sonnet-20250219',
|
||||
label: 'Claude 3.7 Sonnet',
|
||||
provider: 'Anthropic',
|
||||
maxTokenAllowed: 8000,
|
||||
maxTokenAllowed: 128000,
|
||||
},
|
||||
{
|
||||
name: 'claude-3-5-sonnet-latest',
|
||||
@ -95,6 +95,7 @@ export default class AnthropicProvider extends BaseProvider {
|
||||
});
|
||||
const anthropic = createAnthropic({
|
||||
apiKey,
|
||||
headers: { 'anthropic-beta': 'output-128k-2025-02-19' },
|
||||
});
|
||||
|
||||
return anthropic(model);
|
||||
|
Loading…
Reference in New Issue
Block a user