Commit Graph

1 Commits

Author SHA1 Message Date
longkeyy
18fc5fc0be feat: implement model alias system for unified model names
- Add comprehensive model alias mapping system in relay/model/alias.go
- Support standard model names (gpt-4o, claude-3-sonnet) across different channels
- Modify AddAbilities() to create aliases for both standard and channel-specific names
- Update text processing to resolve aliases before channel-specific mapping
- Enhance billing system to support alias-based model ratio lookup
- Add comprehensive tests for alias resolution and reverse mapping
- Support major providers: OpenRouter, Anthropic, Gemini, Groq

This allows users to use consistent model names (e.g., 'gpt-4o')
regardless of channel provider, with automatic mapping to
channel-specific names (e.g., 'openai/gpt-4o' for OpenRouter).
2025-08-27 02:24:38 +08:00