@owlmeans/llm 0.1.18-rc.47 → 0.1.18-rc.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/llm/SKILL.md +9 -5
- package/build/plugins/consts.d.ts +9 -8
- package/build/plugins/consts.d.ts.map +1 -1
- package/build/plugins/consts.js +14 -8
- package/build/plugins/consts.js.map +1 -1
- package/package.json +1 -1
- package/src/plugins/consts.ts +14 -8
- package/tests/anthropic-families.spec.ts +13 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ abstraction that resolves models from an inheritable policy.
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
bun add @owlmeans/llm@^0.1.18-rc.
|
|
23
|
+
bun add @owlmeans/llm@^0.1.18-rc.48 @owlmeans/llm-common@^0.1.18-rc.39
|
|
24
24
|
bun add @langchain/core @langchain/openai @langchain/anthropic # peer dependencies
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -186,7 +186,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
186
186
|
your project's skill store (`.agents/skills/`):
|
|
187
187
|
|
|
188
188
|
```sh
|
|
189
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
189
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.53
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/llm",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.48",
|
|
5
|
+
"generatedAt": "2026-10-09T11:30:42.745Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/llm
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/llm": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/llm": "^0.1.18-rc.48"` in `dependencies` (plus the `@langchain/*` peers)
|
|
12
12
|
|
|
13
13
|
The inference runtime. Everything provider-specific is a **plugin**; the model itself only owns the
|
|
14
14
|
provider-independent parts (streaming discipline, retries, validation, observability). Serializable
|
|
@@ -270,15 +270,15 @@ bug: another provider's rung asked in the primary's `tool_choice` spelling is a
|
|
|
270
270
|
OpenAI `reasoning.effort`, Anthropic `output_config.effort` — and not `ExecutionEffort`, which is
|
|
271
271
|
this package's token-budget tier. Plugin tables are the authority (`OPENAI_EFFORT_SUPPORT` verified
|
|
272
272
|
2026-09-23 against developers.openai.com/api/docs/models/*; `ANTHROPIC_MODEL_SUPPORT` verified
|
|
273
|
-
2026-
|
|
274
|
-
build-with-claude/effort):
|
|
273
|
+
2026-10-08 against platform.claude.com/docs/en/models/{sonnet-5-5,opus-5-5,fable-5-1,haiku-5-5}/* and
|
|
274
|
+
build-with-claude/{effort,prompt-caching}):
|
|
275
275
|
|
|
276
276
|
| Model | Levels | Default |
|
|
277
277
|
|---|---|---|
|
|
278
278
|
| `gpt-6-sol`, `gpt-6-luna` | none, low, medium, high, xhigh, max | medium |
|
|
279
279
|
| `gpt-6-astra` | low … max (`none` is a 400) | medium |
|
|
280
280
|
| `gpt-5*` and older OpenAI | not sent — accepted sets vary per snapshot | — |
|
|
281
|
-
| Claude Opus 5.5 | low … max | medium |
|
|
281
|
+
| Claude Opus 5.5, Haiku 5.5 | low … max | medium |
|
|
282
282
|
| Claude Sonnet 5.5, Opus 5, Fable 5.1/5, Mythos 5.1/5, Opus 4.8/4.7, Sonnet 5 | low … max | high |
|
|
283
283
|
| Claude Mythos Preview, Opus 4.6, Sonnet 4.6 | low, medium, high, max (no xhigh) | high |
|
|
284
284
|
| Claude Opus 4.5 | low, medium, high | high |
|
|
@@ -297,10 +297,14 @@ lives — never an inline check on one id:
|
|
|
297
297
|
| Opus 5.5 | none: always thinks, nothing is sent, effort is the control | all | 400 | 512 |
|
|
298
298
|
| Fable 5.1, Mythos 5.1 | none | all | 400 | 512 |
|
|
299
299
|
| Fable 5, Mythos 5 | none | all | accepted | 512 |
|
|
300
|
-
| Opus 5 | `disabled` | low … high (`thinkingOffCeiling`) | accepted | 512 |
|
|
300
|
+
| Opus 5, Haiku 5.5 | `disabled` | low … high (`thinkingOffCeiling`) | accepted | 512 |
|
|
301
301
|
| Sonnet 5, Opus 4.8/4.7 | `disabled` | all | accepted | 1024 |
|
|
302
302
|
| Older models (Haiku 4.5, Sonnet 4.6, …) | none — they reason only when asked | per the effort table | accepted | 1024 |
|
|
303
303
|
|
|
304
|
+
Haiku 5.5 (`claude-haiku-5-5`, no dated snapshot) is a 5-family model: no `temperature`/`top_p`/`top_k`
|
|
305
|
+
(`NO_SAMPLING_PREFIXES` has `claude-haiku-5`), no assistant prefill, adaptive thinking on by default,
|
|
306
|
+
1M window and 128K output; Haiku 4.5 is unchanged and unlisted.
|
|
307
|
+
|
|
304
308
|
`anthropicSupportHelper.thinkingOffFor(config)` is the value `build` sends; `refine` carries it through `lc_kwargs` and
|
|
305
309
|
reads it back to keep the ceiling, so a climbed retry stops at `high` instead of answering 400. The
|
|
306
310
|
cache minimum is the default under a preset's own `cacheMinTokens`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { EffortSupport, AnthropicModelSupport } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Model families that REJECT the sampling parameters — Claude 4.7 and later, and the whole
|
|
4
|
-
* 5 family. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
5
|
-
* is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
4
|
+
* 5 family, Haiku 5.5 included. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
5
|
+
* any of them is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
6
6
|
* (`claude-sonnet-5-20260114`) is covered by its base id.
|
|
7
7
|
*
|
|
8
8
|
* This is the Anthropic counterpart of the OpenAI plugin's `RESPONSES_API_PREFIXES`: the
|
|
@@ -18,19 +18,20 @@ export declare enum ThinkingOff {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Per-family facts of the Anthropic models that take `output_config.effort`, first prefix
|
|
21
|
-
* match wins. From Anthropic's model pages (2026-
|
|
22
|
-
* 4.5, `xhigh` only on the first
|
|
23
|
-
* else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
24
|
-
* sent there — and takes forced tool use and every older thinking shape.
|
|
21
|
+
* match wins. From Anthropic's model pages (2026-10-08): `max` on every model below except Opus
|
|
22
|
+
* 4.5, `xhigh` only on the first twelve, `medium` the default on Opus 5.5 and Haiku 5.5 and `high`
|
|
23
|
+
* everywhere else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
24
|
+
* never sent there — and takes forced tool use and every older thinking shape.
|
|
25
25
|
*
|
|
26
|
-
* - **Thinking off.** Opus 5
|
|
26
|
+
* - **Thinking off.** Opus 5 and Haiku 5.5 accept `disabled` only at `high` or below. Sonnet 5.5 refuses
|
|
27
27
|
* `disabled` and takes `between_tools` instead, again only at `high` or below, with no other
|
|
28
28
|
* field beside it. Opus 5.5 and the Fable and Mythos 5 families always think: any off switch
|
|
29
29
|
* is a 400, so the request carries none.
|
|
30
30
|
* - **Forced tool use.** Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1 answer `tool_choice`
|
|
31
31
|
* `any`/`tool` with a 400; structured output asks them with `auto`, a prompt instruction naming
|
|
32
32
|
* the tool, and `strict` when the schema allows it.
|
|
33
|
-
* - **Cache minimum.** 512 tokens on the 5 family, 1024 on Sonnet 5 and Opus 4.8.
|
|
33
|
+
* - **Cache minimum.** 512 tokens on the 5 family (Haiku 5.5 included), 1024 on Sonnet 5 and Opus 4.8.
|
|
34
|
+
* - **Haiku 5.5** takes forced `tool_choice` (the reply is the call, with no thinking block before it).
|
|
34
35
|
*/
|
|
35
36
|
export declare const ANTHROPIC_MODEL_SUPPORT: ReadonlyArray<AnthropicModelSupport>;
|
|
36
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/plugins/consts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAGtE;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/plugins/consts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAGtE;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,UAShC,CAAA;AAED,oEAAoE;AACpE,oBAAY,WAAW;IACrB,QAAQ,aAAa;IACrB,wFAAwF;IACxF,YAAY,kBAAkB;CAC/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,qBAAqB,CAyCxE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,UAA+B,CAAA;AAElE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAcnF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAA;AAE9C,eAAO,MAAM,aAAa,WAAW,CAAA;AAErC;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAM3D,CAAA"}
|
package/build/plugins/consts.js
CHANGED
|
@@ -2,8 +2,8 @@ import { ModelEffort } from '@owlmeans/llm-common';
|
|
|
2
2
|
import { ALL_EFFORTS, NO_XHIGH, UP_TO_HIGH } from './consts.local.js';
|
|
3
3
|
/**
|
|
4
4
|
* Model families that REJECT the sampling parameters — Claude 4.7 and later, and the whole
|
|
5
|
-
* 5 family. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
6
|
-
* is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
5
|
+
* 5 family, Haiku 5.5 included. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
6
|
+
* any of them is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
7
7
|
* (`claude-sonnet-5-20260114`) is covered by its base id.
|
|
8
8
|
*
|
|
9
9
|
* This is the Anthropic counterpart of the OpenAI plugin's `RESPONSES_API_PREFIXES`: the
|
|
@@ -18,6 +18,7 @@ export const NO_SAMPLING_PREFIXES = [
|
|
|
18
18
|
'claude-opus-4-8',
|
|
19
19
|
'claude-opus-4-7',
|
|
20
20
|
'claude-sonnet-5',
|
|
21
|
+
'claude-haiku-5',
|
|
21
22
|
];
|
|
22
23
|
/** The `thinking.type` a model takes to do no up-front thinking. */
|
|
23
24
|
export var ThinkingOff;
|
|
@@ -28,19 +29,20 @@ export var ThinkingOff;
|
|
|
28
29
|
})(ThinkingOff || (ThinkingOff = {}));
|
|
29
30
|
/**
|
|
30
31
|
* Per-family facts of the Anthropic models that take `output_config.effort`, first prefix
|
|
31
|
-
* match wins. From Anthropic's model pages (2026-
|
|
32
|
-
* 4.5, `xhigh` only on the first
|
|
33
|
-
* else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
34
|
-
* sent there — and takes forced tool use and every older thinking shape.
|
|
32
|
+
* match wins. From Anthropic's model pages (2026-10-08): `max` on every model below except Opus
|
|
33
|
+
* 4.5, `xhigh` only on the first twelve, `medium` the default on Opus 5.5 and Haiku 5.5 and `high`
|
|
34
|
+
* everywhere else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
35
|
+
* never sent there — and takes forced tool use and every older thinking shape.
|
|
35
36
|
*
|
|
36
|
-
* - **Thinking off.** Opus 5
|
|
37
|
+
* - **Thinking off.** Opus 5 and Haiku 5.5 accept `disabled` only at `high` or below. Sonnet 5.5 refuses
|
|
37
38
|
* `disabled` and takes `between_tools` instead, again only at `high` or below, with no other
|
|
38
39
|
* field beside it. Opus 5.5 and the Fable and Mythos 5 families always think: any off switch
|
|
39
40
|
* is a 400, so the request carries none.
|
|
40
41
|
* - **Forced tool use.** Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1 answer `tool_choice`
|
|
41
42
|
* `any`/`tool` with a 400; structured output asks them with `auto`, a prompt instruction naming
|
|
42
43
|
* the tool, and `strict` when the schema allows it.
|
|
43
|
-
* - **Cache minimum.** 512 tokens on the 5 family, 1024 on Sonnet 5 and Opus 4.8.
|
|
44
|
+
* - **Cache minimum.** 512 tokens on the 5 family (Haiku 5.5 included), 1024 on Sonnet 5 and Opus 4.8.
|
|
45
|
+
* - **Haiku 5.5** takes forced `tool_choice` (the reply is the call, with no thinking block before it).
|
|
44
46
|
*/
|
|
45
47
|
export const ANTHROPIC_MODEL_SUPPORT = [
|
|
46
48
|
{
|
|
@@ -56,6 +58,10 @@ export const ANTHROPIC_MODEL_SUPPORT = [
|
|
|
56
58
|
thinkingOff: ThinkingOff.BetweenTools, thinkingOffCeiling: ModelEffort.High, thinksByDefault: true,
|
|
57
59
|
rejectsForcedTool: true, cacheMinTokens: 512,
|
|
58
60
|
},
|
|
61
|
+
{
|
|
62
|
+
prefix: 'claude-haiku-5-5', levels: ALL_EFFORTS, default: ModelEffort.Medium,
|
|
63
|
+
thinkingOffCeiling: ModelEffort.High, thinksByDefault: true, cacheMinTokens: 512,
|
|
64
|
+
},
|
|
59
65
|
{
|
|
60
66
|
prefix: 'claude-fable-5-1', levels: ALL_EFFORTS, default: ModelEffort.High,
|
|
61
67
|
thinkingOff: null, thinksByDefault: true, rejectsForcedTool: true, cacheMinTokens: 512,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/plugins/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAErE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iBAAiB;IACjB,uBAAuB;IACvB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/plugins/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAErE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iBAAiB;IACjB,uBAAuB;IACvB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;CACjB,CAAA;AAED,oEAAoE;AACpE,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,wFAAwF;IACxF,6CAA8B,CAAA;AAChC,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IAC3E;QACE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,E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
|
|
5
5
|
/**
|
|
6
6
|
* Model families that REJECT the sampling parameters — Claude 4.7 and later, and the whole
|
|
7
|
-
* 5 family. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
8
|
-
* is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
7
|
+
* 5 family, Haiku 5.5 included. `temperature`, `top_p` and `top_k` were removed there, and sending
|
|
8
|
+
* any of them is a 400, not a silently ignored field. Matched with `startsWith`, so a dated snapshot
|
|
9
9
|
* (`claude-sonnet-5-20260114`) is covered by its base id.
|
|
10
10
|
*
|
|
11
11
|
* This is the Anthropic counterpart of the OpenAI plugin's `RESPONSES_API_PREFIXES`: the
|
|
@@ -20,6 +20,7 @@ export const NO_SAMPLING_PREFIXES = [
|
|
|
20
20
|
'claude-opus-4-8',
|
|
21
21
|
'claude-opus-4-7',
|
|
22
22
|
'claude-sonnet-5',
|
|
23
|
+
'claude-haiku-5',
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
/** The `thinking.type` a model takes to do no up-front thinking. */
|
|
@@ -31,19 +32,20 @@ export enum ThinkingOff {
|
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Per-family facts of the Anthropic models that take `output_config.effort`, first prefix
|
|
34
|
-
* match wins. From Anthropic's model pages (2026-
|
|
35
|
-
* 4.5, `xhigh` only on the first
|
|
36
|
-
* else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
37
|
-
* sent there — and takes forced tool use and every older thinking shape.
|
|
35
|
+
* match wins. From Anthropic's model pages (2026-10-08): `max` on every model below except Opus
|
|
36
|
+
* 4.5, `xhigh` only on the first twelve, `medium` the default on Opus 5.5 and Haiku 5.5 and `high`
|
|
37
|
+
* everywhere else. A model not listed (Haiku 4.5, Sonnet 4.5 and older) rejects the field, so it is
|
|
38
|
+
* never sent there — and takes forced tool use and every older thinking shape.
|
|
38
39
|
*
|
|
39
|
-
* - **Thinking off.** Opus 5
|
|
40
|
+
* - **Thinking off.** Opus 5 and Haiku 5.5 accept `disabled` only at `high` or below. Sonnet 5.5 refuses
|
|
40
41
|
* `disabled` and takes `between_tools` instead, again only at `high` or below, with no other
|
|
41
42
|
* field beside it. Opus 5.5 and the Fable and Mythos 5 families always think: any off switch
|
|
42
43
|
* is a 400, so the request carries none.
|
|
43
44
|
* - **Forced tool use.** Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1 answer `tool_choice`
|
|
44
45
|
* `any`/`tool` with a 400; structured output asks them with `auto`, a prompt instruction naming
|
|
45
46
|
* the tool, and `strict` when the schema allows it.
|
|
46
|
-
* - **Cache minimum.** 512 tokens on the 5 family, 1024 on Sonnet 5 and Opus 4.8.
|
|
47
|
+
* - **Cache minimum.** 512 tokens on the 5 family (Haiku 5.5 included), 1024 on Sonnet 5 and Opus 4.8.
|
|
48
|
+
* - **Haiku 5.5** takes forced `tool_choice` (the reply is the call, with no thinking block before it).
|
|
47
49
|
*/
|
|
48
50
|
export const ANTHROPIC_MODEL_SUPPORT: ReadonlyArray<AnthropicModelSupport> = [
|
|
49
51
|
{
|
|
@@ -59,6 +61,10 @@ export const ANTHROPIC_MODEL_SUPPORT: ReadonlyArray<AnthropicModelSupport> = [
|
|
|
59
61
|
thinkingOff: ThinkingOff.BetweenTools, thinkingOffCeiling: ModelEffort.High, thinksByDefault: true,
|
|
60
62
|
rejectsForcedTool: true, cacheMinTokens: 512,
|
|
61
63
|
},
|
|
64
|
+
{
|
|
65
|
+
prefix: 'claude-haiku-5-5', levels: ALL_EFFORTS, default: ModelEffort.Medium,
|
|
66
|
+
thinkingOffCeiling: ModelEffort.High, thinksByDefault: true, cacheMinTokens: 512,
|
|
67
|
+
},
|
|
62
68
|
{
|
|
63
69
|
prefix: 'claude-fable-5-1', levels: ALL_EFFORTS, default: ModelEffort.High,
|
|
64
70
|
thinkingOff: null, thinksByDefault: true, rejectsForcedTool: true, cacheMinTokens: 512,
|
|
@@ -49,6 +49,7 @@ describe('@owlmeans/llm — anthropic thinking off switch per family', () => {
|
|
|
49
49
|
['claude-fable-5-1', undefined],
|
|
50
50
|
['claude-mythos-5-1', undefined],
|
|
51
51
|
['claude-haiku-4-5', undefined],
|
|
52
|
+
['claude-haiku-5-5', ThinkingOff.Disabled],
|
|
52
53
|
]
|
|
53
54
|
|
|
54
55
|
test('disableThinking sends the model\'s own off switch, or none where every switch is a 400', () => {
|
|
@@ -119,6 +120,17 @@ describe('@owlmeans/llm — anthropic effort beside the off switch', () => {
|
|
|
119
120
|
}
|
|
120
121
|
})
|
|
121
122
|
|
|
123
|
+
// Haiku 5.5: effort on every level, `disabled` only at high or below, no sampling, 512-token cache floor.
|
|
124
|
+
test('Haiku 5.5 sends effort and the disabled switch, never a sampling field', () => {
|
|
125
|
+
const model = 'claude-haiku-5-5'
|
|
126
|
+
const wire = wireOf(build({ model, disableThinking: true, effort: ModelEffort.High }), { model })
|
|
127
|
+
expect(wire.thinking).toEqual({ type: 'disabled' })
|
|
128
|
+
expect(wire.output_config).toEqual({ effort: 'high' })
|
|
129
|
+
expect(anthropicSupportHelper.rejectsSampling(model)).toBe(true)
|
|
130
|
+
expect(anthropicSupportHelper.anthropicSupportOf(model)?.default).toBe(ModelEffort.Medium)
|
|
131
|
+
expect(anthropicSupportHelper.anthropicSupportOf(model)?.cacheMinTokens).toBe(512)
|
|
132
|
+
})
|
|
133
|
+
|
|
122
134
|
test('Sonnet 5 is unchanged: disabled, every level', () => {
|
|
123
135
|
const wire = wireOf(build({ model: 'claude-sonnet-5', disableThinking: true, effort: ModelEffort.XHigh }), {})
|
|
124
136
|
expect(wire.thinking).toEqual({ type: 'disabled' })
|
|
@@ -128,7 +140,7 @@ describe('@owlmeans/llm — anthropic effort beside the off switch', () => {
|
|
|
128
140
|
|
|
129
141
|
describe('@owlmeans/llm — anthropic structured output per family', () => {
|
|
130
142
|
const refusing = ['claude-sonnet-5-5', 'claude-opus-5-5', 'claude-fable-5-1', 'claude-mythos-5-1']
|
|
131
|
-
const pinning = ['claude-sonnet-5', 'claude-opus-5', 'claude-fable-5', 'claude-haiku-4-5', undefined]
|
|
143
|
+
const pinning = ['claude-sonnet-5', 'claude-opus-5', 'claude-fable-5', 'claude-haiku-4-5', 'claude-haiku-5-5', undefined]
|
|
132
144
|
|
|
133
145
|
test('a model that refuses a pinned tool is asked with auto and a strict tool', () => {
|
|
134
146
|
for (const model of refusing) {
|