Session env info reports wrong Haiku 4.5 model ID (dated snapshot instead of alias)
Description
The session environment info that Claude Code injects at the start of every conversation reports the Haiku 4.5 model ID as the dated snapshot:
Haiku 4.5: 'claude-haiku-4-5-20251001'
However, this dated ID is not on my account/API key's model allowlist and fails with a 401 when used via --model:
$ claude --model claude-haiku-4-5-20251001 -p "hi"
Failed to authenticate. API Error: 401 key not allowed to access model.
This key can only access models=['claude-sonnet-4-6', 'claude-opus-4-7', 'claude-opus-4-6',
'claude-haiku-4-5', 'claude-sonnet-5', 'claude-opus-4-8']. Tried to access claude-haiku-4-5-20251001
Using the alias instead works fine:
$ claude --model claude-haiku-4-5 -p "hi"
OK
The other models reported in the same environment-info block (claude-fable-5, claude-opus-4-8, claude-sonnet-5) all work as given — only the Haiku 4.5 entry uses a dated ID instead of the alias, which is inconsistent with the rest of the list and breaks for API keys that only permit the alias.
Steps to reproduce
- Start a Claude Code session and note the environment info line reporting Haiku 4.5's model ID.
- Run
claude --model claude-haiku-4-5-20251001 -p "hi". - Observe the 401 error.
- Run
claude --model claude-haiku-4-5 -p "hi"instead — succeeds.
Expected behavior
The session environment info should report the alias claude-haiku-4-5 for Haiku 4.5, consistent with how Fable 5, Opus 4.8, and Sonnet 5 are reported (all aliases, no dated suffix).
Environment
- Claude Code version: 2.1.197
- OS: macOS (Darwin 25.5.0)