DUP-CROSS-2: provider/model key construction repeated across Go and TypeScript #51
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The pattern
provider + "/" + model(with checks for both being non-empty) is used to build a canonical model key in at least 5 places:Go (
internal/db/stats.go):scanDashboardRowsGetModelUsageGetNewAssistantMessagesTypeScript (
frontend/src/lib/):sessionStatus.tsline 51 (formatModelRef)api.tslines 207–217 (model param builder, bypassingformatModelRef)Fix
func modelKey(provider, model string) string(alongside the existingextractModelProviderinstats.go)formatModelRefconsistently (the api.ts param builder should call it)Effort
Low.