Yash030 Claude Opus 4.7 commited on
Commit
65739aa
·
1 Parent(s): 979bf9b

Add routing debug log to trace provider resolution.

Browse files

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files changed (1) hide show
  1. api/services.py +10 -0
api/services.py CHANGED
@@ -148,6 +148,16 @@ class ClaudeProxyService:
148
  f"No configured models available for '{request_data.model}'"
149
  )
150
 
 
 
 
 
 
 
 
 
 
 
151
  # For 'auto' requests with multiple candidates, we wrap the stream in a failover loop.
152
  if len(candidates) > 1:
153
  return anthropic_sse_streaming_response(
 
148
  f"No configured models available for '{request_data.model}'"
149
  )
150
 
151
+ # Debug log what we're routing to
152
+ from loguru import logger
153
+
154
+ logger.info(
155
+ "REQUEST_MODEL_ROUTING: requested={} resolved_provider={} resolved_model={}",
156
+ request_data.model,
157
+ candidates[0].provider_id,
158
+ candidates[0].provider_model,
159
+ )
160
+
161
  # For 'auto' requests with multiple candidates, we wrap the stream in a failover loop.
162
  if len(candidates) > 1:
163
  return anthropic_sse_streaming_response(