mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 08:12:43 +00:00
docs: clarify Anthropic context1m long-context requirements
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user