Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

fix(cli): add missing limit.output to OpenCode generated config (#1020) (#1055)

suantea (asuan_suan)461c6566f9f4
diff --git a/cli/package.json b/cli/package.json
index c88fd676..d36ccebc 100644
--- a/cli/package.json
+++ b/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "freellmapi",
- "version": "0.5.0",
+ "version": "0.5.1",
"description": "Set up coding agents to use a FreeLLMAPI gateway",
"license": "MIT",
"repository": {
diff --git a/cli/src/__snapshots__/tools.test.ts.snap b/cli/src/__snapshots__/tools.test.ts.snap
index 095a367c..ab59353f 100644
--- a/cli/src/__snapshots__/tools.test.ts.snap
+++ b/cli/src/__snapshots__/tools.test.ts.snap
@@ -480,12 +480,14 @@ exports[`tool generators > setup-opencode has stable golden output 1`] = `
"fast-coder": {
"limit": {
"context": 131072,
+ "output": 8192,
},
"name": "Fast Coder",
},
"reasoning-model": {
"limit": {
"context": 262144,
+ "output": 8192,
},
"name": "Reasoning Model",
},
diff --git a/cli/src/tools.ts b/cli/src/tools.ts
index 7786d64f..1152484c 100644
--- a/cli/src/tools.ts
+++ b/cli/src/tools.ts
@@ -224,7 +224,7 @@ function opencode(ctx: GenerateContext): Generation {
.filter(model => model.id !== 'auto')
.map(model => [model.id, {
name: model.name ?? model.id,
- limit: { context: contextWindow(model) },
+ limit: { context: contextWindow(model), output: outputLimit(model) },
}]));
return {
files: [{
@@ -524,7 +524,7 @@ function dsh(ctx: GenerateContext): Generation {
// and merges them in that order, so writing `config.json` — the first and
// weakest layer — leaves a hand-written `mimocode.json` in charge.
// * `provider.<id>.models.<id>.limit` requires BOTH `context` and `output`
-// in MiMo's schema, unlike OpenCode which takes `context` alone.
+// in MiMo's schema, the same as OpenCode's (https://opencode.ai/config.json).
// There is no MIMOCODE_API_KEY or MIMOCODE_BASE_URL: MiMo's environment
// variables locate resources and toggle features, they are not a fallback for
// config fields. The key travels through the config file's own `{env:VAR}`
diff --git a/package-lock.json b/package-lock.json
index 5cffe0e1..4afd8760 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,7 +22,7 @@
},
"cli": {
"name": "freellmapi",
- "version": "0.5.0",
+ "version": "0.5.1",
"license": "MIT",
"dependencies": {
"jsonc-parser": "^3.3.1",