@opencode/ai 0.0.0-dev-20389 → 0.0.0-dev-20392

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.
@@ -678,16 +678,14 @@ const requireThinkingSignature = (request) => {
678
678
  // Mid-conversation system messages became available with Opus 4.8 and version
679
679
  // 5 of the other supported Claude families. Treat later family versions as
680
680
  // compatible without assuming that every Anthropic Messages model is Claude.
681
+ // Opus 4.8 and every Claude 5 model accept mid-conversation system messages; later versions inherit support.
681
682
  const supportsNativeSystemUpdates = (request) => {
682
- const match = /(?:^|[./])claude-(fable|haiku|mythos|opus|sonnet)-(\d+)(?:[.-](\d+))?/.exec(String(request.model.id).toLowerCase());
683
- if (!match)
683
+ const version = claudeVersion(String(request.model.id));
684
+ if (version === undefined)
684
685
  return false;
685
- const major = Number(match[2]);
686
- if (match[1] !== "opus")
687
- return major >= 5;
688
- if (major !== 4)
689
- return major >= 5;
690
- return match[3] !== undefined && match[3].length <= 2 && Number(match[3]) >= 8;
686
+ if (version.family === "opus" && version.major === 4)
687
+ return version.minor >= 8;
688
+ return version.major >= 5;
691
689
  };
692
690
  const endsInServerToolUse = (message) => {
693
691
  const last = message.content.at(-1);
@@ -852,6 +850,7 @@ const lowerMessages = Effect.fn("AnthropicMessages.lowerMessages")(function* (re
852
850
  }
853
851
  return messages;
854
852
  });
853
+ // Per-turn effort started with Claude Opus 5 and every Claude 5.1 model; later versions of any family inherit it.
855
854
  const supportsEffortUpdates = (model) => {
856
855
  const override = model.compatibility?.supportsEffortUpdates;
857
856
  if (override !== undefined)
@@ -859,10 +858,8 @@ const supportsEffortUpdates = (model) => {
859
858
  const version = claudeVersion(model.id);
860
859
  if (version === undefined)
861
860
  return false;
862
- if (version.family === "opus")
863
- return version.major >= 5;
864
- if (version.family !== "fable" && version.family !== "mythos")
865
- return false;
861
+ if (version.family === "opus" && version.major >= 5)
862
+ return true;
866
863
  return version.major > 5 || (version.major === 5 && version.minor >= 1);
867
864
  };
868
865
  const applyThinkingBindingDefault = (model, thinking) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-20389",
3
+ "version": "0.0.0-dev-20392",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@clack/prompts": "1.0.0-alpha.1",
36
36
  "@effect/platform-node": "4.0.0-rc.112",
37
- "@opencode/http-recorder": "0.0.0-dev-20389",
37
+ "@opencode/http-recorder": "0.0.0-dev-20392",
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -44,7 +44,7 @@
44
44
  "@aws-sdk/credential-providers": "3.1057.0",
45
45
  "@smithy/eventstream-codec": "4.2.14",
46
46
  "@smithy/util-utf8": "4.2.2",
47
- "@opencode/schema": "0.0.0-dev-20389",
47
+ "@opencode/schema": "0.0.0-dev-20392",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.0-rc.112",
50
50
  "google-auth-library": "10.5.0"