-
-
Notifications
You must be signed in to change notification settings - Fork 38
feat(openrouter): add model catalog integration with searchable picker and tier mapping #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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
…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.
Contributor
|
🎉 This issue has been resolved in version 7.0.0 🎉 The release is available on: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
ccs api create --preset openrouterANTHROPIC_API_KEY=""default for OpenRouter profiles per API requirementsKey Changes
ccs api createcommandTest Plan
ccs api create --preset openrouterinteractive flowANTHROPIC_API_KEY=""is included in new profiles