claudecode-omc 5.6.8 → 5.11.0

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.
Files changed (216) hide show
  1. package/.local/settings/settings.json +8 -0
  2. package/.local/skills/prompt-optimizer/SKILL.md +262 -19
  3. package/.omc-curation/ecc-selection.json +80 -0
  4. package/.omc-curation/governance.json +116 -0
  5. package/.omc-curation/sources.lock.json +30 -0
  6. package/README.md +78 -4
  7. package/bundled/manifest.json +6 -5
  8. package/bundled/upstream/anthropic-skills/.omc-source/bundle.json +18 -0
  9. package/bundled/upstream/anthropic-skills/.omc-source/provenance.json +399 -0
  10. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +18 -17
  11. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
  12. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +4 -4
  13. package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +2 -2
  14. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
  15. package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +2 -2
  16. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
  17. package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +2 -2
  18. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
  19. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
  20. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
  21. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
  22. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
  23. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +3 -3
  24. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
  25. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +2 -2
  26. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +5 -5
  27. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +3 -1
  28. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +10 -4
  29. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +19 -1
  30. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +6 -2
  31. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +1 -1
  32. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +3 -3
  33. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +3 -2
  34. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  35. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +10 -4
  36. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +113 -13
  37. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +14 -11
  38. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +2 -2
  39. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +4 -4
  40. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
  41. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
  42. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
  43. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
  44. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
  45. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +3 -3
  46. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -1
  47. package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +108 -24
  48. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +3 -3
  49. package/bundled/upstream/ecc/.omc-source/provenance.json +563 -0
  50. package/bundled/upstream/ecc/agents/marketing-agent.md +159 -0
  51. package/bundled/upstream/ecc/agents/react-build-resolver.md +215 -0
  52. package/bundled/upstream/ecc/agents/react-reviewer.md +167 -0
  53. package/bundled/upstream/ecc/agents/typescript-reviewer.md +3 -0
  54. package/bundled/upstream/ecc/commands/harness-audit.md +17 -10
  55. package/bundled/upstream/ecc/commands/marketing-campaign.md +129 -0
  56. package/bundled/upstream/ecc/commands/react-build.md +187 -0
  57. package/bundled/upstream/ecc/commands/react-review.md +170 -0
  58. package/bundled/upstream/ecc/commands/react-test.md +265 -0
  59. package/bundled/upstream/ecc/skills/benchmark-optimization-loop/SKILL.md +69 -0
  60. package/bundled/upstream/ecc/skills/blender-motion-state-inspection/SKILL.md +164 -0
  61. package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +9 -1
  62. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +31 -9
  63. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +38 -4
  64. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +319 -12
  65. package/bundled/upstream/ecc/skills/data-throughput-accelerator/SKILL.md +72 -0
  66. package/bundled/upstream/ecc/skills/dynamic-workflow-mode/SKILL.md +123 -0
  67. package/bundled/upstream/ecc/skills/frontend-a11y/SKILL.md +446 -0
  68. package/bundled/upstream/ecc/skills/ito-basket-compare/SKILL.md +63 -0
  69. package/bundled/upstream/ecc/skills/ito-data-atlas-agent/SKILL.md +63 -0
  70. package/bundled/upstream/ecc/skills/ito-market-intelligence/SKILL.md +60 -0
  71. package/bundled/upstream/ecc/skills/ito-trade-planner/SKILL.md +67 -0
  72. package/bundled/upstream/ecc/skills/latency-critical-systems/SKILL.md +73 -0
  73. package/bundled/upstream/ecc/skills/marketing-campaign/SKILL.md +113 -0
  74. package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +13 -0
  75. package/bundled/upstream/ecc/skills/parallel-execution-optimizer/SKILL.md +72 -0
  76. package/bundled/upstream/ecc/skills/prediction-market-oracle-research/SKILL.md +63 -0
  77. package/bundled/upstream/ecc/skills/prediction-market-risk-review/SKILL.md +60 -0
  78. package/bundled/upstream/ecc/skills/react-patterns/SKILL.md +341 -0
  79. package/bundled/upstream/ecc/skills/react-performance/SKILL.md +574 -0
  80. package/bundled/upstream/ecc/skills/react-testing/SKILL.md +423 -0
  81. package/bundled/upstream/ecc/skills/recsys-pipeline-architect/SKILL.md +114 -0
  82. package/bundled/upstream/ecc/skills/recursive-decision-ledger/SKILL.md +79 -0
  83. package/bundled/upstream/ecc/skills/social-publisher/SKILL.md +115 -0
  84. package/bundled/upstream/ecc/skills/team-agent-orchestration/SKILL.md +110 -0
  85. package/bundled/upstream/ecc/skills/uncloud/SKILL.md +343 -0
  86. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +99 -0
  87. package/bundled/upstream/impeccable/.omc-source/bundle.json +20 -0
  88. package/bundled/upstream/impeccable/.omc-source/provenance.json +105 -0
  89. package/bundled/upstream/impeccable/agents/impeccable-manual-edit-applier.md +97 -0
  90. package/bundled/upstream/impeccable/skills/impeccable/SKILL.md +168 -0
  91. package/bundled/upstream/impeccable/skills/impeccable/reference/adapt.md +311 -0
  92. package/bundled/upstream/impeccable/skills/impeccable/reference/animate.md +201 -0
  93. package/bundled/upstream/impeccable/skills/impeccable/reference/audit.md +133 -0
  94. package/bundled/upstream/impeccable/skills/impeccable/reference/bolder.md +113 -0
  95. package/bundled/upstream/impeccable/skills/impeccable/reference/brand.md +108 -0
  96. package/bundled/upstream/impeccable/skills/impeccable/reference/clarify.md +288 -0
  97. package/bundled/upstream/impeccable/skills/impeccable/reference/codex.md +105 -0
  98. package/bundled/upstream/impeccable/skills/impeccable/reference/colorize.md +257 -0
  99. package/bundled/upstream/impeccable/skills/impeccable/reference/craft.md +123 -0
  100. package/bundled/upstream/impeccable/skills/impeccable/reference/critique.md +767 -0
  101. package/bundled/upstream/impeccable/skills/impeccable/reference/delight.md +302 -0
  102. package/bundled/upstream/impeccable/skills/impeccable/reference/distill.md +111 -0
  103. package/bundled/upstream/impeccable/skills/impeccable/reference/document.md +429 -0
  104. package/bundled/upstream/impeccable/skills/impeccable/reference/extract.md +69 -0
  105. package/bundled/upstream/impeccable/skills/impeccable/reference/harden.md +347 -0
  106. package/bundled/upstream/impeccable/skills/impeccable/reference/hooks.md +88 -0
  107. package/bundled/upstream/impeccable/skills/impeccable/reference/init.md +172 -0
  108. package/bundled/upstream/impeccable/skills/impeccable/reference/interaction-design.md +189 -0
  109. package/bundled/upstream/impeccable/skills/impeccable/reference/layout.md +161 -0
  110. package/bundled/upstream/impeccable/skills/impeccable/reference/live.md +718 -0
  111. package/bundled/upstream/impeccable/skills/impeccable/reference/onboard.md +234 -0
  112. package/bundled/upstream/impeccable/skills/impeccable/reference/optimize.md +258 -0
  113. package/bundled/upstream/impeccable/skills/impeccable/reference/overdrive.md +130 -0
  114. package/bundled/upstream/impeccable/skills/impeccable/reference/polish.md +241 -0
  115. package/bundled/upstream/impeccable/skills/impeccable/reference/product.md +60 -0
  116. package/bundled/upstream/impeccable/skills/impeccable/reference/quieter.md +99 -0
  117. package/bundled/upstream/impeccable/skills/impeccable/reference/shape.md +165 -0
  118. package/bundled/upstream/impeccable/skills/impeccable/reference/typeset.md +279 -0
  119. package/bundled/upstream/impeccable/skills/impeccable/scripts/command-metadata.json +94 -0
  120. package/bundled/upstream/impeccable/skills/impeccable/scripts/context-signals.mjs +225 -0
  121. package/bundled/upstream/impeccable/skills/impeccable/scripts/context.mjs +280 -0
  122. package/bundled/upstream/impeccable/skills/impeccable/scripts/critique-storage.mjs +242 -0
  123. package/bundled/upstream/impeccable/skills/impeccable/scripts/detect-csp.mjs +198 -0
  124. package/bundled/upstream/impeccable/skills/impeccable/scripts/detect.mjs +21 -0
  125. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/browser/injected/index.mjs +1735 -0
  126. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/cli/main.mjs +244 -0
  127. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +4907 -0
  128. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns.mjs +43 -0
  129. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +252 -0
  130. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +552 -0
  131. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1013 -0
  132. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +208 -0
  133. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
  134. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/findings.mjs +12 -0
  135. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
  136. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
  137. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/registry/antipatterns.mjs +419 -0
  138. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/rules/checks.mjs +2671 -0
  139. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
  140. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
  141. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
  142. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-admin.mjs +574 -0
  143. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-before-edit.mjs +473 -0
  144. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-lib.mjs +1286 -0
  145. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook.mjs +61 -0
  146. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/design-parser.mjs +835 -0
  147. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/impeccable-paths.mjs +126 -0
  148. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/is-generated.mjs +69 -0
  149. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/browser-script-parts.mjs +49 -0
  150. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/completion.mjs +19 -0
  151. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/event-validation.mjs +137 -0
  152. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/insert-ui.mjs +458 -0
  153. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-apply.mjs +939 -0
  154. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-edit-routes.mjs +357 -0
  155. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
  156. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/session-store.mjs +289 -0
  157. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/svelte-component.mjs +826 -0
  158. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/sveltekit-adapter.mjs +274 -0
  159. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/ui-core.mjs +180 -0
  160. package/bundled/upstream/impeccable/skills/impeccable/scripts/live/vocabulary.mjs +36 -0
  161. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-accept.mjs +812 -0
  162. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser-dom.js +146 -0
  163. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser-session.js +123 -0
  164. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser.js +11086 -0
  165. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
  166. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-complete.mjs +75 -0
  167. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
  168. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
  169. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-inject.mjs +583 -0
  170. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-insert.mjs +272 -0
  171. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
  172. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-poll.mjs +379 -0
  173. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-resume.mjs +94 -0
  174. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-server.mjs +1134 -0
  175. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-status.mjs +61 -0
  176. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-wrap.mjs +894 -0
  177. package/bundled/upstream/impeccable/skills/impeccable/scripts/live.mjs +246 -0
  178. package/bundled/upstream/impeccable/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  179. package/bundled/upstream/impeccable/skills/impeccable/scripts/palette.mjs +633 -0
  180. package/bundled/upstream/impeccable/skills/impeccable/scripts/pin.mjs +214 -0
  181. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +2 -1
  182. package/bundled/upstream/oh-my-claudecode/.omc-source/provenance.json +116 -0
  183. package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +7 -0
  184. package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +1 -0
  185. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +39 -5
  186. package/bundled/upstream/oh-my-claudecode/skills/hud/SKILL.md +1 -0
  187. package/bundled/upstream/oh-my-claudecode/skills/local-build-reminder/SKILL.md +78 -0
  188. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +1 -1
  189. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/SKILL.md +26 -10
  190. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +3 -3
  191. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +6 -4
  192. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +1 -1
  193. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +2 -2
  194. package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +6 -6
  195. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +44 -32
  196. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +45 -21
  197. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +1 -1
  198. package/bundled/upstream/oh-my-claudecode/skills/self-improve/SKILL.md +7 -0
  199. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/resolve-paths.mjs +39 -15
  200. package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +132 -90
  201. package/bundled/upstream/oh-my-claudecode/skills/ultragoal/SKILL.md +93 -0
  202. package/bundled/upstream/oh-my-claudecode/skills/ultraqa/SKILL.md +28 -13
  203. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +7 -0
  204. package/bundled/upstream/superpowers/.omc-source/bundle.json +2 -1
  205. package/bundled/upstream/superpowers/.omc-source/provenance.json +63 -0
  206. package/package.json +2 -1
  207. package/src/catalog/source-catalog.js +10 -4
  208. package/src/cli/index.js +4 -0
  209. package/src/cli/plan.js +14 -2
  210. package/src/cli/setup.js +52 -13
  211. package/src/cli/skill.js +1 -1
  212. package/src/cli/source.js +271 -14
  213. package/src/config/sources.js +82 -1
  214. package/src/merge/content-patch.js +88 -0
  215. package/templates/merge-config.json +1 -8
  216. package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +0 -54
@@ -27,7 +27,7 @@ Never mix the two — don't reach for `requests`/`fetch` in a Python or TypeScri
27
27
 
28
28
  Unless the user requests otherwise:
29
29
 
30
- For the Claude model version, please use Claude Opus 4.7, which you can access via the exact model string `claude-opus-4-7`. Please default to using adaptive thinking (`thinking: {type: "adaptive"}`) for anything remotely complicated. And finally, please default to streaming for any request that may involve long input, long output, or high `max_tokens` — it prevents hitting request timeouts. Use the SDK's `.get_final_message()` / `.finalMessage()` helper to get the complete response if you don't need to handle individual stream events
30
+ For the Claude model version, please use Claude Opus 4.8, which you can access via the exact model string `claude-opus-4-8`. Please default to using adaptive thinking (`thinking: {type: "adaptive"}`) for anything remotely complicated. And finally, please default to streaming for any request that may involve long input, long output, or high `max_tokens` — it prevents hitting request timeouts. Use the SDK's `.get_final_message()` / `.finalMessage()` helper to get the complete response if you don't need to handle individual stream events
31
31
 
32
32
  ---
33
33
 
@@ -161,16 +161,17 @@ Everything goes through `POST /v1/messages`. Tools and output constraints are fe
161
161
 
162
162
  ---
163
163
 
164
- ## Current Models (cached: 2026-04-15)
164
+ ## Current Models (cached: 2026-05-26)
165
165
 
166
166
  | Model | Model ID | Context | Input $/1M | Output $/1M |
167
167
  | ----------------- | ------------------- | -------------- | ---------- | ----------- |
168
+ | Claude Opus 4.8 | `claude-opus-4-8` | 1M | $5.00 | $25.00 |
168
169
  | Claude Opus 4.7 | `claude-opus-4-7` | 1M | $5.00 | $25.00 |
169
170
  | Claude Opus 4.6 | `claude-opus-4-6` | 1M | $5.00 | $25.00 |
170
171
  | Claude Sonnet 4.6 | `claude-sonnet-4-6` | 1M | $3.00 | $15.00 |
171
172
  | Claude Haiku 4.5 | `claude-haiku-4-5` | 200K | $1.00 | $5.00 |
172
173
 
173
- **ALWAYS use `claude-opus-4-7` unless the user explicitly names a different model.** This is non-negotiable. Do not use `claude-sonnet-4-6`, `claude-sonnet-4-5`, or any other model unless the user literally says "use sonnet" or "use haiku". Never downgrade for cost — that's the user's decision, not yours.
174
+ **ALWAYS use `claude-opus-4-8` unless the user explicitly names a different model.** This is non-negotiable. Do not use `claude-sonnet-4-6`, `claude-sonnet-4-5`, or any other model unless the user literally says "use sonnet" or "use haiku". Never downgrade for cost — that's the user's decision, not yours.
174
175
 
175
176
  **CRITICAL: Use only the exact model ID strings from the table above — they are complete as-is. Do not append date suffixes.** For example, use `claude-sonnet-4-5`, never `claude-sonnet-4-5-20250514` or any other date-suffixed variant you might recall from training data. If the user requests an older model not in the table (e.g., "opus 4.5", "sonnet 3.7"), read `shared/models.md` for the exact ID — do not construct one yourself.
176
177
 
@@ -182,23 +183,23 @@ A note: if any of the model strings above look unfamiliar to you, that's to be e
182
183
 
183
184
  ## Thinking & Effort (Quick Reference)
184
185
 
185
- **Opus 4.7 — Adaptive thinking only:** Use `thinking: {type: "adaptive"}`. `thinking: {type: "enabled", budget_tokens: N}` returns a 400 on Opus 4.7 — adaptive is the only on-mode. `{type: "disabled"}` and omitting `thinking` both work. Sampling parameters (`temperature`, `top_p`, `top_k`) are also removed and will 400. See `shared/model-migration.md` → Migrating to Opus 4.7 for the full breaking-change list.
186
- **Opus 4.6 — Adaptive thinking (recommended):** Use `thinking: {type: "adaptive"}`. Claude dynamically decides when and how much to think. No `budget_tokens` needed — `budget_tokens` is deprecated on Opus 4.6 and Sonnet 4.6 and should not be used for new code. Adaptive thinking also automatically enables interleaved thinking (no beta header needed). **When the user asks for "extended thinking", a "thinking budget", or `budget_tokens`: always use Opus 4.7 or 4.6 with `thinking: {type: "adaptive"}`. The concept of a fixed token budget for thinking is deprecated — adaptive thinking replaces it. Do NOT use `budget_tokens` for new 4.6/4.7 code and do NOT switch to an older model.** *Gradual-migration carve-out:* `budget_tokens` is still functional on Opus 4.6 and Sonnet 4.6 as a transitional escape hatch — if you're migrating existing code and need a hard token ceiling before you've tuned `effort`, see `shared/model-migration.md` → Transitional escape hatch. Note: this carve-out does **not** apply to Opus 4.7 — `budget_tokens` is fully removed there.
187
- **Effort parameter (GA, no beta header):** Controls thinking depth and overall token spend via `output_config: {effort: "low"|"medium"|"high"|"max"}` (inside `output_config`, not top-level). Default is `high` (equivalent to omitting it). `max` is Opus-tier only (Opus 4.6 and later — not Sonnet or Haiku). Opus 4.7 adds `"xhigh"` (between `high` and `max`) — the best setting for most coding and agentic use cases on 4.7, and the default in Claude Code; use a minimum of `high` for most intelligence-sensitive work. Works on Opus 4.5, Opus 4.6, Opus 4.7, and Sonnet 4.6. Will error on Sonnet 4.5 / Haiku 4.5. On Opus 4.7, effort matters more than on any prior Opus — re-tune it when migrating. Combine with adaptive thinking for the best cost-quality tradeoffs. Lower effort means fewer and more-consolidated tool calls, less preamble, and terser confirmations — `high` is often the sweet spot balancing quality and token efficiency; use `max` when correctness matters more than cost; use `low` for subagents or simple tasks.
186
+ **Opus 4.8 / 4.7 — Adaptive thinking only:** Use `thinking: {type: "adaptive"}`. `thinking: {type: "enabled", budget_tokens: N}` returns a 400 — adaptive is the only on-mode. `{type: "disabled"}` and omitting `thinking` both work. Sampling parameters (`temperature`, `top_p`, `top_k`) are also removed and will 400. Opus 4.8 keeps the same request surface as 4.7 (no new breaking changes) — see `shared/model-migration.md` → Migrating to Opus 4.8 for the behavioral re-tuning, and → Migrating to Opus 4.7 for the full breaking-change list when coming from 4.6 or earlier. Note: with `thinking` disabled, Opus 4.8 may write longer reasoning into the visible response — leave adaptive thinking on, or add a final-answer-only instruction (see the migration guide).
187
+ **Opus 4.6 — Adaptive thinking (recommended):** Use `thinking: {type: "adaptive"}`. Claude dynamically decides when and how much to think. No `budget_tokens` needed — `budget_tokens` is deprecated on Opus 4.6 and Sonnet 4.6 and should not be used for new code. Adaptive thinking also automatically enables interleaved thinking (no beta header needed). **When the user asks for "extended thinking", a "thinking budget", or `budget_tokens`: always use Opus 4.8, 4.7, or 4.6 with `thinking: {type: "adaptive"}`. The concept of a fixed token budget for thinking is deprecated — adaptive thinking replaces it. Do NOT use `budget_tokens` for new 4.6/4.7/4.8 code and do NOT switch to an older model.** *Gradual-migration carve-out:* `budget_tokens` is still functional on Opus 4.6 and Sonnet 4.6 as a transitional escape hatch — if you're migrating existing code and need a hard token ceiling before you've tuned `effort`, see `shared/model-migration.md` → Transitional escape hatch. Note: this carve-out does **not** apply to Opus 4.7 or 4.8 — `budget_tokens` is fully removed there.
188
+ **Effort parameter (GA, no beta header):** Controls thinking depth and overall token spend via `output_config: {effort: "low"|"medium"|"high"|"max"}` (inside `output_config`, not top-level). Default is `high` (equivalent to omitting it). `max` is Opus-tier only (Opus 4.6 and later — not Sonnet or Haiku). Opus 4.7 added `"xhigh"` (between `high` and `max`) — the best setting for most coding and agentic use cases on Opus 4.7/4.8, and the default in Claude Code; use a minimum of `high` for most intelligence-sensitive work. Works on Opus 4.5, Opus 4.6, Opus 4.7, Opus 4.8, and Sonnet 4.6. Will error on Sonnet 4.5 / Haiku 4.5. On Opus 4.7 and 4.8, effort matters more than on any prior Opus — re-tune it when migrating, and run long-horizon/agentic tasks at `high`/`xhigh` with the full task spec given up front. Combine with adaptive thinking for the best cost-quality tradeoffs. Lower effort means fewer and more-consolidated tool calls, less preamble, and terser confirmations — `high` is often the sweet spot balancing quality and token efficiency; use `max` when correctness matters more than cost; use `low` for subagents or simple tasks.
188
189
 
189
- **Opus 4.7 — thinking content omitted by default:** `thinking` blocks still stream but their text is empty unless you opt in with `thinking: {type: "adaptive", display: "summarized"}` (default is `"omitted"`). Silent change — no error. If you stream reasoning to users, the default looks like a long pause before output; set `"summarized"` to restore visible progress.
190
+ **Opus 4.8 / 4.7 — thinking content omitted by default:** `thinking` blocks still stream but their text is empty unless you opt in with `thinking: {type: "adaptive", display: "summarized"}` (default is `"omitted"`). Silent change — no error. If you stream reasoning to users, the default looks like a long pause before output; set `"summarized"` to restore visible progress.
190
191
 
191
- **Task Budgets (beta, Opus 4.7):** `output_config: {task_budget: {type: "tokens", total: N}}` tells the model how many tokens it has for a full agentic loop — it sees a running countdown and self-moderates (minimum 20,000; beta header `task-budgets-2026-03-13`). Distinct from `max_tokens`, which is an enforced per-response ceiling the model is not aware of. See `shared/model-migration.md` → Task Budgets.
192
+ **Task Budgets (beta, Opus 4.7 / 4.8):** `output_config: {task_budget: {type: "tokens", total: N}}` tells the model how many tokens it has for a full agentic loop — it sees a running countdown and self-moderates (minimum 20,000; beta header `task-budgets-2026-03-13`). Distinct from `max_tokens`, which is an enforced per-response ceiling the model is not aware of. See `shared/model-migration.md` → Task Budgets.
192
193
 
193
194
  **Sonnet 4.6:** Supports adaptive thinking (`thinking: {type: "adaptive"}`). `budget_tokens` is deprecated on Sonnet 4.6 — use adaptive thinking instead.
194
195
 
195
- **Older models (only if explicitly requested):** If the user specifically asks for Sonnet 4.5 or another older model, use `thinking: {type: "enabled", budget_tokens: N}`. `budget_tokens` must be less than `max_tokens` (minimum 1024). Never choose an older model just because the user mentions `budget_tokens` — use Opus 4.7 with adaptive thinking instead.
196
+ **Older models (only if explicitly requested):** If the user specifically asks for Sonnet 4.5 or another older model, use `thinking: {type: "enabled", budget_tokens: N}`. `budget_tokens` must be less than `max_tokens` (minimum 1024). Never choose an older model just because the user mentions `budget_tokens` — use Opus 4.8 with adaptive thinking instead.
196
197
 
197
198
  ---
198
199
 
199
200
  ## Compaction (Quick Reference)
200
201
 
201
- **Beta, Opus 4.7, Opus 4.6, and Sonnet 4.6.** For long-running conversations that may exceed the 1M context window, enable server-side compaction. The API automatically summarizes earlier context when it approaches the trigger threshold (default: 150K tokens). Requires beta header `compact-2026-01-12`.
202
+ **Beta, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6.** For long-running conversations that may exceed the 1M context window, enable server-side compaction. The API automatically summarizes earlier context when it approaches the trigger threshold (default: 150K tokens). Requires beta header `compact-2026-01-12`.
202
203
 
203
204
  **Critical:** Append `response.content` (not just the text) back to your messages on every turn. Compaction blocks in the response must be preserved — the API uses them to replace the compacted history on the next request. Extracting only the text string and appending that will silently lose the compaction state.
204
205
 
@@ -256,7 +257,7 @@ After detecting the language, read the relevant files based on what the user nee
256
257
 
257
258
  **Long-running conversations (may exceed context window):**
258
259
  → Read `{lang}/claude-api/README.md` — see Compaction section
259
- **Migrating to a newer model (Opus 4.7 / Opus 4.6 / Sonnet 4.6) or replacing a retired model:**
260
+ **Migrating to a newer model (Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 4.6) or replacing a retired model:**
260
261
  → Read `shared/model-migration.md`
261
262
  **Prompt caching / optimize caching / "why is my cache hit rate low":**
262
263
  → Read `shared/prompt-caching.md` + `{lang}/claude-api/README.md` (Prompt Caching section)
@@ -311,13 +312,13 @@ Live documentation URLs are in `shared/live-sources.md`.
311
312
  ## Common Pitfalls
312
313
 
313
314
  - Don't truncate inputs when passing files or content to the API. If the content is too long to fit in the context window, notify the user and discuss options (chunking, summarization, etc.) rather than silently truncating.
314
- - **Opus 4.7 thinking:** Adaptive only. `thinking: {type: "enabled", budget_tokens: N}` returns 400 on Opus 4.7 — `budget_tokens` is fully removed there (along with `temperature`, `top_p`, `top_k`). Use `thinking: {type: "adaptive"}`.
315
- - **Opus 4.6 / Sonnet 4.6 thinking:** Use `thinking: {type: "adaptive"}` — do NOT use `budget_tokens` for new 4.6 code (deprecated on both Opus 4.6 and Sonnet 4.6; for gradual migration of existing code, see the transitional escape hatch in `shared/model-migration.md` — note this carve-out does not apply to Opus 4.7). For older models, `budget_tokens` must be less than `max_tokens` (minimum 1024). This will throw an error if you get it wrong.
316
- - **4.6/4.7 family prefill removed:** Assistant message prefills (last-assistant-turn prefills) return a 400 error on Opus 4.6, Opus 4.7, and Sonnet 4.6. Use structured outputs (`output_config.format`) or system prompt instructions to control response format instead.
317
- - **Confirm migration scope before editing:** When a user asks to migrate code to a newer Claude model without naming a specific file, directory, or file list, **ask which scope to apply first** — the entire working directory, a specific subdirectory, or a specific set of files. Do not start editing until the user confirms. Imperative phrasings like "migrate my codebase", "move my project to X", "upgrade to Sonnet 4.6", or bare "migrate to Opus 4.7" are **still ambiguous** — they tell you what to do but not where, so ask. Proceed without asking only when the prompt names an exact file, a specific directory, or an explicit file list ("migrate `app.py`", "migrate everything under `services/`", "update `a.py` and `b.py`"). See `shared/model-migration.md` Step 0.
315
+ - **Opus 4.8 / 4.7 thinking:** Adaptive only. `thinking: {type: "enabled", budget_tokens: N}` returns 400 — `budget_tokens` is fully removed (along with `temperature`, `top_p`, `top_k`). Use `thinking: {type: "adaptive"}`. Opus 4.8 inherits this surface from 4.7 with no new breaking changes.
316
+ - **Opus 4.6 / Sonnet 4.6 thinking:** Use `thinking: {type: "adaptive"}` — do NOT use `budget_tokens` for new 4.6 code (deprecated on both Opus 4.6 and Sonnet 4.6; for gradual migration of existing code, see the transitional escape hatch in `shared/model-migration.md` — note this carve-out does not apply to Opus 4.7 or 4.8). For older models, `budget_tokens` must be less than `max_tokens` (minimum 1024). This will throw an error if you get it wrong.
317
+ - **4.6/4.7/4.8 family prefill removed:** Assistant message prefills (last-assistant-turn prefills) return a 400 error on Opus 4.6, Opus 4.7, Opus 4.8, and Sonnet 4.6. Use structured outputs (`output_config.format`) or system prompt instructions to control response format instead.
318
+ - **Confirm migration scope before editing:** When a user asks to migrate code to a newer Claude model without naming a specific file, directory, or file list, **ask which scope to apply first** — the entire working directory, a specific subdirectory, or a specific set of files. Do not start editing until the user confirms. Imperative phrasings like "migrate my codebase", "move my project to X", "upgrade to Sonnet 4.6", or bare "migrate to Opus 4.8" are **still ambiguous** — they tell you what to do but not where, so ask. Proceed without asking only when the prompt names an exact file, a specific directory, or an explicit file list ("migrate `app.py`", "migrate everything under `services/`", "update `a.py` and `b.py`"). See `shared/model-migration.md` Step 0.
318
319
  - **`max_tokens` defaults:** Don't lowball `max_tokens` — hitting the cap truncates output mid-thought and requires a retry. For non-streaming requests, default to `~16000` (keeps responses under SDK HTTP timeouts). For streaming requests, default to `~64000` (timeouts aren't a concern, so give the model room). Only go lower when you have a hard reason: classification (`~256`), cost caps, or deliberately short outputs.
319
- - **128K output tokens:** Opus 4.6 and Opus 4.7 support up to 128K `max_tokens`, but the SDKs require streaming for values that large to avoid HTTP timeouts. Use `.stream()` with `.get_final_message()` / `.finalMessage()`.
320
- - **Tool call JSON parsing (4.6/4.7 family):** Opus 4.6, Opus 4.7, and Sonnet 4.6 may produce different JSON string escaping in tool call `input` fields (e.g., Unicode or forward-slash escaping). Always parse tool inputs with `json.loads()` / `JSON.parse()` — never do raw string matching on the serialized input.
320
+ - **128K output tokens:** Opus 4.6, Opus 4.7, and Opus 4.8 support up to 128K `max_tokens`, but the SDKs require streaming for values that large to avoid HTTP timeouts. Use `.stream()` with `.get_final_message()` / `.finalMessage()`.
321
+ - **Tool call JSON parsing (4.6/4.7/4.8 family):** Opus 4.6, Opus 4.7, Opus 4.8, and Sonnet 4.6 may produce different JSON string escaping in tool call `input` fields (e.g., Unicode or forward-slash escaping). Always parse tool inputs with `json.loads()` / `JSON.parse()` — never do raw string matching on the serialized input.
321
322
  - **Structured outputs (all models):** Use `output_config: {format: {...}}` instead of the deprecated `output_format` parameter on `messages.create()`. This is a general API change, not 4.6-specific.
322
323
  - **Don't reimplement SDK functionality:** The SDK provides high-level helpers — use them instead of building from scratch. Specifically: use `stream.finalMessage()` instead of wrapping `.on()` events in `new Promise()`; use typed exception classes (`Anthropic.RateLimitError`, etc.) instead of string-matching error messages; use SDK types (`Anthropic.MessageParam`, `Anthropic.Tool`, `Anthropic.Message`, etc.) instead of redefining equivalent interfaces.
323
324
  - **Don't define custom types for SDK data structures:** The SDK exports types for all API objects. Use `Anthropic.MessageParam` for messages, `Anthropic.Tool` for tool definitions, `Anthropic.ToolUseBlock` / `Anthropic.ToolResultBlockParam` for tool results, `Anthropic.Message` for responses. Defining your own `interface ChatMessage { role: string; content: unknown }` duplicates what the SDK already provides and loses type safety.
@@ -18,7 +18,7 @@ curl https://api.anthropic.com/v1/messages \
18
18
  -H "x-api-key: $ANTHROPIC_API_KEY" \
19
19
  -H "anthropic-version: 2023-06-01" \
20
20
  -d '{
21
- "model": "claude-opus-4-7",
21
+ "model": "claude-opus-4-8",
22
22
  "max_tokens": 16000,
23
23
  "messages": [
24
24
  {"role": "user", "content": "What is the capital of France?"}
@@ -38,7 +38,7 @@ response=$(curl -s https://api.anthropic.com/v1/messages \
38
38
  -H "Content-Type: application/json" \
39
39
  -H "x-api-key: $ANTHROPIC_API_KEY" \
40
40
  -H "anthropic-version: 2023-06-01" \
41
- -d '{"model":"claude-opus-4-7","max_tokens":16000,"messages":[{"role":"user","content":"Hello"}]}')
41
+ -d '{"model":"claude-opus-4-8","max_tokens":16000,"messages":[{"role":"user","content":"Hello"}]}')
42
42
 
43
43
  # Print the first text block (-r strips the JSON quotes)
44
44
  echo "$response" | jq -r '.content[0].text'
@@ -65,7 +65,7 @@ curl https://api.anthropic.com/v1/messages \
65
65
  -H "x-api-key: $ANTHROPIC_API_KEY" \
66
66
  -H "anthropic-version: 2023-06-01" \
67
67
  -d '{
68
- "model": "claude-opus-4-7",
68
+ "model": "claude-opus-4-8",
69
69
  "max_tokens": 64000,
70
70
  "stream": true,
71
71
  "messages": [{"role": "user", "content": "Write a haiku"}]
@@ -104,7 +104,7 @@ curl https://api.anthropic.com/v1/messages \
104
104
  -H "x-api-key: $ANTHROPIC_API_KEY" \
105
105
  -H "anthropic-version: 2023-06-01" \
106
106
  -d '{
107
- "model": "claude-opus-4-7",
107
+ "model": "claude-opus-4-8",
108
108
  "max_tokens": 16000,
109
109
  "tools": [{
110
110
  "name": "get_weather",
@@ -129,7 +129,7 @@ curl https://api.anthropic.com/v1/messages \
129
129
  -H "x-api-key: $ANTHROPIC_API_KEY" \
130
130
  -H "anthropic-version: 2023-06-01" \
131
131
  -d '{
132
- "model": "claude-opus-4-7",
132
+ "model": "claude-opus-4-8",
133
133
  "max_tokens": 16000,
134
134
  "tools": [{
135
135
  "name": "get_weather",
@@ -167,7 +167,7 @@ curl https://api.anthropic.com/v1/messages \
167
167
  -H "x-api-key: $ANTHROPIC_API_KEY" \
168
168
  -H "anthropic-version: 2023-06-01" \
169
169
  -d '{
170
- "model": "claude-opus-4-7",
170
+ "model": "claude-opus-4-8",
171
171
  "max_tokens": 16000,
172
172
  "system": [
173
173
  {"type": "text", "text": "<large shared prompt...>", "cache_control": {"type": "ephemeral"}}
@@ -182,17 +182,17 @@ For 1-hour TTL: `"cache_control": {"type": "ephemeral", "ttl": "1h"}`. Top-level
182
182
 
183
183
  ## Extended Thinking
184
184
 
185
- > **Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
185
+ > **Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.8 and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
186
186
  > **Older models:** Use `"type": "enabled"` with `"budget_tokens": N` (must be < `max_tokens`, min 1024).
187
187
 
188
188
  ```bash
189
- # Opus 4.7 / 4.6: adaptive thinking (recommended)
189
+ # Opus 4.8 / 4.7 / 4.6: adaptive thinking (recommended)
190
190
  curl https://api.anthropic.com/v1/messages \
191
191
  -H "Content-Type: application/json" \
192
192
  -H "x-api-key: $ANTHROPIC_API_KEY" \
193
193
  -H "anthropic-version: 2023-06-01" \
194
194
  -d '{
195
- "model": "claude-opus-4-7",
195
+ "model": "claude-opus-4-8",
196
196
  "max_tokens": 16000,
197
197
  "thinking": {
198
198
  "type": "adaptive"
@@ -63,7 +63,7 @@ curl -X POST https://api.anthropic.com/v1/agents \
63
63
  "${HEADERS[@]}" \
64
64
  -d '{
65
65
  "name": "Coding Assistant",
66
- "model": "claude-opus-4-7",
66
+ "model": "claude-opus-4-8",
67
67
  "tools": [{ "type": "agent_toolset_20260401" }]
68
68
  }'
69
69
  # → { "id": "agent_abc123", ... }
@@ -85,7 +85,7 @@ curl -X POST https://api.anthropic.com/v1/agents \
85
85
  "${HEADERS[@]}" \
86
86
  -d '{
87
87
  "name": "Code Reviewer",
88
- "model": "claude-opus-4-7",
88
+ "model": "claude-opus-4-8",
89
89
  "system": "You are a senior code reviewer. Be thorough and constructive.",
90
90
  "tools": [
91
91
  { "type": "agent_toolset_20260401" },
@@ -291,7 +291,7 @@ curl -X POST https://api.anthropic.com/v1/agents \
291
291
  "${HEADERS[@]}" \
292
292
  -d '{
293
293
  "name": "MCP Agent",
294
- "model": "claude-opus-4-7",
294
+ "model": "claude-opus-4-8",
295
295
  "mcp_servers": [
296
296
  { "type": "url", "name": "my-tools", "url": "https://my-mcp-server.example.com/sse" }
297
297
  ],
@@ -322,7 +322,7 @@ curl -X POST https://api.anthropic.com/v1/agents \
322
322
  "${HEADERS[@]}" \
323
323
  -d '{
324
324
  "name": "Restricted Agent",
325
- "model": "claude-opus-4-7",
325
+ "model": "claude-opus-4-8",
326
326
  "tools": [
327
327
  {
328
328
  "type": "agent_toolset_20260401",
@@ -63,7 +63,7 @@ fmt.Println(environment.ID) // env_...
63
63
  agent, err := client.Beta.Agents.New(ctx, anthropic.BetaAgentNewParams{
64
64
  Name: "Coding Assistant",
65
65
  Model: anthropic.BetaManagedAgentsModelConfigParams{
66
- ID: "claude-opus-4-7",
66
+ ID: "claude-opus-4-8",
67
67
  Type: anthropic.BetaManagedAgentsModelConfigParamsTypeModelConfig,
68
68
  },
69
69
  System: anthropic.String("You are a helpful coding assistant."),
@@ -380,7 +380,7 @@ if err != nil {
380
380
  agent, err := client.Beta.Agents.New(ctx, anthropic.BetaAgentNewParams{
381
381
  Name: "GitHub Assistant",
382
382
  Model: anthropic.BetaManagedAgentsModelConfigParams{
383
- ID: "claude-opus-4-7",
383
+ ID: "claude-opus-4-8",
384
384
  Type: anthropic.BetaManagedAgentsModelConfigParamsTypeModelConfig,
385
385
  },
386
386
  MCPServers: []anthropic.BetaManagedAgentsUrlmcpServerParams{{
@@ -136,7 +136,7 @@ static class GetWeather implements Supplier<String> {
136
136
 
137
137
  BetaToolRunner toolRunner = client.beta().messages().toolRunner(
138
138
  MessageCreateParams.builder()
139
- .model("claude-opus-4-7")
139
+ .model("claude-opus-4-8")
140
140
  .maxTokens(16000L)
141
141
  .putAdditionalHeader("anthropic-beta", "structured-outputs-2025-11-13")
142
142
  .addTool(GetWeather.class)
@@ -164,7 +164,7 @@ import com.anthropic.models.beta.messages.ToolRunnerCreateParams;
164
164
  BetaMemoryToolHandler memoryHandler = new FileSystemMemoryToolHandler(sandboxRoot);
165
165
 
166
166
  MessageCreateParams createParams = MessageCreateParams.builder()
167
- .model("claude-opus-4-7")
167
+ .model("claude-opus-4-8")
168
168
  .maxTokens(4096L)
169
169
  .addTool(BetaMemoryTool20250818.builder().build())
170
170
  .addUserMessage("Remember that my favorite color is blue")
@@ -57,7 +57,7 @@ import com.anthropic.models.beta.sessions.SessionCreateParams;
57
57
  // 1. Create the agent (reusable, versioned)
58
58
  var agent = client.beta().agents().create(AgentCreateParams.builder()
59
59
  .name("Coding Assistant")
60
- .model("claude-opus-4-7")
60
+ .model("claude-opus-4-8")
61
61
  .system("You are a helpful coding assistant.")
62
62
  .addTool(BetaManagedAgentsAgentToolset20260401Params.builder()
63
63
  .type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
@@ -295,7 +295,7 @@ import com.anthropic.models.beta.agents.BetaManagedAgentsUrlmcpServerParams;
295
295
  // Agent declares MCP server (no auth here — auth goes in a vault)
296
296
  var agent = client.beta().agents().create(AgentCreateParams.builder()
297
297
  .name("GitHub Assistant")
298
- .model("claude-opus-4-7")
298
+ .model("claude-opus-4-8")
299
299
  .addMcpServer(BetaManagedAgentsUrlmcpServerParams.builder()
300
300
  .type(BetaManagedAgentsUrlmcpServerParams.Type.URL)
301
301
  .name("github")
@@ -56,7 +56,7 @@ $client = Foundry\Client::withCredentials(
56
56
 
57
57
  ```php
58
58
  $message = $client->messages->create(
59
- model: 'claude-opus-4-7',
59
+ model: 'claude-opus-4-8',
60
60
  maxTokens: 16000,
61
61
  messages: [
62
62
  ['role' => 'user', 'content' => 'What is the capital of France?'],
@@ -96,7 +96,7 @@ use Anthropic\Messages\RawContentBlockDeltaEvent;
96
96
  use Anthropic\Messages\TextDelta;
97
97
 
98
98
  $stream = $client->messages->createStream(
99
- model: 'claude-opus-4-7',
99
+ model: 'claude-opus-4-8',
100
100
  maxTokens: 64000,
101
101
  messages: [
102
102
  ['role' => 'user', 'content' => 'Write a haiku'],
@@ -141,7 +141,7 @@ $weatherTool = new BetaRunnableTool(
141
141
  $runner = $client->beta->messages->toolRunner(
142
142
  maxTokens: 16000,
143
143
  messages: [['role' => 'user', 'content' => 'What is the weather in Paris?']],
144
- model: 'claude-opus-4-7',
144
+ model: 'claude-opus-4-8',
145
145
  tools: [$weatherTool],
146
146
  );
147
147
 
@@ -178,7 +178,7 @@ $tools = [
178
178
  $messages = [['role' => 'user', 'content' => 'What is the weather in SF?']];
179
179
 
180
180
  $response = $client->messages->create(
181
- model: 'claude-opus-4-7',
181
+ model: 'claude-opus-4-8',
182
182
  maxTokens: 16000,
183
183
  tools: $tools,
184
184
  messages: $messages,
@@ -205,7 +205,7 @@ while ($response->stopReason === 'tool_use') { // camelCase property
205
205
  $messages[] = ['role' => 'user', 'content' => $toolResults];
206
206
 
207
207
  $response = $client->messages->create(
208
- model: 'claude-opus-4-7',
208
+ model: 'claude-opus-4-8',
209
209
  maxTokens: 16000,
210
210
  tools: $tools,
211
211
  messages: $messages,
@@ -233,7 +233,7 @@ foreach ($response->content as $block) {
233
233
  use Anthropic\Messages\ThinkingBlock;
234
234
 
235
235
  $message = $client->messages->create(
236
- model: 'claude-opus-4-7',
236
+ model: 'claude-opus-4-8',
237
237
  maxTokens: 16000,
238
238
  thinking: ['type' => 'adaptive'],
239
239
  messages: [
@@ -265,7 +265,7 @@ foreach ($message->content as $block) {
265
265
 
266
266
  ```php
267
267
  $message = $client->messages->create(
268
- model: 'claude-opus-4-7',
268
+ model: 'claude-opus-4-8',
269
269
  maxTokens: 16000,
270
270
  system: [
271
271
  ['type' => 'text', 'text' => $longSystemPrompt, 'cacheControl' => ['type' => 'ephemeral']],
@@ -304,7 +304,7 @@ class Person implements StructuredOutputModel
304
304
  }
305
305
 
306
306
  $message = $client->messages->create(
307
- model: 'claude-opus-4-7',
307
+ model: 'claude-opus-4-8',
308
308
  maxTokens: 16000,
309
309
  messages: [['role' => 'user', 'content' => 'Generate a profile for Alice, age 30']],
310
310
  outputConfig: ['format' => Person::class],
@@ -320,7 +320,7 @@ Types are inferred from PHP type hints. Use `#[Constrained(description: '...')]`
320
320
 
321
321
  ```php
322
322
  $message = $client->messages->create(
323
- model: 'claude-opus-4-7',
323
+ model: 'claude-opus-4-8',
324
324
  maxTokens: 16000,
325
325
  messages: [['role' => 'user', 'content' => 'Extract: John (john@co.com), Enterprise plan']],
326
326
  outputConfig: [
@@ -359,7 +359,7 @@ foreach ($message->content as $block) {
359
359
  use Anthropic\Beta\Messages\BetaRequestMCPServerURLDefinition;
360
360
 
361
361
  $response = $client->beta->messages->create(
362
- model: 'claude-opus-4-7',
362
+ model: 'claude-opus-4-8',
363
363
  maxTokens: 16000,
364
364
  mcpServers: [
365
365
  BetaRequestMCPServerURLDefinition::with(
@@ -48,7 +48,7 @@ use Anthropic\Beta\Agents\BetaManagedAgentsAgentToolset20260401Params;
48
48
  // 1. Create the agent (reusable, versioned)
49
49
  $agent = $client->beta->agents->create(
50
50
  name: 'Coding Assistant',
51
- model: 'claude-opus-4-7',
51
+ model: 'claude-opus-4-8',
52
52
  system: 'You are a helpful coding assistant.',
53
53
  tools: [
54
54
  BetaManagedAgentsAgentToolset20260401Params::with(
@@ -299,7 +299,7 @@ use Anthropic\Beta\Sessions\BetaManagedAgentsAgentParams;
299
299
  // Agent declares MCP server (no auth here — auth goes in a vault)
300
300
  $agent = $client->beta->agents->create(
301
301
  name: 'GitHub Assistant',
302
- model: 'claude-opus-4-7',
302
+ model: 'claude-opus-4-8',
303
303
  mcpServers: [
304
304
  BetaManagedAgentsUrlmcpServerParams::with(
305
305
  type: 'url',
@@ -27,7 +27,7 @@ async_client = anthropic.AsyncAnthropic()
27
27
 
28
28
  ```python
29
29
  response = client.messages.create(
30
- model="claude-opus-4-7",
30
+ model="claude-opus-4-8",
31
31
  max_tokens=16000,
32
32
  messages=[
33
33
  {"role": "user", "content": "What is the capital of France?"}
@@ -46,7 +46,7 @@ for block in response.content:
46
46
 
47
47
  ```python
48
48
  response = client.messages.create(
49
- model="claude-opus-4-7",
49
+ model="claude-opus-4-8",
50
50
  max_tokens=16000,
51
51
  system="You are a helpful coding assistant. Always provide examples in Python.",
52
52
  messages=[{"role": "user", "content": "How do I read a JSON file?"}]
@@ -66,7 +66,7 @@ with open("image.png", "rb") as f:
66
66
  image_data = base64.standard_b64encode(f.read()).decode("utf-8")
67
67
 
68
68
  response = client.messages.create(
69
- model="claude-opus-4-7",
69
+ model="claude-opus-4-8",
70
70
  max_tokens=16000,
71
71
  messages=[{
72
72
  "role": "user",
@@ -89,7 +89,7 @@ response = client.messages.create(
89
89
 
90
90
  ```python
91
91
  response = client.messages.create(
92
- model="claude-opus-4-7",
92
+ model="claude-opus-4-8",
93
93
  max_tokens=16000,
94
94
  messages=[{
95
95
  "role": "user",
@@ -119,7 +119,7 @@ Use top-level `cache_control` to automatically cache the last cacheable block in
119
119
 
120
120
  ```python
121
121
  response = client.messages.create(
122
- model="claude-opus-4-7",
122
+ model="claude-opus-4-8",
123
123
  max_tokens=16000,
124
124
  cache_control={"type": "ephemeral"}, # auto-caches the last cacheable block
125
125
  system="You are an expert on this large document...",
@@ -133,7 +133,7 @@ For fine-grained control, add `cache_control` to specific content blocks:
133
133
 
134
134
  ```python
135
135
  response = client.messages.create(
136
- model="claude-opus-4-7",
136
+ model="claude-opus-4-8",
137
137
  max_tokens=16000,
138
138
  system=[{
139
139
  "type": "text",
@@ -145,7 +145,7 @@ response = client.messages.create(
145
145
 
146
146
  # With explicit TTL (time-to-live)
147
147
  response = client.messages.create(
148
- model="claude-opus-4-7",
148
+ model="claude-opus-4-8",
149
149
  max_tokens=16000,
150
150
  system=[{
151
151
  "type": "text",
@@ -170,13 +170,13 @@ If `cache_read_input_tokens` is zero across repeated identical-prefix requests,
170
170
 
171
171
  ## Extended Thinking
172
172
 
173
- > **Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
173
+ > **Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.8 and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
174
174
  > **Older models:** Use `thinking: {type: "enabled", budget_tokens: N}` (must be < `max_tokens`, min 1024).
175
175
 
176
176
  ```python
177
- # Opus 4.7 / 4.6: adaptive thinking (recommended)
177
+ # Opus 4.8 / 4.7 / 4.6: adaptive thinking (recommended)
178
178
  response = client.messages.create(
179
- model="claude-opus-4-7",
179
+ model="claude-opus-4-8",
180
180
  max_tokens=16000,
181
181
  thinking={"type": "adaptive"},
182
182
  output_config={"effort": "high"}, # low | medium | high | max
@@ -258,7 +258,7 @@ class ConversationManager:
258
258
  # Usage
259
259
  conversation = ConversationManager(
260
260
  client=anthropic.Anthropic(),
261
- model="claude-opus-4-7",
261
+ model="claude-opus-4-8",
262
262
  system="You are a helpful assistant."
263
263
  )
264
264
 
@@ -275,7 +275,7 @@ response2 = conversation.send("What's my name?") # Claude remembers "Alice"
275
275
 
276
276
  ### Compaction (long conversations)
277
277
 
278
- > **Beta, Opus 4.7, Opus 4.6, and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
278
+ > **Beta, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
279
279
 
280
280
  ```python
281
281
  import anthropic
@@ -288,7 +288,7 @@ def chat(user_message: str) -> str:
288
288
 
289
289
  response = client.beta.messages.create(
290
290
  betas=["compact-2026-01-12"],
291
- model="claude-opus-4-7",
291
+ model="claude-opus-4-8",
292
292
  max_tokens=16000,
293
293
  messages=messages,
294
294
  context_management={
@@ -331,7 +331,7 @@ The `stop_reason` field in the response indicates why the model stopped generati
331
331
  ```python
332
332
  # Automatic caching (simplest — caches the last cacheable block)
333
333
  response = client.messages.create(
334
- model="claude-opus-4-7",
334
+ model="claude-opus-4-8",
335
335
  max_tokens=16000,
336
336
  cache_control={"type": "ephemeral"},
337
337
  system=large_document_text, # e.g., 50KB of context
@@ -347,7 +347,7 @@ response = client.messages.create(
347
347
  ```python
348
348
  # Default to Opus for most tasks
349
349
  response = client.messages.create(
350
- model="claude-opus-4-7", # $5.00/$25.00 per 1M tokens
350
+ model="claude-opus-4-8", # $5.00/$25.00 per 1M tokens
351
351
  max_tokens=16000,
352
352
  messages=[{"role": "user", "content": "Explain quantum computing"}]
353
353
  )
@@ -371,7 +371,7 @@ simple_response = client.messages.create(
371
371
 
372
372
  ```python
373
373
  count_response = client.messages.count_tokens(
374
- model="claude-opus-4-7",
374
+ model="claude-opus-4-8",
375
375
  messages=messages,
376
376
  system=system
377
377
  )
@@ -26,7 +26,7 @@ message_batch = client.messages.batches.create(
26
26
  Request(
27
27
  custom_id="request-1",
28
28
  params=MessageCreateParamsNonStreaming(
29
- model="claude-opus-4-7",
29
+ model="claude-opus-4-8",
30
30
  max_tokens=16000,
31
31
  messages=[{"role": "user", "content": "Summarize climate change impacts"}]
32
32
  )
@@ -34,7 +34,7 @@ message_batch = client.messages.batches.create(
34
34
  Request(
35
35
  custom_id="request-2",
36
36
  params=MessageCreateParamsNonStreaming(
37
- model="claude-opus-4-7",
37
+ model="claude-opus-4-8",
38
38
  max_tokens=16000,
39
39
  messages=[{"role": "user", "content": "Explain quantum computing basics"}]
40
40
  )
@@ -117,7 +117,7 @@ message_batch = client.messages.batches.create(
117
117
  Request(
118
118
  custom_id=f"analysis-{i}",
119
119
  params=MessageCreateParamsNonStreaming(
120
- model="claude-opus-4-7",
120
+ model="claude-opus-4-8",
121
121
  max_tokens=16000,
122
122
  system=shared_system,
123
123
  messages=[{"role": "user", "content": question}]
@@ -36,7 +36,7 @@ print(f"Size: {uploaded.size_bytes} bytes")
36
36
 
37
37
  ```python
38
38
  response = client.beta.messages.create(
39
- model="claude-opus-4-7",
39
+ model="claude-opus-4-8",
40
40
  max_tokens=16000,
41
41
  messages=[{
42
42
  "role": "user",
@@ -65,7 +65,7 @@ image_file = client.beta.files.upload(
65
65
  )
66
66
 
67
67
  response = client.beta.messages.create(
68
- model="claude-opus-4-7",
68
+ model="claude-opus-4-8",
69
69
  max_tokens=16000,
70
70
  messages=[{
71
71
  "role": "user",
@@ -142,7 +142,7 @@ questions = [
142
142
 
143
143
  for question in questions:
144
144
  response = client.beta.messages.create(
145
- model="claude-opus-4-7",
145
+ model="claude-opus-4-8",
146
146
  max_tokens=16000,
147
147
  messages=[{
148
148
  "role": "user",
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```python
6
6
  with client.messages.stream(
7
- model="claude-opus-4-7",
7
+ model="claude-opus-4-8",
8
8
  max_tokens=64000,
9
9
  messages=[{"role": "user", "content": "Write a story"}]
10
10
  ) as stream:
@@ -16,7 +16,7 @@ with client.messages.stream(
16
16
 
17
17
  ```python
18
18
  async with async_client.messages.stream(
19
- model="claude-opus-4-7",
19
+ model="claude-opus-4-8",
20
20
  max_tokens=64000,
21
21
  messages=[{"role": "user", "content": "Write a story"}]
22
22
  ) as stream:
@@ -30,11 +30,11 @@ async with async_client.messages.stream(
30
30
 
31
31
  Claude may return text, thinking blocks, or tool use. Handle each appropriately:
32
32
 
33
- > **Opus 4.7 / Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
33
+ > **Opus 4.8 / Opus 4.7 / Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
34
34
 
35
35
  ```python
36
36
  with client.messages.stream(
37
- model="claude-opus-4-7",
37
+ model="claude-opus-4-8",
38
38
  max_tokens=64000,
39
39
  thinking={"type": "adaptive"},
40
40
  messages=[{"role": "user", "content": "Analyze this problem"}]
@@ -61,7 +61,7 @@ The Python tool runner currently returns complete messages. Use streaming for in
61
61
 
62
62
  ```python
63
63
  with client.messages.stream(
64
- model="claude-opus-4-7",
64
+ model="claude-opus-4-8",
65
65
  max_tokens=64000,
66
66
  tools=tools,
67
67
  messages=messages
@@ -79,7 +79,7 @@ with client.messages.stream(
79
79
 
80
80
  ```python
81
81
  with client.messages.stream(
82
- model="claude-opus-4-7",
82
+ model="claude-opus-4-8",
83
83
  max_tokens=64000,
84
84
  messages=[{"role": "user", "content": "Hello"}]
85
85
  ) as stream:
@@ -126,7 +126,7 @@ def stream_with_progress(client, **kwargs):
126
126
  ```python
127
127
  try:
128
128
  with client.messages.stream(
129
- model="claude-opus-4-7",
129
+ model="claude-opus-4-8",
130
130
  max_tokens=64000,
131
131
  messages=[{"role": "user", "content": "Write a story"}]
132
132
  ) as stream: