@@ -58,30 +58,31 @@ type tgAdminRoute struct {
5858}
5959
6060type tgAdminModel struct {
61- ID string `json:"id"`
62- Provider string `json:"provider"`
63- PromptPrice float64 `json:"prompt_price"`
64- CompletionPrice float64 `json:"completion_price"`
65- ContextLength int `json:"context_length"`
66- Vision bool `json:"vision"`
67- Tools bool `json:"tools"`
68- Reasoning bool `json:"reasoning"`
69- Free bool `json:"free"`
70- Score float64 `json:"score"`
71- AgenticIndex float64 `json:"agentic_index"`
72- SpeedTPS float64 `json:"speed_tps"`
73- TTFT float64 `json:"ttft"`
74- ValuePerDollar float64 `json:"value_per_dollar"`
75- Recommended bool `json:"recommended"`
76- Current bool `json:"current"`
77- Source string `json:"source,omitempty"`
78- Policy string `json:"policy,omitempty"`
79- Reasons []string `json:"reasons,omitempty"`
80- Warnings []string `json:"warnings,omitempty"`
81- CheckStatus string `json:"check_status,omitempty"`
82- CheckedAt string `json:"checked_at,omitempty"`
83- CheckLatencyMS int64 `json:"check_latency_ms,omitempty"`
84- CheckError string `json:"check_error,omitempty"`
61+ ID string `json:"id"`
62+ Provider string `json:"provider"`
63+ PromptPrice float64 `json:"prompt_price"`
64+ CompletionPrice float64 `json:"completion_price"`
65+ ContextLength int `json:"context_length"`
66+ Vision bool `json:"vision"`
67+ Tools bool `json:"tools"`
68+ Reasoning bool `json:"reasoning"`
69+ Free bool `json:"free"`
70+ Score float64 `json:"score"`
71+ AgenticIndex float64 `json:"agentic_index"`
72+ SpeedTPS float64 `json:"speed_tps"`
73+ TTFT float64 `json:"ttft"`
74+ ValuePerDollar float64 `json:"value_per_dollar"`
75+ Recommended bool `json:"recommended"`
76+ Current bool `json:"current"`
77+ Source string `json:"source,omitempty"`
78+ Policy string `json:"policy,omitempty"`
79+ Reasons []string `json:"reasons,omitempty"`
80+ Warnings []string `json:"warnings,omitempty"`
81+ Telemetry modelTelemetry `json:"telemetry,omitempty"`
82+ CheckStatus string `json:"check_status,omitempty"`
83+ CheckedAt string `json:"checked_at,omitempty"`
84+ CheckLatencyMS int64 `json:"check_latency_ms,omitempty"`
85+ CheckError string `json:"check_error,omitempty"`
8586}
8687
8788type tgAdminModelsResponse struct {
@@ -431,6 +432,7 @@ func (s *Server) buildTGAdminModels(ctx context.Context, role, provider, query s
431432 if len (models ) == 0 {
432433 models = tgAdminBrowseModels (allCaps , aaModels , query , role )
433434 }
435+ attachModelTelemetry (models , s .loadModelTelemetry (ctx5 , provider ))
434436 models = filterBlockedFreeModels (models , provider , checks )
435437 resp .Recommended = recommendedMode
436438 if len (models ) > limit {
@@ -596,6 +598,7 @@ func tgModelFromUI(provider string, m uiModel, current string, checks map[string
596598 Policy : m .Policy ,
597599 Reasons : m .Reasons ,
598600 Warnings : m .Warnings ,
601+ Telemetry : m .Telemetry ,
599602 CheckStatus : check .Status ,
600603 CheckedAt : check .CheckedAt ,
601604 CheckLatencyMS : check .LatencyMS ,
0 commit comments