mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 09:21:55 +00:00
Runner: wire explicit Anthropic service tiers
This commit is contained in:
@@ -6,10 +6,12 @@ import type { OpenClawConfig } from "../../config/config.js";
|
||||
import {
|
||||
createAnthropicBetaHeadersWrapper,
|
||||
createAnthropicFastModeWrapper,
|
||||
createAnthropicServiceTierWrapper,
|
||||
createAnthropicToolPayloadCompatibilityWrapper,
|
||||
createBedrockNoCacheWrapper,
|
||||
isAnthropicBedrockModel,
|
||||
resolveAnthropicFastMode,
|
||||
resolveAnthropicServiceTier,
|
||||
resolveAnthropicBetas,
|
||||
resolveCacheRetention,
|
||||
} from "./anthropic-stream-wrappers.js";
|
||||
@@ -447,6 +449,12 @@ export function applyExtraParamsToAgent(
|
||||
agent.streamFn = createAnthropicFastModeWrapper(agent.streamFn, anthropicFastMode);
|
||||
}
|
||||
|
||||
const anthropicServiceTier = resolveAnthropicServiceTier(merged);
|
||||
if (anthropicServiceTier) {
|
||||
log.debug(`applying Anthropic service_tier=${anthropicServiceTier} for ${provider}/${modelId}`);
|
||||
agent.streamFn = createAnthropicServiceTierWrapper(agent.streamFn, anthropicServiceTier);
|
||||
}
|
||||
|
||||
const openAIFastMode = resolveOpenAIFastMode(merged);
|
||||
if (openAIFastMode) {
|
||||
log.debug(`applying OpenAI fast mode for ${provider}/${modelId}`);
|
||||
|
||||
Reference in New Issue
Block a user