mirror of https://github.com/openclaw/openclaw.git
Runner: wire explicit Anthropic service tiers
This commit is contained in:
parent
2bcef84052
commit
5c7a640f8d
|
|
@ -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}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue