@phi-code-admin/phi-code 0.77.0 → 0.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/extensions/phi/providers/opencode-go.ts +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.77.1] - 2026-06-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **OpenCode Go context windows.** Large-context Qwen/MiniMax models (e.g.
|
|
8
|
+
`qwen3.7-plus`, 1M tokens) that the OpenCode Go API does not report a context
|
|
9
|
+
window for no longer collapse to a misleading `128k` in the footer. The window
|
|
10
|
+
is now inferred by model family (Qwen/MiniMax 1M, Kimi 256k, GLM/MiMo 200k),
|
|
11
|
+
and `qwen3.7-plus` is added to the bundled model list. Re-run `/setup` or
|
|
12
|
+
`/phi-init` (or edit `~/.phi/agent/models.json`) to refresh an existing config.
|
|
13
|
+
|
|
3
14
|
## [0.77.0] - 2026-06-13
|
|
4
15
|
|
|
5
16
|
### Added
|
|
@@ -61,6 +61,7 @@ export const OPENCODE_GO_FALLBACK_MODELS: readonly OpenCodeGoModel[] = [
|
|
|
61
61
|
{ id: "glm-5", name: "GLM 5", contextWindow: 200_000, maxTokens: 128_000 },
|
|
62
62
|
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", contextWindow: 128_000, maxTokens: 8_192 },
|
|
63
63
|
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", contextWindow: 128_000, maxTokens: 8_192 },
|
|
64
|
+
{ id: "qwen3.7-plus", name: "Qwen 3.7 Plus", contextWindow: 1_000_000, maxTokens: 16_384 },
|
|
64
65
|
{ id: "qwen3.6-plus", name: "Qwen 3.6 Plus", contextWindow: 1_000_000, maxTokens: 16_384 },
|
|
65
66
|
{ id: "qwen3.5-plus", name: "Qwen 3.5 Plus", contextWindow: 1_000_000, maxTokens: 16_384 },
|
|
66
67
|
{ id: "mimo-v2-pro", name: "MiMo V2 Pro", contextWindow: 200_000, maxTokens: 16_384 },
|
|
@@ -208,13 +209,28 @@ export function isOpenCodeGoAnthropicModel(id: string): boolean {
|
|
|
208
209
|
return /^(qwen|minimax)/i.test(id);
|
|
209
210
|
}
|
|
210
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Infer a model's context window by family when the OpenCode Go API does not
|
|
214
|
+
* report one (it omits it for some newer models, e.g. qwen3.7-plus). A flat
|
|
215
|
+
* 128k default badly under-reports the large-context Qwen/MiniMax models, which
|
|
216
|
+
* surfaces as a wrong "/128k" in the footer. Values mirror OPENCODE_GO_FALLBACK_MODELS.
|
|
217
|
+
*/
|
|
218
|
+
export function inferOpenCodeGoContextWindow(id: string, provided?: number): number {
|
|
219
|
+
if (typeof provided === "number" && provided > 0) return provided;
|
|
220
|
+
const lower = id.toLowerCase();
|
|
221
|
+
if (/^(qwen|minimax)/.test(lower)) return 1_000_000;
|
|
222
|
+
if (/^kimi/.test(lower)) return 256_000;
|
|
223
|
+
if (/^(glm|mimo)/.test(lower)) return 200_000;
|
|
224
|
+
return 128_000;
|
|
225
|
+
}
|
|
226
|
+
|
|
211
227
|
function toPersistedOpenCodeGoModel(m: OpenCodeGoModel) {
|
|
212
228
|
return {
|
|
213
229
|
id: m.id,
|
|
214
230
|
name: m.name ?? m.id,
|
|
215
231
|
reasoning: true,
|
|
216
232
|
input: ["text"] as const,
|
|
217
|
-
contextWindow: m.contextWindow
|
|
233
|
+
contextWindow: inferOpenCodeGoContextWindow(m.id, m.contextWindow),
|
|
218
234
|
maxTokens: m.maxTokens ?? 16_384,
|
|
219
235
|
};
|
|
220
236
|
}
|