Skip to content

Conversation

@kaitranntt
Copy link
Owner

Summary

  • Add OpenRouter model catalog with searchable picker, category filters, and pricing display
  • Implement model tier mapping (Opus/Sonnet/Haiku) with preset suggestions
  • Integrate catalog into profile creation dialog and editor
  • Add CLI interactive model picker with ccs api create --preset openrouter
  • Prioritize Exacto models (optimized for agentic/tool use) and show newest models per provider
  • Add ANTHROPIC_API_KEY="" default for OpenRouter profiles per API requirements
  • Refactor profile create dialog with provider preset categories
  • Remove deprecated secrets.yaml architecture

Key Changes

  • UI: OpenRouter model picker with search, categories (Anthropic, OpenAI, Google, Meta, Mistral, Open Source), pricing, and context length
  • UI: Model tier mapping component with presets and "Same for all" checkbox
  • UI: Streamlined OpenRouter profile editor showing all env vars except API key
  • CLI: Interactive model picker in ccs api create command
  • API: New services for OpenRouter catalog fetching and caching (24hr TTL)
  • Config: Removed secrets.yaml in favor of unified config

Test Plan

  • Create OpenRouter profile via UI with model picker
  • Verify tier mapping updates all 4 env vars atomically
  • Test model search and category filters
  • Test ccs api create --preset openrouter interactive flow
  • Verify Exacto models appear before regular models
  • Confirm ANTHROPIC_API_KEY="" is included in new profiles

- add openrouter-types.ts with API type definitions

- add openrouter-utils.ts with search, pricing, caching utils

- add use-openrouter-models.ts React Query hook with 24h cache

- copy openrouter.svg icon to public/icons/
- add openrouter-badge.tsx with orange-themed badge

- add openrouter-model-picker.tsx with search and category filters

- add model-tier-mapping.tsx with collapsible tier editor

- update barrel exports in profiles/index.ts
- add isOpenRouterProfile() detection in utils.ts

- show OpenRouterBadge in header when detected

- replace model input with picker for OpenRouter profiles

- add tier mapping section in friendly-ui-section.tsx

- show OpenRouter icon in profile-card.tsx

- prefetch models on api.tsx page load
- add openrouter-catalog.ts with fetcher and 24h file cache

- add openrouter-picker.ts with interactive search UI

- detect OpenRouter URL in api-command.ts handleCreate()

- offer interactive browse when no --model flag provided

- support tier mapping configuration (opus/sonnet/haiku)
- add created timestamp field to OpenRouterModel type
- add getNewestModelsPerProvider() for dynamic newest models
- add formatModelAge() for relative time display (e.g., "2d ago")
- show newest models section in picker when no search query
- sort search results by created date (newest first)
- add provider-presets.ts with OpenRouter/GLM/GLMT/Kimi configs
- add OpenRouterBanner for announcement header
- add OpenRouterPromoCard for sidebar promotion
- add OpenRouterQuickStart for default right panel
- export new components from profiles index
- add preset cards grid (OpenRouter, GLM, GLMT, Kimi, Custom)
- add model search picker for OpenRouter with newest-first sorting
- auto-fill form fields when preset selected
- show API key hints from preset config
- skip model prompts for preset profiles
- remove auto-select of first profile behavior
- show QuickStart panel when no profile selected
- users now click profile to see details
- ensures OpenRouter promo visible for existing users
- add provider-presets.ts with OpenRouter/GLM/GLMT/Kimi configs
- add --preset flag for quick profile creation
- auto-fill name, base URL, model from preset
- show preset info and API key hints
- update help with preset documentation and examples
BREAKING CHANGE: GLM/GLMT/Kimi profiles no longer auto-created

