feat(phase2): complete openai api surfaces 2.3-2.7
- 2.3: unknown model errors (400 + RFC 9457 problem+json with valid_models) - 2.5: GET /v1/models endpoint (derived from config, not hardcoded) - 2.6: POST /v1/embeddings passthrough (body-based dispatch, no rewrite) - 2.7: POST /v1/rerank with path rewrite (/v1/rerank → /rerank) - wire proxy.Handler in main.go (was using dummy handler) - 140+ tests passing, race detector clean - all requests: client → nginx → gateway → upstreams - ready for config deployment to go live
This commit is contained in:
+3
-5
@@ -10,6 +10,7 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/Riotpiaole/homelab-frontend/internal/config"
|
||||
"github.com/Riotpiaole/homelab-frontend/internal/proxy"
|
||||
"github.com/Riotpiaole/homelab-frontend/internal/server"
|
||||
)
|
||||
|
||||
@@ -30,11 +31,8 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Create a basic handler (will be replaced with real routing later)
|
||||
upstreamHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
fmt.Fprintf(w, "not found")
|
||||
})
|
||||
// Create the reverse proxy handler that routes requests based on configuration
|
||||
upstreamHandler := proxy.New(cfg)
|
||||
|
||||
// Create server with health checker
|
||||
srv := server.New(cfg.ListenAddr, cfg.ShutdownTimeout, nil)
|
||||
|
||||
Reference in New Issue
Block a user