Show error message when session auto-naming fails due to disabled small model #7117

Open
opened 2026-02-16 18:06:14 -05:00 by yindo · 1 comment
Owner

Originally created by @soyllamas on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

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:

  1. Show a toast notification or error message indicating the issue
  2. Suggest that the user either:
    • Re-enable the model in their provider configuration
    • Configure a different small model for title generation
  3. Optionally, attempt to fall back to another available small model automatically

Steps to Reproduce

  1. Configure OpenCode with OpenCode Zen provider
  2. Disable gpt-5-nano (or whichever model is used for title generation) in your Zen configuration
  3. Create a new session and send a message
  4. Observe that the session remains named "New session - timestamp"
  5. 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.

Originally created by @soyllamas on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. # 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: 1. Show a toast notification or error message indicating the issue 2. Suggest that the user either: - Re-enable the model in their provider configuration - Configure a different small model for title generation 3. Optionally, attempt to fall back to another available small model automatically # Steps to Reproduce 1. Configure OpenCode with OpenCode Zen provider 2. Disable gpt-5-nano (or whichever model is used for title generation) in your Zen configuration 3. Create a new session and send a message 4. Observe that the session remains named "New session - timestamp" 5. 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.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9460: [Sessions] Title generation is requested on every message - related to session title generation issues
  • #8609: Missleading documentation or incorrect behaviour about small_model - discusses small_model configuration and behavior
  • #4040: Session auto naming - discusses session auto-naming functionality

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #9460: [Sessions] Title generation is requested on every message - related to session title generation issues - #8609: Missleading documentation or incorrect behaviour about small_model - discusses small_model configuration and behavior - #4040: Session auto naming - discusses session auto-naming functionality Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7117