mirror of
https://github.com/anthropics/skills.git
synced 2026-08-02 13:05:28 +08:00
da20c92503
* Add Managed Agents self-hosted sandboxes + mid-session agent updates + MCP tool-output offload to claude-api skill
Self-hosted sandboxes: new shared/managed-agents-self-hosted-sandboxes.md for config:{type:"self_hosted"} — agent loop on Anthropic's orchestration, tool execution on customer infra via outbound-polling worker. Covers EnvironmentWorker.run()/.run_one() (Py/TS), ant beta:worker poll/run, mid-level work.poller()/WorkPoller (Py/TS/Go only; Go has no auto_stop opt-out), AgentToolContext/beta_agent_toolset/tool_runner(), monitoring (environments.work.stats/stop — x-api-key, call from outside worker host), runtime deps, cloud-vs-self_hosted delta table, credentials, security ownership split. Cross-refs in environments.md, overview.md (Reading Guide + rewrote cloud-only pitfall), api-reference.md (SDK row + naming-quirks + schema + work REST rows), tools.md (Who-runs-it carve-out), onboarding.md, live-sources.md.
Mid-session agent updates: sessions.update(session_id, agent={tools, mcp_servers}, vault_ids=[...]) — session-local override (doesn't bump agent version), full-replacement semantics, session must be idle. New core.md section + pointers in tools.md, api-reference.md (UpdateSession row), overview.md.
Large MCP tool outputs → files: >100K tokens → automatic offload to sandbox file; agent gets truncated preview + path. Plus: invalid vault credentials don't block sessions.create() — session.error event fires, auth retries on next idle→running. Both in tools.md.
* Point ant CLI install ref to live-sources.md (OSS has no anthropic-cli.md)
* Add Opus 4.8 model migration guide to claude-api skill
* Add prescriptive tool-description guidance for Opus 4.8 to claude-api skill
125 lines
8.0 KiB
Markdown
125 lines
8.0 KiB
Markdown
# Claude Model Catalog
|
|
|
|
**Only use exact model IDs listed in this file.** Never guess or construct model IDs — incorrect IDs will cause API errors. Use aliases wherever available. For the latest information, WebFetch the Models Overview URL in `shared/live-sources.md`, or query the Models API directly (see Programmatic Model Discovery below).
|
|
|
|
## Programmatic Model Discovery
|
|
|
|
For **live** capability data — context window, max output tokens, feature support (thinking, vision, effort, structured outputs, etc.) — query the Models API instead of relying on the cached tables below. Use this when the user asks "what's the context window for X", "does model X support vision/thinking/effort", "which models support feature Y", or wants to select a model by capability at runtime.
|
|
|
|
```python
|
|
m = client.models.retrieve("claude-opus-4-8")
|
|
m.id # "claude-opus-4-8"
|
|
m.display_name # "Claude Opus 4.8"
|
|
m.max_input_tokens # context window (int)
|
|
m.max_tokens # max output tokens (int)
|
|
|
|
# capabilities is an untyped nested dict — bracket access, check ["supported"] at the leaf
|
|
caps = m.capabilities
|
|
caps["image_input"]["supported"] # vision
|
|
caps["thinking"]["types"]["adaptive"]["supported"] # adaptive thinking
|
|
caps["effort"]["max"]["supported"] # effort: max (also low/medium/high)
|
|
caps["structured_outputs"]["supported"]
|
|
caps["context_management"]["compact_20260112"]["supported"]
|
|
|
|
# filter across all models — iterate the page object directly (auto-paginates); do NOT use .data
|
|
[m for m in client.models.list()
|
|
if m.capabilities["thinking"]["types"]["adaptive"]["supported"]
|
|
and m.max_input_tokens >= 200_000]
|
|
```
|
|
|
|
Top-level fields (`id`, `display_name`, `max_input_tokens`, `max_tokens`) are typed attributes. `capabilities` is a dict — use bracket access, not attribute access. The API returns the full capability tree for every model with `supported: true/false` at each leaf, so bracket chains are safe without `.get()` guards. TypeScript SDK: same method names, also auto-paginates on iteration.
|
|
|
|
### Raw HTTP
|
|
|
|
```bash
|
|
curl https://api.anthropic.com/v1/models/claude-opus-4-8 \
|
|
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
|
-H "anthropic-version: 2023-06-01"
|
|
```
|
|
|
|
```json
|
|
{
|
|
"id": "claude-opus-4-8",
|
|
"display_name": "Claude Opus 4.8",
|
|
"max_input_tokens": 1000000,
|
|
"max_tokens": 128000,
|
|
"capabilities": {
|
|
"image_input": {"supported": true},
|
|
"structured_outputs": {"supported": true},
|
|
"thinking": {"supported": true, "types": {"enabled": {"supported": false}, "adaptive": {"supported": true}}},
|
|
"effort": {"supported": true, "low": {"supported": true}, …, "max": {"supported": true}},
|
|
…
|
|
}
|
|
}
|
|
```
|
|
|
|
## Current Models (recommended)
|
|
|
|
| Friendly Name | Alias (use this) | Full ID | Context | Max Output | Status |
|
|
|-------------------|---------------------|-------------------------------|----------------|------------|--------|
|
|
| Claude Opus 4.8 | `claude-opus-4-8` | — | 1M | 128K | Active |
|
|
| Claude Opus 4.7 | `claude-opus-4-7` | — | 1M | 128K | Active |
|
|
| Claude Opus 4.6 | `claude-opus-4-6` | — | 1M | 128K | Active |
|
|
| Claude Sonnet 4.6 | `claude-sonnet-4-6` | - | 1M | 64K | Active |
|
|
| Claude Haiku 4.5 | `claude-haiku-4-5` | `claude-haiku-4-5-20251001` | 200K | 64K | Active |
|
|
|
|
### Model Descriptions
|
|
- **Claude Opus 4.8** — The most capable Claude model to date — highly autonomous, state-of-the-art on long-horizon agentic work, knowledge work, and memory; clearer, warmer writing. Same API surface as Opus 4.7 (adaptive thinking only; sampling parameters and `budget_tokens` removed). 1M context window at standard API pricing (no long-context premium). See `shared/model-migration.md` → Migrating to Opus 4.8 — a 4.7 → 4.8 move is a model-ID swap plus prompt re-tuning, no new breaking changes.
|
|
- **Claude Opus 4.7** — Previous-generation Opus. Highly autonomous; strong on long-horizon agentic work, knowledge work, vision, and memory. Adaptive thinking only; sampling parameters and `budget_tokens` removed. 1M context window. See `shared/model-migration.md` → Migrating to Opus 4.7.
|
|
- **Claude Opus 4.6** — Older Opus. Supports adaptive thinking (recommended), 128K max output tokens (requires streaming for large outputs). 1M context window.
|
|
- **Claude Sonnet 4.6** — Our best combination of speed and intelligence. Supports adaptive thinking (recommended). 1M context window. 64K max output tokens.
|
|
- **Claude Haiku 4.5** — Fastest and most cost-effective model for simple tasks.
|
|
|
|
## Legacy Models (still active)
|
|
|
|
| Friendly Name | Alias (use this) | Full ID | Status |
|
|
|-------------------|---------------------|-------------------------------|--------|
|
|
| Claude Opus 4.5 | `claude-opus-4-5` | `claude-opus-4-5-20251101` | Active |
|
|
| Claude Opus 4.1 | `claude-opus-4-1` | `claude-opus-4-1-20250805` | Active |
|
|
| Claude Sonnet 4.5 | `claude-sonnet-4-5` | `claude-sonnet-4-5-20250929` | Active |
|
|
| Claude Sonnet 4 | `claude-sonnet-4-0` | `claude-sonnet-4-20250514` | Active |
|
|
| Claude Opus 4 | `claude-opus-4-0` | `claude-opus-4-20250514` | Active |
|
|
|
|
## Deprecated Models (retiring soon)
|
|
|
|
| Friendly Name | Alias (use this) | Full ID | Status | Retires |
|
|
|-------------------|---------------------|-------------------------------|------------|--------------|
|
|
| Claude Haiku 3 | — | `claude-3-haiku-20240307` | Deprecated | Apr 19, 2026 |
|
|
|
|
## Retired Models (no longer available)
|
|
|
|
| Friendly Name | Full ID | Retired |
|
|
|-------------------|-------------------------------|-------------|
|
|
| Claude Sonnet 3.7 | `claude-3-7-sonnet-20250219` | Feb 19, 2026 |
|
|
| Claude Haiku 3.5 | `claude-3-5-haiku-20241022` | Feb 19, 2026 |
|
|
| Claude Opus 3 | `claude-3-opus-20240229` | Jan 5, 2026 |
|
|
| Claude Sonnet 3.5 | `claude-3-5-sonnet-20241022` | Oct 28, 2025 |
|
|
| Claude Sonnet 3.5 | `claude-3-5-sonnet-20240620` | Oct 28, 2025 |
|
|
| Claude Sonnet 3 | `claude-3-sonnet-20240229` | Jul 21, 2025 |
|
|
| Claude 2.1 | `claude-2.1` | Jul 21, 2025 |
|
|
| Claude 2.0 | `claude-2.0` | Jul 21, 2025 |
|
|
|
|
## Resolving User Requests
|
|
|
|
When a user asks for a model by name, use this table to find the correct model ID:
|
|
|
|
| User says... | Use this model ID |
|
|
|-------------------------------------------|--------------------------------|
|
|
| "opus", "most powerful" | `claude-opus-4-8` |
|
|
| "opus 4.8" | `claude-opus-4-8` |
|
|
| "opus 4.7" | `claude-opus-4-7` |
|
|
| "opus 4.6" | `claude-opus-4-6` |
|
|
| "opus 4.5" | `claude-opus-4-5` |
|
|
| "opus 4.1" | `claude-opus-4-1` |
|
|
| "opus 4", "opus 4.0" | `claude-opus-4-0` (deprecated — suggest `claude-opus-4-8`) |
|
|
| "sonnet", "balanced" | `claude-sonnet-4-6` |
|
|
| "sonnet 4.6" | `claude-sonnet-4-6` |
|
|
| "sonnet 4.5" | `claude-sonnet-4-5` |
|
|
| "sonnet 4", "sonnet 4.0" | `claude-sonnet-4-0` |
|
|
| "sonnet 3.7" | Retired — suggest `claude-sonnet-4-5` |
|
|
| "sonnet 3.5" | Retired — suggest `claude-sonnet-4-5` |
|
|
| "haiku", "fast", "cheap" | `claude-haiku-4-5` |
|
|
| "haiku 4.5" | `claude-haiku-4-5` |
|
|
| "haiku 3.5" | Retired — suggest `claude-haiku-4-5` |
|
|
| "haiku 3" | Deprecated — suggest `claude-haiku-4-5` |
|