Skip to content

Improve Google Gemini model display names in UI#7

Open
ctroche99 wants to merge 1 commit into
mainfrom
claude/gemini-model-display-format-uj6jue
Open

Improve Google Gemini model display names in UI#7
ctroche99 wants to merge 1 commit into
mainfrom
claude/gemini-model-display-format-uj6jue

Conversation

@ctroche99

Copy link
Copy Markdown
Owner

Summary

This PR improves the user experience by displaying clean, human-friendly model names in the UI instead of raw model IDs with prefixes.

Key Changes

  • Removed "Google Gemini: " prefix from the pipe name to allow the UI to display only the formatted model name
  • Added _format_model_name() method that transforms raw model IDs into readable display names:
    • Converts hyphens to spaces
    • Capitalizes words appropriately
    • Uppercases known acronyms (TTS, AI, HD, SD, 4K, etc.)
    • Preserves version numbers and numeric tokens as-is
    • Examples: gemini-3.1-pro-previewGemini 3.1 Pro Preview, veo-3.1-generateVeo 3.1 Generate
  • Updated model listing to use the new formatting method instead of relying on the API's display_name field
  • Applied changes consistently across both the __init__ method and the pipes property

Implementation Details

The _format_model_name() method intelligently handles different token types:

  • Pure numeric/version tokens (e.g., "3.1", "001") are preserved unchanged
  • Known acronyms are fully uppercased for better readability
  • All other words are capitalized
  • Empty tokens from consecutive hyphens are filtered out
  • Falls back to the original model ID if no valid tokens are found

https://claude.ai/code/session_01HJ69Q3sp3yibgFKZTNEbgD

Format raw model ids into human-friendly names (e.g.
'gemini-3.1-pro-preview' -> 'Gemini 3.1 Pro Preview') and drop the
redundant 'Google Gemini:' prefix so the UI shows just the clean name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJ69Q3sp3yibgFKZTNEbgD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants