Compare commits
2 Commits
2f6b7deb2c
...
e56a284415
| Author | SHA1 | Date | |
|---|---|---|---|
| e56a284415 | |||
| cbc9eeb453 |
@@ -5,7 +5,7 @@
|
|||||||
- [x] Database schema & migrations (hardcoded in `db.go`)
|
- [x] Database schema & migrations (hardcoded in `db.go`)
|
||||||
- [x] Configuration loader (Viper)
|
- [x] Configuration loader (Viper)
|
||||||
- [x] Auth Middleware (scoped to `/v1`)
|
- [x] Auth Middleware (scoped to `/v1`)
|
||||||
- [x] Basic Provider implementations (OpenAI, Gemini, DeepSeek, Grok)
|
- [x] Basic Provider implementations (OpenAI, Gemini, DeepSeek, Grok, Ollama)
|
||||||
- [x] Streaming Support (SSE & Gemini custom streaming)
|
- [x] Streaming Support (SSE & Gemini custom streaming)
|
||||||
- [x] Archive Rust files to `rust` branch
|
- [x] Archive Rust files to `rust` branch
|
||||||
- [x] Clean root and set Go version as `main`
|
- [x] Clean root and set Go version as `main`
|
||||||
@@ -47,6 +47,12 @@
|
|||||||
- [x] Multimodal support
|
- [x] Multimodal support
|
||||||
- [x] Accurate usage parsing (via OpenAI helper)
|
- [x] Accurate usage parsing (via OpenAI helper)
|
||||||
|
|
||||||
|
### Ollama Provider
|
||||||
|
- [x] OpenAI-compatible API integration
|
||||||
|
- [x] Streaming support
|
||||||
|
- [x] Model pattern detection for routing
|
||||||
|
- [x] Zero cost calculation (local/free models)
|
||||||
|
|
||||||
## Infrastructure & Middleware
|
## Infrastructure & Middleware
|
||||||
- [ ] Implement Rate Limiting (`golang.org/x/time/rate`)
|
- [ ] Implement Rate Limiting (`golang.org/x/time/rate`)
|
||||||
- [ ] Implement Circuit Breaker (`github.com/sony/gobreaker`)
|
- [ ] Implement Circuit Breaker (`github.com/sony/gobreaker`)
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ func (s *Server) handleListModels(c *gin.Context) {
|
|||||||
"deepseek": true,
|
"deepseek": true,
|
||||||
"moonshot": true,
|
"moonshot": true,
|
||||||
"xai": true, // Models from models.dev use 'xai' ID for Grok
|
"xai": true, // Models from models.dev use 'xai' ID for Grok
|
||||||
|
"ollama": true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.registry != nil {
|
if s.registry != nil {
|
||||||
@@ -294,6 +295,8 @@ func (s *Server) handleChatCompletions(c *gin.Context) {
|
|||||||
providerName = "moonshot"
|
providerName = "moonshot"
|
||||||
} else if strings.Contains(req.Model, "grok") {
|
} else if strings.Contains(req.Model, "grok") {
|
||||||
providerName = "grok"
|
providerName = "grok"
|
||||||
|
} else if strings.Contains(req.Model, "glm-") || strings.Contains(req.Model, "qwen") || strings.Contains(req.Model, "gemma") || strings.Contains(req.Model, "llama") || strings.Contains(req.Model, "mistral") || strings.Contains(req.Model, "codellama") {
|
||||||
|
providerName = "ollama"
|
||||||
}
|
}
|
||||||
|
|
||||||
provider, ok := s.providers[providerName]
|
provider, ok := s.providers[providerName]
|
||||||
|
|||||||
Reference in New Issue
Block a user