You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: use c.ID() at all modelcaps call sites; inject store for testability
Per reviewer request, replace all c.ModelConfig.Provider+"/"+c.ModelConfig.Model
expressions with c.ID() at the modelcaps lookup call sites in every provider.
Also wire store injection so regression tests can verify the full path:
anthropic/client.go:
- Add modelsStore *modelsdev.Store field (nil = use real store)
- Add convertDoc() method routing through store when set, using c.ID()
- convertUserMultiContent now calls c.convertDoc()
anthropic/beta_converter.go:
- convertBetaUserMultiContent calls c.convertDoc()
openai/client.go:
- Add modelsStore field; convertMessages routes through ConvertMessagesFromStore
- Responses API inline call uses c.ID()
oaistream/messages.go:
- Add ConvertMessagesFromStore / ConvertMultiContentFromStore (store-injectable)
- Internal convertMessagesWithStore / convertMultiContentWithStore helpers
dmr, gemini, bedrock:
- Use c.ID() directly
Tests updated:
- anthropic test constructs Client{modelsStore: store} and calls
convertUserMultiContent — image present only if c.ID() is used
- oaistream test calls ConvertMultiContentFromStore with qualified vs
bare ID — image present only when provider prefix is included
0 commit comments