Skip to content

Commit 097c588

Browse files
VarunChopra11steipete
authored andcommitted
transcript-policy: use named Set for anthropic signature-excluded providers
1 parent 2bf53c2 commit 097c588

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/agents/transcript-policy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const OPENAI_MODEL_APIS = new Set([
3939
]);
4040
const OPENAI_PROVIDERS = new Set(["openai", "openai-codex"]);
4141
const OPENAI_COMPAT_TURN_MERGE_EXCLUDED_PROVIDERS = new Set(["openrouter", "opencode"]);
42+
// Providers that use anthropic-messages API but cannot handle re-sent thinkingSignature blobs (#39798)
43+
const ANTHROPIC_API_SIGNATURE_EXCLUDED_PROVIDERS = new Set(["kimi-coding"]);
4244

4345
function isOpenAiApi(modelApi?: string | null): boolean {
4446
if (!modelApi) {
@@ -123,8 +125,7 @@ export function resolveTranscriptPolicy(params: {
123125
(!isOpenAi && sanitizeToolCallIds) || requiresOpenAiCompatibleToolIdSanitization,
124126
toolCallIdMode,
125127
repairToolUseResultPairing,
126-
// kimi-coding uses anthropic-messages API but cannot handle re-sent thinkingSignature blobs (#39798)
127-
preserveSignatures: isAnthropic && provider !== "kimi-coding",
128+
preserveSignatures: isAnthropic && !ANTHROPIC_API_SIGNATURE_EXCLUDED_PROVIDERS.has(provider),
128129
sanitizeThoughtSignatures: isOpenAi ? undefined : sanitizeThoughtSignatures,
129130
sanitizeThinkingSignatures: false,
130131
dropThinkingBlocks,

0 commit comments

Comments
 (0)