Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/cliproxy/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ func (s *Service) registerModelsForAuth(a *coreauth.Auth) {
models = registry.GetCodexProModels()
case "plus":
models = registry.GetCodexPlusModels()
case "team":
case "team", "business":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change correctly handles the 'business' plan type, this part of the model registration logic appears to be untested. To ensure the correctness of this new addition and prevent future regressions, it would be beneficial to add a unit test.

You could create a test that:

  1. Initializes a Service.
  2. Creates a coreauth.Auth object with Provider: "codex" and Attributes: map[string]string{"plan_type": "business"}.
  3. Calls service.registerModelsForAuth() with this auth object.
  4. Asserts that the models from registry.GetCodexTeamModels() are registered for the auth ID in the GlobalModelRegistry().

This would provide good test coverage for the change.

models = registry.GetCodexTeamModels()
case "free":
models = registry.GetCodexFreeModels()
Expand Down
Loading