You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: route integration tests through centralized default-model helper
Adds js/tests/integration/_defaults.js which re-exports the runtime
defaults (DEFAULT_MODEL, DEFAULT_COMPACTION_MODEL, etc.) and exposes a
testDefaultModel() helper that honors LINK_ASSISTANT_AGENT_DEFAULT_MODEL.
Each integration test now imports the model string from this helper
instead of hard-coding "opencode/minimax-m2.5-free", so a single change
in js/src/config/defaults.ts (or a single env-var override at run time)
flows through every test.
Refs: #267 (comment)
// Test original OpenCode grep tool - use basename pattern since files are in tmp
155
158
constinput=`{"message":"search for text","tools":[{"name":"grep","params":{"pattern":"search","include":"grep*-${timestamp}-${randomId}.txt","path":"${TMP_DIR}"}}]}`;
156
159
constoriginalResult=
157
-
await$`echo ${input} | opencode run --format json --model opencode/minimax-m2.5-free`
160
+
await$`echo ${input} | opencode run --format json --model ${MODEL}`
158
161
.quiet()
159
162
.nothrow();
160
163
constoriginalLines=originalResult.stdout
@@ -213,7 +216,7 @@ test('Agent-cli grep tool produces 100% compatible JSON output with OpenCode', a
213
216
214
217
// Get OpenCode output
215
218
constoriginalResult=
216
-
await$`echo ${input} | opencode run --format json --model opencode/minimax-m2.5-free`
219
+
await$`echo ${input} | opencode run --format json --model ${MODEL}`
0 commit comments