- remove glm.settings.json auto-creation
- remove glmt.settings.json auto-creation
- remove kimi.settings.json auto-creation
- config.json now starts with empty profiles
- users create via: ccs api create --preset glm
- or via UI: Profile Create Dialog → Provider Presets
- existing profiles preserved for backward compatibility
- update postinstall tests to expect empty profiles
- add test verifying GLM/GLMT/Kimi not auto-created
- update CLI profile tests to handle optional profiles
- remove hardcoded GLM profile expectations
- profile-reader: fix isApiProfileConfigured to check settings.json fallback
- profile-reader: exclude 'default' profile (native Claude) from listings
- profile-routes: use createApiProfile/removeApiProfile services
- provider-presets: add category field (recommended/alternative)
- recovery-manager: remove auto-creation of GLM/GLMT/Kimi profiles
- Add PresetCategory type (recommended/alternative)
- Categorize OpenRouter as recommended, GLM/GLMT/Kimi as alternative
- Add getPresetsByCategory() helper for filtering
- Change GLM badge from 'Free' to 'Z.AI' for clarity
- openrouter-badge: use accent/accent-foreground tokens
- openrouter-banner: use accent gradient colors
- openrouter-model-picker: use accent for sparkles and badges
- openrouter-promo-card: use accent for backgrounds and text
- openrouter-quick-start: use accent for icons, buttons, links

Theme-aware colors for better dark mode support and customization.
- Split presets into recommended (OpenRouter) + alternative (GLM/GLMT/Kimi)
- Show alternative presets only when Custom is selected
- Replace PresetCard with CompactPresetCard (horizontal layout)
- Make baseUrl always editable (pre-filled from preset but customizable)
- Apply model selection to all 4 model tiers (opus/sonnet/haiku)
- Only show URL path warnings for truly custom URLs, not preset URLs
- Use accent tokens for consistent theming
- delete secrets-manager.ts entirely

- remove secrets API routes and client methods

- simplify unified-config-types (remove vault/secrets)

- update profile-reader to remove secrets loading

- clean up unused hooks and API client methods
- redesign friendly-ui-section with OpenRouter-specific view

- add model selection, tier mapping, API key sections

- compact ModelItem layout for better space efficiency

- add onEnvBulkChange prop for atomic env updates
- override inline display:table style causing content expansion

- force min-width:0 on viewport child div
- Add ANTHROPIC_AUTH_TOKEN to openRouterManagedKeys set
- Change collapsible section from "All Environment Variables" to "Additional Variables"
- Only show non-managed env vars in the collapsible section
- Restore "Add Environment Variable" input at bottom of OpenRouter view
- Add newEnvValue state to profile editor
- Update add variable section to include key + value inputs
- Apply to both OpenRouter and standard profile editors
- Clear both key and value after adding variable
- Add updateEnvBulk function for atomic multi-key updates
- Pass onEnvBulkChange prop to FriendlyUISection
- Fixes race condition where only last tier (haiku) was updated


Update OPENROUTER_BASE_URL in provider presets (CLI and UI) which is
used as ANTHROPIC_BASE_URL when creating OpenRouter profiles.
…ance

- Add isExacto field to CategorizedModel for models with :exacto suffix
- Add sortModelsByPriority function (Free > Exacto > Regular)
- Apply priority sorting within each category in model picker
- Add visual "Exacto" badge (green outline) for exacto variants

Exacto models are OpenRouter's specialized variants optimized for
tool use and agentic behaviors, recommended for Claude Code.
…iles

Per OpenRouter requirements, explicitly blank out the Anthropic API key
to prevent conflicts when using OpenRouter's API. The key is visible in
the "Additional Variables" section of the profile editor.
…bles

Only hide ANTHROPIC_AUTH_TOKEN (has dedicated input). Show all other
env vars (BASE_URL, MODEL, tier models, API_KEY, etc.) in the
"Additional Variables" section for full visibility.
@kaitranntt kaitranntt merged commit 13dd561 into dev Dec 21, 2025
2 checks passed
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

@kaitranntt kaitranntt deleted the kai/feat/openrouter-model-catalog branch December 21, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants