File tree Expand file tree Collapse file tree 7 files changed +12
-9
lines changed
workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input Expand file tree Collapse file tree 7 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ const ChatMessageSchema = z.object({
6464 'claude-4.5-opus' ,
6565 'claude-4.1-opus' ,
6666 'gemini-3-pro' ,
67+ 'litellm' ,
6768 ] )
6869 . optional ( )
6970 . default ( 'claude-4.5-opus' ) ,
Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ export const MODEL_OPTIONS = [
241241 { value : 'gpt-5.2-codex' , label : 'GPT 5.2 Codex' } ,
242242 { value : 'gpt-5.2-pro' , label : 'GPT 5.2 Pro' } ,
243243 { value : 'gemini-3-pro' , label : 'Gemini 3 Pro' } ,
244+ { value : 'litellm' , label : 'LiteLLM' } ,
244245] as const
245246
246247/**
Original file line number Diff line number Diff line change @@ -3683,14 +3683,9 @@ export function LiteLLMIcon(props: SVGProps<SVGSVGElement>) {
36833683 return (
36843684 < svg { ...props } viewBox = '0 0 24 24' xmlns = 'http://www.w3.org/2000/svg' >
36853685 < title > LiteLLM</ title >
3686- < path
3687- d = 'M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'
3688- stroke = '#10B981'
3689- strokeWidth = '2'
3690- strokeLinecap = 'round'
3691- strokeLinejoin = 'round'
3692- fill = 'none'
3693- />
3686+ < text x = '12' y = '17' fontSize = '16' textAnchor = 'middle' dominantBaseline = 'middle' >
3687+ 🚅
3688+ </ text >
36943689 </ svg >
36953690 )
36963691}
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ export interface SendMessageRequest {
8989 | 'claude-4.5-opus'
9090 | 'claude-4.1-opus'
9191 | 'gemini-3-pro'
92+ | 'litellm'
9293 prefetch ?: boolean
9394 createNewChat ?: boolean
9495 stream ?: boolean
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const VALID_PROVIDER_IDS: readonly ProviderId[] = [
1919 'mistral' ,
2020 'groq' ,
2121 'ollama' ,
22+ 'litellm' ,
2223] as const
2324
2425/**
Original file line number Diff line number Diff line change @@ -170,7 +170,10 @@ export function getProviderFromModel(model: string): ProviderId {
170170
171171 let providerId : ProviderId | null = null
172172
173- if ( normalizedModel in getAllModelProviders ( ) ) {
173+ // Check if the model is actually a provider ID (e.g., "litellm" from copilot selector)
174+ if ( normalizedModel in providers ) {
175+ providerId = normalizedModel as ProviderId
176+ } else if ( normalizedModel in getAllModelProviders ( ) ) {
174177 providerId = getAllModelProviders ( ) [ normalizedModel ]
175178 } else {
176179 for ( const [ id , config ] of Object . entries ( providers ) ) {
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ export interface CopilotState {
118118 | 'claude-4.5-opus'
119119 | 'claude-4.1-opus'
120120 | 'gemini-3-pro'
121+ | 'litellm'
121122 agentPrefetch : boolean
122123 enabledModels : string [ ] | null // Null means not loaded yet, array of model IDs when loaded
123124 isCollapsed : boolean
You can’t perform that action at this time.
0 commit comments