mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-13 10:43:43 +03:00
fix(sse): restores CC-relay context1m/redact-thinking test coverage
Rebasing onto release/v3.8.50's new tip (35405be60, an unrelated agentrouter protocol-inference commit) silently flipped two assertions this branch's own earlier fix (687fbda62) depends on, in the same test files that commit touched for other reasons: - executor-default-base.test.ts: calls[0] (a bare CC-relay with no requestDefaults) expected redact-thinking-beta absent; flipped to present. calls[1] (context1m+redactThinking requestDefaults) expected the context-1m beta preserved; flipped to absent. - provider-request-failure-pipeline.test.ts: expected Accept: text/event-stream and the context-1m beta present for a relay with explicit requestDefaults; flipped to application/json and absent.35405be60did not touch open-sse/executors/base.ts at all, so these were test-only edits made without visibility into the still-unmerged CC-relay header-preservation fix on this branch — they quietly matched the assertions back to the pre-fix (buggy) behavior instead. Restores the original, validated expectations; all three interdependent test files (executor-default-base, cc-compatible-provider, provider-request-failure-pipeline) verified passing together again.
This commit is contained in:
committed by
diegosouzapw
parent
c4526c0f7a
commit
552ef0e574
@@ -669,9 +669,9 @@ test("DefaultExecutor.execute uses CC-compatible connection defaults to append 1
|
||||
assert.equal(calls[0].headers["anthropic-beta"].includes(CONTEXT_1M_BETA_HEADER), false);
|
||||
assert.equal(
|
||||
calls[0].headers["anthropic-beta"].includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),
|
||||
true
|
||||
false
|
||||
);
|
||||
assert.equal(calls[1].headers["anthropic-beta"].includes(CONTEXT_1M_BETA_HEADER), false);
|
||||
assert.equal(calls[1].headers["anthropic-beta"].includes(CONTEXT_1M_BETA_HEADER), true);
|
||||
assert.equal(
|
||||
calls[1].headers["anthropic-beta"].includes(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA),
|
||||
true
|
||||
|
||||
@@ -485,11 +485,8 @@ test("CC-compatible providerRequest log keeps request beta headers and summarize
|
||||
assert.ok(providerRequest, "providerRequest must be present on CC-compatible success");
|
||||
assert.equal(providerRequest.headers["cf-ray"], undefined);
|
||||
assert.equal(providerRequest.headers.server, undefined);
|
||||
assert.equal(providerRequest.headers.Accept, "application/json");
|
||||
assert.doesNotMatch(
|
||||
providerRequest.headers["anthropic-beta"],
|
||||
new RegExp(CONTEXT_1M_BETA_HEADER)
|
||||
);
|
||||
assert.equal(providerRequest.headers.Accept, "text/event-stream");
|
||||
assert.match(providerRequest.headers["anthropic-beta"], new RegExp(CONTEXT_1M_BETA_HEADER));
|
||||
assert.match(
|
||||
providerRequest.headers["anthropic-beta"],
|
||||
new RegExp(CLAUDE_CODE_COMPATIBLE_REDACT_THINKING_BETA)
|
||||
|
||||
Reference in New Issue
Block a user