mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
fix(test): detect ignored Anthropic prefix-binding predicates (#158289)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
parent
f13c49ca20
commit
fe674bbe5b
1 changed files with 3 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ describe("loadAnthropicTransportStream", () => {
|
|||
describe("loadAnthropicProviderInternals", () => {
|
||||
it("uses the candidate prefix-binding capability when exported", async () => {
|
||||
const stream = vi.fn<AnthropicStreamFn>();
|
||||
const binds = vi.fn(() => true);
|
||||
const binds = ({ id }: { id?: string }) => id === "prefix-bound";
|
||||
|
||||
const loaded = await loadAnthropicProviderInternals(async () => ({
|
||||
streamAnthropic: stream,
|
||||
|
|
@ -56,7 +56,8 @@ describe("loadAnthropicProviderInternals", () => {
|
|||
}));
|
||||
|
||||
expect(loaded.streamAnthropic).toBe(stream);
|
||||
expect(loaded.bindsClaudeThinkingPrefix({ id: "claude-fable-5-1" })).toBe(true);
|
||||
expect(loaded.bindsClaudeThinkingPrefix({ id: "prefix-bound" })).toBe(true);
|
||||
expect(loaded.bindsClaudeThinkingPrefix({ id: "ordinary-model" })).toBe(false);
|
||||
});
|
||||
|
||||
it("treats a missing prefix-binding export as an absent frozen capability", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue