From 433a8e563b9506c6b42bba5e0250545f228228e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 27 Mar 2026 01:18:29 +0100 Subject: [PATCH] Fall back to OpenAI backend for unknown models The Anthropic models are all `claude-` prefixed and already caught by the providerPatterns list, so any unknown model is likely to be a custom model provided by an OpenAI compatible endpoint. --- proxy/internal/service/model_router.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/internal/service/model_router.go b/proxy/internal/service/model_router.go index 9322a3a4..2ce80a2d 100644 --- a/proxy/internal/service/model_router.go +++ b/proxy/internal/service/model_router.go @@ -226,7 +226,8 @@ func (r *ModelRouter) getProviderNameForModel(model string) string { return pattern.provider } } - // Default to anthropic (this is an Anthropic proxy after all) - r.logger.Printf("ℹ️ Model '%s' has no matching pattern, defaulting to anthropic", model) - return "anthropic" + // Default to OpenAI, as Anthropic models are covered by the providerPatterns, + // and other unknown models are likely served by custom OpenAI compatible + // backends. + return "openai" }