Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compress-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const BILI_ACP_READONLY_TOOLS_RESPONSES = ACP_READONLY_TOOLS_RESPONSES.ma
// reaches the harness at all (the proxy tool loop executes it
// server-side), so the exempt note tells the model to ignore the harness's
// only-run_code rule for exactly these tools.
const RUN_CODE_TOOL_NAME = "run_code";
export const RUN_CODE_TOOL_NAME = "run_code";

/** Calling-convention note mode for one request (internal to this module —
* inject.ts/plugin.ts pick the mode via ptcNoteMode()/the literal "binding"). */
Expand Down
3 changes: 2 additions & 1 deletion src/server/lane-decisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import { biliToolsDeclaredOnWire } from "../session-self-heal.js";
import { extractBillingAttributionBlock } from "../preflight.js";
import { ANONYMOUS, hostProfileFor, type HostProfile } from "../host-profiles.js";
import { RUN_CODE_TOOL_NAME } from "../compress-tool.js";

type LaneProtocol = "anthropic" | "openai" | "google" | "responses";

Expand Down Expand Up @@ -227,7 +228,7 @@ export function resolveLaneDecisions(input: LaneDecisionInput): LaneDecisions {
// surface on every dsh PTC session until the window hit 100%).
const compressReachable = !input.pluginMode
|| declaredTools.has("compress")
|| declaredTools.has("run_code")
|| declaredTools.has(RUN_CODE_TOOL_NAME)
|| !profile.toolsHostScopedByDefault;
const compressSurfaceOn = input.shouldInject && compressReachable;
const billingBlockObserved = extractBillingAttributionBlock(systemOf(input.parsed)) !== undefined;
Expand Down
Loading