feat: 移除反蒸馏代码

This commit is contained in:
claude-code-best
2026-04-02 22:56:23 +08:00
parent 5ee49fd106
commit c252294dd7
6 changed files with 14 additions and 40 deletions

View File

@@ -15,7 +15,6 @@ import {
PROMPT_CACHING_SCOPE_BETA_HEADER,
REDACT_THINKING_BETA_HEADER,
STRUCTURED_OUTPUTS_BETA_HEADER,
SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER,
TOKEN_EFFICIENT_TOOLS_BETA_HEADER,
TOOL_SEARCH_BETA_HEADER_1P,
TOOL_SEARCH_BETA_HEADER_3P,
@@ -276,27 +275,6 @@ export const getAllModelBetas = memoize((model: string): string[] => {
betaHeaders.push(REDACT_THINKING_BETA_HEADER)
}
// POC: server-side connector-text summarization (anti-distillation). The
// API buffers assistant text between tool calls, summarizes it, and returns
// the summary with a signature so the original can be restored on subsequent
// turns — same mechanism as thinking blocks. Ant-only while we measure
// TTFT/TTLT/capacity; betas already flow to tengu_api_success for splitting.
// Backend independently requires Capability.ANTHROPIC_INTERNAL_RESEARCH.
//
// USE_CONNECTOR_TEXT_SUMMARIZATION is tri-state: =1 forces on (opt-in even
// if GB is off), =0 forces off (opt-out of a GB rollout you were bucketed
// into), unset defers to GB.
if (
SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER &&
process.env.USER_TYPE === 'ant' &&
includeFirstPartyOnlyBetas &&
!isEnvDefinedFalsy(process.env.USE_CONNECTOR_TEXT_SUMMARIZATION) &&
(isEnvTruthy(process.env.USE_CONNECTOR_TEXT_SUMMARIZATION) ||
getFeatureValue_CACHED_MAY_BE_STALE('tengu_slate_prism', false))
) {
betaHeaders.push(SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER)
}
// Add context management beta for tool clearing (ant opt-in) or thinking preservation
const antOptedIntoToolClearing =
isEnvTruthy(process.env.USE_API_CONTEXT_MANAGEMENT) &&

View File

@@ -1,7 +1,7 @@
/**
* Transforms SDK messages for streamlined output mode.
*
* Streamlined mode is a "distillation-resistant" output format that:
* Streamlined mode is a compact output format that:
* - Keeps text messages intact
* - Summarizes tool calls with cumulative counts (resets when text appears)
* - Omits thinking content