docs: clarify Anthropic context1m long-context requirements

This commit is contained in:
Agent
2026-03-01 22:35:12 +00:00
parent a374325fc2
commit 063c4f00ea
7 changed files with 91 additions and 1 deletions

View File

@@ -763,6 +763,19 @@ describe("applyExtraParamsToAgent", () => {
});
});
it("does not add Anthropic 1M beta header when context1m is not enabled", () => {
const cfg = buildAnthropicModelConfig("anthropic/claude-opus-4-6", {
temperature: 0.2,
});
const headers = runAnthropicHeaderCase({
cfg,
modelId: "claude-opus-4-6",
options: { headers: { "X-Custom": "1" } },
});
expect(headers).toEqual({ "X-Custom": "1" });
});
it("skips context1m beta for OAuth tokens but preserves OAuth-required betas", () => {
const calls: Array<SimpleStreamOptions | undefined> = [];
const baseStreamFn: StreamFn = (_model, _context, options) => {