You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use config alias/name instead of API model ID in system prompt environment block #36164
When users ask “What model are you using?”, the assistant answers with the internal API ID (e.g. claude-sonnet-4-20250514) instead of the config alias (my-sonnet) or display name (My Sonnet Alias).
This makes alias configuration inconsistent: users configure friendly names in config, but the model is explicitly told to identify itself by the raw provider ID.
Session metadata and the TUI already use the alias and display name. However, the system prompt in SystemPrompt.environment() always injects the API model ID:
// packages/opencode/src/session/system.ts:65 You are powered by the model named ${model.api.id}. The exact model ID is ${model.providerID}/${model.api.id}
Plugins
No response
OpenCode version
1.17.10
Steps to reproduce
Add a model alias in opencode.json (see above).
Start a session with anthropic/my-sonnet.
Ask: “What model are you currently using?”
Expected: My Sonnet Alias or anthropic/my-sonnet
Actual: claude-sonnet-4-20250514 or anthropic/claude-sonnet-4-20250514
Activity
github-actions commentedon Jul 9, 2026
This issue might be a duplicate of existing issues. Please check:
api.idbeing overloaded and the alias/config name not being surfaced properly to the model.github-actions commentedon Sep 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.