mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
feat: add intelligent backend routing and model service
- Add modelService for centralized model management - Support dynamic model list from config file (data/supported_models.json) - Include 2025 latest models: GPT-4.1, o3, o4-mini, Gemini 2.5, etc. - File watcher for hot-reload configuration changes - Improve model detection logic in api.js - Priority: modelService lookup → prefix matching fallback - Smart backend routing based on model provider - Add intelligent routing endpoints - /v1/chat/completions: unified OpenAI-compatible endpoint - /v1/completions: legacy format support - Auto-route to Claude/OpenAI/Gemini based on requested model - Add Xcode system prompt support in openaiToClaude - Detect and preserve Xcode-specific system messages - Export handler functions for reuse - openaiClaudeRoutes: export handleChatCompletion - openaiRoutes: export handleResponses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -919,3 +919,4 @@ router.get('/key-info', authenticateApiKey, async (req, res) => {
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
module.exports.handleResponses = handleResponses
|
||||
|
||||
Reference in New Issue
Block a user