mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-21 09:28:00 +00:00
fix(gateway): record actual served model for image requests
handleImage recorded the raw request model id, so AUTO image generations showed up as model=AUTO in the request records and by-model aggregates instead of the image model actually served (e.g. Kwai-Kolors/Kolors). UnifiedResponse gains an optional Model field; Provider.Image fills it with the resolved id (AUTO resolves to the source's best image model), and handleImage prefers it when writing the audit record.
This commit is contained in:
@ -71,6 +71,7 @@ type ToolCall struct {
|
||||
// ---- Unified internal representation (what adapters produce) ----
|
||||
|
||||
type UnifiedResponse struct {
|
||||
Model string `json:"model,omitempty"`
|
||||
Content string `json:"content"`
|
||||
ReasoningContent string `json:"reasoning_content,omitempty"`
|
||||
FinishReason string `json:"finish_reason,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user