@@ -161,11 +161,6 @@ impl AliasResolver {
161161 pub fn list_aliases ( & self ) -> Vec < ( String , String ) > {
162162 let mut aliases = Vec :: new ( ) ;
163163
164- // Add default aliases
165- for ( alias, target) in default_aliases ( ) {
166- aliases. push ( ( alias. clone ( ) , target. clone ( ) ) ) ;
167- }
168-
169164 // Add user aliases (which can override defaults)
170165 for ( alias, target) in & self . user_aliases {
171166 aliases. push ( ( alias. clone ( ) , target. clone ( ) ) ) ;
@@ -210,12 +205,7 @@ impl AliasResolver {
210205 return self . parse_target ( target) ;
211206 }
212207
213- // 3. Check default aliases
214- if let Some ( target) = default_aliases ( ) . get ( & normalized_input) {
215- return self . parse_target ( target) ;
216- }
217-
218- // 4. Try pattern inference (fallback to existing logic)
208+ // 3. Try pattern inference (fallback to existing logic)
219209 self . infer_from_pattern ( input)
220210 }
221211
@@ -295,100 +285,6 @@ pub fn get_global_alias_resolver() -> &'static RwLock<AliasResolver> {
295285 GLOBAL_ALIAS_RESOLVER . get_or_init ( || RwLock :: new ( AliasResolver :: new ( ) ) )
296286}
297287
298- /// Get default built-in aliases
299- /// Returns a map of alias -> canonical provider/model format
300- fn default_aliases ( ) -> & ' static HashMap < String , String > {
301- static DEFAULT_ALIASES : OnceLock < HashMap < String , String > > = OnceLock :: new ( ) ;
302-
303- DEFAULT_ALIASES . get_or_init ( || {
304- let mut aliases = HashMap :: new ( ) ;
305-
306- // === OpenAI Aliases ===
307-
308- // Popular model shortcuts
309- aliases. insert ( "gpt4" . to_string ( ) , "openai/gpt-4" . to_string ( ) ) ;
310- aliases. insert ( "gpt4o" . to_string ( ) , "openai/gpt-4o" . to_string ( ) ) ;
311- aliases. insert ( "gpt4o-mini" . to_string ( ) , "openai/gpt-4o-mini" . to_string ( ) ) ;
312- aliases. insert ( "gpt3" . to_string ( ) , "openai/gpt-3.5-turbo" . to_string ( ) ) ;
313- aliases. insert ( "gpt35" . to_string ( ) , "openai/gpt-3.5-turbo" . to_string ( ) ) ;
314- aliases. insert ( "turbo" . to_string ( ) , "openai/gpt-3.5-turbo" . to_string ( ) ) ;
315- aliases. insert ( "chatgpt" . to_string ( ) , "openai/gpt-4o" . to_string ( ) ) ;
316-
317- // Reasoning models
318- aliases. insert ( "o1" . to_string ( ) , "openai/o1" . to_string ( ) ) ;
319- aliases. insert ( "o1-mini" . to_string ( ) , "openai/o1-mini" . to_string ( ) ) ;
320- aliases. insert ( "o1-preview" . to_string ( ) , "openai/o1-preview" . to_string ( ) ) ;
321-
322- // === Anthropic Aliases ===
323-
324- // Claude shortcuts
325- aliases. insert (
326- "claude" . to_string ( ) ,
327- "anthropic/claude-3-5-sonnet-20241022" . to_string ( ) ,
328- ) ;
329- aliases. insert (
330- "claude3" . to_string ( ) ,
331- "anthropic/claude-3-5-sonnet-20241022" . to_string ( ) ,
332- ) ;
333- aliases. insert (
334- "claude35" . to_string ( ) ,
335- "anthropic/claude-3-5-sonnet-20241022" . to_string ( ) ,
336- ) ;
337- aliases. insert (
338- "sonnet" . to_string ( ) ,
339- "anthropic/claude-3-5-sonnet-20241022" . to_string ( ) ,
340- ) ;
341- aliases. insert (
342- "opus" . to_string ( ) ,
343- "anthropic/claude-3-opus-20240229" . to_string ( ) ,
344- ) ;
345- aliases. insert (
346- "haiku" . to_string ( ) ,
347- "anthropic/claude-3-haiku-20240307" . to_string ( ) ,
348- ) ;
349-
350- // Version-specific shortcuts
351- aliases. insert (
352- "claude-3-sonnet" . to_string ( ) ,
353- "anthropic/claude-3-sonnet-20240229" . to_string ( ) ,
354- ) ;
355- aliases. insert (
356- "claude-3-opus" . to_string ( ) ,
357- "anthropic/claude-3-opus-20240229" . to_string ( ) ,
358- ) ;
359- aliases. insert (
360- "claude-3-haiku" . to_string ( ) ,
361- "anthropic/claude-3-haiku-20240307" . to_string ( ) ,
362- ) ;
363-
364- // === Google Aliases ===
365-
366- // Gemini shortcuts
367- aliases. insert ( "gemini" . to_string ( ) , "google/gemini-1.5-pro" . to_string ( ) ) ;
368- aliases. insert (
369- "gemini-pro" . to_string ( ) ,
370- "google/gemini-2.5-pro" . to_string ( ) ,
371- ) ;
372- aliases. insert (
373- "gemini-flash" . to_string ( ) ,
374- "google/gemini-1.5-flash" . to_string ( ) ,
375- ) ;
376- aliases. insert (
377- "gemini2" . to_string ( ) ,
378- "google/gemini-2.0-flash-exp" . to_string ( ) ,
379- ) ;
380- aliases. insert (
381- "gemini-2" . to_string ( ) ,
382- "google/gemini-2.0-flash-exp" . to_string ( ) ,
383- ) ;
384-
385- // Legacy support
386- aliases. insert ( "bard" . to_string ( ) , "google/gemini-1.5-pro" . to_string ( ) ) ;
387-
388- aliases
389- } )
390- }
391-
392288#[ cfg( test) ]
393289mod tests {
394290 use super :: * ;
0 commit comments