Update model IDs to 5.x: claude-profile drivers, agent-subscriptions probe

Claude-Session: https://claude.ai/code/session_01SCd4vYV3ig6CpcPV9PCsC6
This commit is contained in:
Paul O'Reilly
2026-10-13 10:17:01 +13:00
parent 3461453c5f
commit d6e0220bf5
4 changed files with 10 additions and 10 deletions

View File

@@ -135,7 +135,7 @@ def probe_anthropic(token: str) -> tuple[dict[str, float], dict[str, int]] | Non
try:
body = json.dumps({
"model": "claude-haiku-4-5-20251001",
"model": "claude-haiku-5-5",
"max_tokens": 1,
"messages": [{"role": "user", "content": "hi"}],
}).encode()

View File

@@ -34,11 +34,11 @@ fi
# Driver logical name -> Anthropic model ID
driver_model_id() {
case "$1" in
haiku) echo "claude-haiku-4-5-20251001" ;;
haiku) echo "claude-haiku-5-5" ;;
sonnet) echo "claude-sonnet-5-5" ;;
opus) echo "claude-opus-4-8" ;;
opus-1m) echo "claude-opus-4-8[1m]" ;;
fable) echo "claude-fable-5" ;;
opus) echo "claude-opus-5-5" ;;
opus-1m) echo "claude-opus-5-5[1m]" ;;
fable) echo "claude-fable-5-1" ;;
*) err "Unknown driver '$1'. Valid: haiku sonnet opus opus-1m fable" ;;
esac
}

View File

@@ -25,7 +25,7 @@ The default mode (no flag) prints a coloured table suitable for terminals.
- Read `anthropic-ratelimit-unified-5h-utilization` and `anthropic-ratelimit-unified-7d-utilization` (fractions 0.0–1.0; multiply by 100 for percentage).
- Read `anthropic-ratelimit-unified-5h-reset` and `anthropic-ratelimit-unified-7d-reset`. Values are **Unix epoch seconds** (integer string).
- Source: https://platform.claude.com/docs/en/api/rate-limits and https://github.com/anthropics/claude-code/issues/12829 (example values `1764554400`, `1764615600`).
- If headers absent, fall back: `POST https://api.anthropic.com/v1/messages` with model `claude-haiku-4-5-20251001`, `max_tokens=1`, message `"hi"` — same headers on response (or on the HTTPError if 429).
- If headers absent, fall back: `POST https://api.anthropic.com/v1/messages` with model `claude-haiku-5-5`, `max_tokens=1`, message `"hi"` — same headers on response (or on the HTTPError if 429).
3. Read the MiniMax API key from `~/dev/claude/projects/agent-runtime-secrets/providers/minimax/v1/provider.sops.env` via `sops --decrypt --output-type dotenv` (key: `ANTHROPIC_AUTH_TOKEN`). Uses `SOPS_AGE_KEY_FILE=~/dev/claude/secrets/sops/provider-age-key.txt`.
4. Probe MiniMax subscription usage and reset times:
- `GET https://www.minimax.io/v1/token_plan/remains` with `Authorization: Bearer <key>` and `User-Agent: curl/7.88.1` (minimax.io blocks Python-urllib default UA).

View File

@@ -62,11 +62,11 @@ The model ID is determined by combining the mode's `driver` field with the profi
| Driver | Model ID |
|---|---|
| `haiku` | `claude-haiku-4-5-20251001` |
| `haiku` | `claude-haiku-5-5` |
| `sonnet` | `claude-sonnet-5-5` |
| `opus` | `claude-opus-4-8` |
| `opus-1m` | `claude-opus-4-8[1m]` (Opus 4.8 has 1M context natively; `opus-1m` is retained for the `[1m]` launch convention) |
| `fable` | `claude-fable-5` |
| `opus` | `claude-opus-5-5` |
| `opus-1m` | `claude-opus-5-5[1m]` (Opus 5.5 has 1M context natively; `opus-1m` is retained for the `[1m]` launch convention) |
| `fable` | `claude-fable-5-1` |
2. If `$CLAUDE_CONFIG_DIR/provider.env` exists, parse it. If it contains a `MODEL_ID` entry, use that instead of the hardcoded default.