modelKey returns the map key for a provider+model pair.
(provider, model string)
| 123 | |
| 124 | // modelKey returns the map key for a provider+model pair. |
| 125 | func modelKey(provider, model string) string { |
| 126 | return strings.ToLower(provider) + ":" + strings.ToLower(model) |
| 127 | } |
| 128 | |
| 129 | // RecordRealUsage records actual token usage from an API response. |
| 130 | // This is the preferred path — provides accurate cost tracking. |