fix: separate Anthropic output and context limits
Direct Anthropic connections reused the configured context window as max_tokens, which could impose an unintended output value or send a provider-invalid request. Anthropic connections now expose an independent per-response maximum output setting, defaulting to 32K for the protocol-required field, while OpenAI direct requests remain without an added output token cap and direct tool rounds remain unmetered. Release note: Anthropic 直连模型现在可单独配置单次最大输出,不再复用上下文窗口;OpenAI 直连请求和工具调用轮次不增加额外配额。
This commit is contained in:
@@ -283,6 +283,7 @@ describe('RuntimeSettingsStore', () => {
|
||||
authentication: 'none',
|
||||
supportsImageInput: false,
|
||||
contextWindowTokens: 256_000,
|
||||
maximumOutputTokens: 48_000,
|
||||
imageGenerationQuality: 'auto',
|
||||
apiKey: { action: 'keep' }
|
||||
}
|
||||
@@ -302,7 +303,8 @@ describe('RuntimeSettingsStore', () => {
|
||||
modelProfiles: [
|
||||
{
|
||||
id: profileId,
|
||||
contextWindowTokens: 256_000
|
||||
contextWindowTokens: 256_000,
|
||||
maximumOutputTokens: 48_000
|
||||
}
|
||||
],
|
||||
contextCompression: {
|
||||
@@ -316,7 +318,8 @@ describe('RuntimeSettingsStore', () => {
|
||||
modelProfiles: [
|
||||
{
|
||||
id: profileId,
|
||||
contextWindowTokens: 256_000
|
||||
contextWindowTokens: 256_000,
|
||||
maximumOutputTokens: 48_000
|
||||
}
|
||||
],
|
||||
contextCompression: {
|
||||
|
||||
Reference in New Issue
Block a user