[BUG] Default small_model charges users when free alternative exists on Copilot #4144

Closed
opened 2026-02-16 17:42:47 -05:00 by yindo · 2 comments
Owner

Originally created by @peixotorms on GitHub (Jan 3, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When using GitHub Copilot provider, OpenCode defaults small_model to gemini-3-flash-preview (paid) instead of gpt-5-mini (free). This silently incurs charges for users who have free model options available.

I logged in with GPT 5.2 and my usage of premium requests for Gemini 3 Flash kept increasing.

However, it should default to a free model, like the gpt 5 mini instead of a paid model.
If a large context model is used, then GPT-4.1 is also free, but gpt 5 mini is probably a better fit do to the larger output.

Plugins

No response

OpenCode version

1.0.223

Steps to reproduce

Steps to Reproduce

  1. Login to opencode with GitHub Copilot provider
  2. Select any model (e.g., gpt-5.2)
  3. Use opencode normally
  4. Check GitHub Copilot usage page → unexpected Gemini 3 Flash charges

The Problem

  | Model                  | Used For                | Cost |
  |------------------------|-------------------------|------|
  | gpt-5-mini             | Available but NOT used  | Free |
  | gemini-3-flash-preview | Default for small tasks | Paid |

OpenCode's small_model default picks a paid model when a free alternative (gpt-5-mini) exists in the same provider. Users are charged without knowing why.

Evidence from Logs

  modelID=gemini-3-flash-preview ... small=true agent=title   <- PAID, used silently
  modelID=gpt-5.2 ... small=false agent=build                 <- User's selection

Expected Behavior

  1. Default small_model should prefer free models when available
  2. At minimum, users should be informed that a paid model is being used for background tasks

Suggested Fix

For GitHub Copilot provider, change the default small_model priority to prefer gpt-5-mini (free) over gemini-3-flash-preview (paid).

Workaround

Add to ~/.config/opencode/opencode.jsonc:

  {
    "small_model": "github-copilot/gpt-5-mini"
  }

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @peixotorms on GitHub (Jan 3, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When using GitHub Copilot provider, OpenCode defaults `small_model` to `gemini-3-flash-preview` (paid) instead of `gpt-5-mini `(free). This silently incurs charges for users who have free model options available. I logged in with GPT 5.2 and my usage of premium requests for Gemini 3 Flash kept increasing. However, it should default to a free model, like the gpt 5 mini instead of a paid model. If a large context model is used, then GPT-4.1 is also free, but gpt 5 mini is probably a better fit do to the larger output. [](https://docs.github.com/en/copilot/concepts/billing/copilot-requests) ### Plugins _No response_ ### OpenCode version 1.0.223 ### Steps to reproduce Steps to Reproduce 1. Login to opencode with GitHub Copilot provider 2. Select any model (e.g., gpt-5.2) 3. Use opencode normally 4. Check GitHub Copilot usage page → unexpected Gemini 3 Flash charges The Problem ``` | Model | Used For | Cost | |------------------------|-------------------------|------| | gpt-5-mini | Available but NOT used | Free | | gemini-3-flash-preview | Default for small tasks | Paid | ``` OpenCode's small_model default picks a paid model when a free alternative (gpt-5-mini) exists in the same provider. Users are charged without knowing why. Evidence from Logs ``` modelID=gemini-3-flash-preview ... small=true agent=title <- PAID, used silently modelID=gpt-5.2 ... small=false agent=build <- User's selection ``` Expected Behavior 1. Default small_model should prefer free models when available 2. At minimum, users should be informed that a paid model is being used for background tasks Suggested Fix For GitHub Copilot provider, change the default small_model priority to prefer gpt-5-mini (free) over gemini-3-flash-preview (paid). Workaround Add to `~/.config/opencode/opencode.jsonc`: ``` { "small_model": "github-copilot/gpt-5-mini" } ``` ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugzen labels 2026-02-16 17:42:47 -05:00
yindo closed this issue 2026-02-16 17:42:47 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jan 3, 2026):

ez fix will do

@rekram1-node commented on GitHub (Jan 3, 2026): ez fix will do
Author
Owner

@rekram1-node commented on GitHub (Jan 4, 2026):

should be fixed in next release: https://github.com/anomalyco/opencode/commit/96a00ffea99d2816f513e362e11add5425becbd4

@rekram1-node commented on GitHub (Jan 4, 2026): should be fixed in next release: https://github.com/anomalyco/opencode/commit/96a00ffea99d2816f513e362e11add5425becbd4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4144