Skip to content

fix: subir el limite de salida de 16k a 32k (v1.0.4) - #5

Merged
JoshRob297 merged 1 commit into
mainfrom
fix/output-limit
Oct 20, 2026
Merged

JoshRob297 merged 1 commit into
mainfrom
fix/output-limit

Conversation

@JoshRob297

Copy link
Copy Markdown
Owner

Problema

OpenCode envia limit.output como max_completion_tokens, y el plugin lo tenia fijo en 16.384 para todos los modelos. Eso capaba cada respuesta, aunque el catalogo soporta mucho mas (el build DeepSeek V4.1 Flash 1017 declara 393.216 de salida).

Ademas, los 28 modelos estaticos de opencode.json llevaban output: 16384, que ganaba sobre el plugin.

Solucion

  • Default 32.768, el valor mas alto seguro para todo el catalogo: el minimo declarado en el provider commandcode de models.dev es exactamente 32.768 (Qwen3.8-27B y Ling 3.1 Flash).
  • COMMANDCODE_OUTPUT_TOKENS lo sobreescribe por proceso.
  • Los limites pasan a ser propiedad del plugin; se quitaron del config estatico.

Verificacion

  • Medido con un provider eco local: el request lleva max_completion_tokens: 32768 por defecto y 131072 con el override
  • bun test: 84 pass / 0 fail
  • bun run typecheck limpio
  • En vivo: 83 modelos commandcode, 0 claude, google 4, opencode 10

OpenCode forwards limit.output as max_completion_tokens, so the hardcoded 16,384
capped every Command Code response regardless of what the model supports. The
DeepSeek V4.1 Flash 1017 build declares 393,216 output tokens.

- Default is now 32,768, the highest value safe across the whole catalog: the
  minimum declared output in models.dev's commandcode provider is exactly 32,768.
- COMMANDCODE_OUTPUT_TOKENS overrides it per process (verified: 131072 reaches the
  wire as max_completion_tokens).
- The 28 static model entries in opencode.json carried output: 16384, which won over
  the plugin; the limits are now owned by the plugin alone.
- Verified end to end with a local echo provider: default 32768, override 131072.
@JoshRob297
JoshRob297 merged commit 0e5cb17 into main Oct 20, 2026
1 check passed
@JoshRob297
JoshRob297 deleted the fix/output-limit branch October 20, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant