-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Open
Description
Summary
When the small model used for session auto-naming (e.g., gpt-5-nano) is disabled in the provider configuration, sessions fail to get auto-named silently without any user feedback. Users are left with "New session - timestamp" titles without understanding why.
Current Behavior
- OpenCode attempts to use a small model (e.g., gpt-5-nano) for session title generation
- When the model is disabled in the provider settings, the API returns a 401 error:
{"type":"error","error":{"type":"ModelError","message":"Model is disabled"}} - The error is logged but no user-facing notification is shown
- Sessions remain with default timestamp-based names
- Users have no indication that title generation failed or why
Expected Behavior
When session auto-naming fails due to a disabled model, OpenCode should:
- Show a toast notification or error message indicating the issue
- Suggest that the user either:
- Re-enable the model in their provider configuration
- Configure a different small model for title generation
- Optionally, attempt to fall back to another available small model automatically
Steps to Reproduce
- Configure OpenCode with OpenCode Zen provider
- Disable gpt-5-nano (or whichever model is used for title generation) in your Zen configuration
- Create a new session and send a message
- Observe that the session remains named "New session - timestamp"
- Check logs to see repeated title generation failures
Log Evidence
ERROR service=llm providerID=opencode modelID=gpt-5-nano sessionID=ses_xxx small=true agent=title
error={"error":{"name":"AI_APICallError","statusCode":401,
"responseBody":"{"type":"error","error":{"type":"ModelError","message":"Model is disabled"}}"}}
Environment
- OpenCode version: 1.1.30
- Provider: OpenCode Zen
- OS: macOS 15.7.1
Suggested Solution
Add user-facing error handling for title generation failures:
- Show a dismissible toast notification when title generation fails
- Include the specific error reason (e.g., "Model disabled", "API error")
- Provide actionable guidance (e.g., "Check your provider settings" or "Enable gpt-5-nano")
- Consider implementing automatic fallback to alternative small models
Related
This is different from #4040 which was specifically about GitHub Copilot filtering out Claude Haiku. This issue is about general error visibility when any small model is unavailable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels