mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 20:40:52 +08:00
Simplifies routing logic by delegating all provider/mapping/proxy decisions to FallbackHandler. Previously, the route checked for provider/mapping availability before calling the handler, then FallbackHandler performed the same checks again. Changes: - Remove model extraction and provider checking from route (lines 182-201) - Route now only checks if request is POST with /models/ path - FallbackHandler handles provider -> mapping -> proxy fallback - Remove unused internal/util import Benefits: - Eliminates duplicate checks (addresses PR review feedback #2) - Centralizes all provider/mapping logic in FallbackHandler - Reduces routing code by ~20 lines - Aligns with how other /api/provider routes work Performance: No impact (checks still happen once in FallbackHandler)