[PR #13283] fix(opencode): prioritize openai small models in getSmallModel #14594

Open
opened 2026-02-16 18:19:22 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13283

State: open
Merged: No


What does this PR do?

Fixed an issue where OpenAI users were seeing gpt-5-nano being used for background tasks (like summarization) instead of OpenAI's own small models... well the getSmallModel logic was missing gpt-4o-mini and gpt-3.5-turbo in its priority list, which caused it to fall back to the global opencode/gpt-5-nano default.

How did you verify your code works?

I wrote a targeted unit test that sets up a mock OpenAI provider. Verified that it now correctly selects gpt-4o-mini as the small model, and correctly falls back to gpt-3.5-turbo if the newer model isn't available.

Fixes #13263

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13283 **State:** open **Merged:** No --- ### What does this PR do? Fixed an issue where OpenAI users were seeing gpt-5-nano being used for background tasks (like summarization) instead of OpenAI's own small models... well the `getSmallModel` logic was missing gpt-4o-mini and gpt-3.5-turbo in its priority list, which caused it to fall back to the global opencode/gpt-5-nano default. ### How did you verify your code works? I wrote a targeted unit test that sets up a mock OpenAI provider. Verified that it now correctly selects gpt-4o-mini as the small model, and correctly falls back to gpt-3.5-turbo if the newer model isn't available. Fixes #13263
yindo added the pull-request label 2026-02-16 18:19:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14594