Skip to content

Commit d2f28f9

Browse files
committed
Update Nix dependencies and opencode configuration
- Updated flake.lock with latest home-manager and nixpkgs versions - Disabled gpt-oss models in opencode due to streaming response format issues (see anomalyco/opencode#7439) - Switched opencode to unstable channel for faster updates - Disabled enableHeavyPackages to reduce bandwidth usage
1 parent 6c7e63a commit d2f28f9

4 files changed

Lines changed: 52 additions & 66 deletions

File tree

‎nix/home/flake.lock‎

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎nix/home/flake.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
enableGui = true;
125125
enableKube = true;
126126
isNixOS = false;
127-
enableHeavyPackages = true;
127+
enableHeavyPackages = false; # Skip FreeCAD, GIMP, Chrome, etc. to save bandwidth
128128
};
129129

130130
# NixOS VM

‎nix/home/home.nix‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
config,
33
pkgs,
4+
pkgsUnstable,
45
lib,
56
enableGui,
67
enableKube,
@@ -376,7 +377,7 @@ in
376377
devenv
377378
nixfmt-rfc-style # Nix formatter (RFC 166 style)
378379
rclone # Cloud storage mounting/sync
379-
opencode # AI coding agent for terminal
380+
pkgsUnstable.opencode # AI coding agent for terminal (unstable for faster updates)
380381

381382
# Tree-sitter CLI for manual parser management
382383
tree-sitter # Used by nvim-treesitter auto_install

‎nix/home/opencode/default.nix‎

Lines changed: 40 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
# Capability matrix:
1111
# Model | Reasoning | Tools | Notes
1212
# -------------------------|-----------|-------|---------------------------
13-
# gpt-oss-120b-32k | ✓ | ✓ | OpenAI MoE (5.1B active), ~56GB, fits 2x5090
14-
# gpt-oss-20b-32k | ✓ | ✓ | OpenAI MoE, 14GB, reasoning + tools
15-
# qwen3-coder:30b | ✓ | ✓ | MoE (3.3B active), both work!
13+
# gpt-oss-* | ✓ | ✓ | DISABLED - OpenCode ZodError (issue #7439)
14+
# qwen3-coder-30b-32k | ✓ | ✓ | MoE (3.3B active), both work!
1615
# qwen3:32b | ✓ | ~ | Tools buggy in Ollama
1716
# llama3.3:70b | ✗ | ✓ | Reliable tools, no thinking
1817
# llama3.1-abliterated:70b | ✗ | ✓ | Uncensored, reliable tools
@@ -35,68 +34,54 @@ let
3534
"$schema" = "https://opencode.ai/config.json";
3635
provider = {
3736
ollama = {
38-
# Use ollama-ai-provider-v2 for native reasoning/thinking support
39-
# @ai-sdk/openai-compatible can't parse the non-standard 'reasoning' field
40-
npm = "ollama-ai-provider-v2";
37+
# NOTE: gpt-oss models have streaming response format issues with OpenCode
38+
# The finishReason is returned as object instead of string
39+
# See: https://github.com/anomalyco/opencode/issues/7439
40+
npm = "@ai-sdk/openai-compatible";
4141
name = "Ollama (local)";
4242
options = {
43-
baseURL = "http://localhost:11434/api";
43+
baseURL = "http://localhost:11434/v1";
4444
};
4545
models = {
46-
# === GPT-OSS - OpenAI's open-weight MoE models ===
47-
# Apache 2.0 license, reasoning + tools, configurable reasoning effort
46+
# === GPT-OSS - DISABLED: OpenCode streaming compatibility issue ===
47+
# OpenAI's open-weight MoE models (Apache 2.0, reasoning + tools)
4848
# Docs: https://ollama.com/library/gpt-oss
49-
50-
# GPT-OSS 120B - OpenAI's flagship open model
51-
# MoE: 117B total params, 5.1B active, MXFP4 quantized (~56GB weights)
52-
# On 2x 5090 (64GB): fits cleanly, 32k context saturates VRAM
53-
# IMPORTANT: Create variant first:
54-
# ollama run gpt-oss:120b
55-
# /set parameter num_ctx 32768
56-
# /save gpt-oss-120b-32k
57-
# /bye
58-
"gpt-oss-120b-32k" = {
59-
name = "GPT-OSS 120B 32k (local)";
60-
reasoning = true;
61-
tool_call = true;
62-
options = {
63-
extraBody = {
64-
think = "high"; # enable reasoning mode
65-
};
66-
};
67-
limit = {
68-
context = 32768; # max for 64GB VRAM (model + KV cache)
69-
output = 8192;
70-
};
71-
};
72-
# GPT-OSS 20B - smaller variant, fits easily on 64GB
73-
# MoE architecture, 14GB weights, excellent headroom for large context
74-
# IMPORTANT: Create variant first:
75-
# ollama run gpt-oss:20b
76-
# /set parameter num_ctx 32768
77-
# /save gpt-oss-20b-32k
78-
# /bye
79-
"gpt-oss-20b-32k" = {
80-
name = "GPT-OSS 20B 32k (local)";
81-
reasoning = true;
82-
tool_call = true;
83-
options = {
84-
extraBody = {
85-
think = "high"; # enable reasoning mode
86-
};
87-
};
88-
limit = {
89-
context = 32768;
90-
output = 8192;
91-
};
92-
};
49+
#
50+
# BUG: gpt-oss returns finishReason as object instead of string in
51+
# streaming responses, causing ZodError in OpenCode's processor.ts.
52+
# Affects all providers (@ai-sdk/openai-compatible, ollama-ai-provider-v2).
53+
# Issue: https://github.com/anomalyco/opencode/issues/7439
54+
#
55+
# Re-enable once OpenCode fixes streaming response parsing.
56+
#
57+
# "gpt-oss-120b-32k" = {
58+
# name = "GPT-OSS 120B 32k (local)";
59+
# # MoE: 117B params, 5.1B active, ~56GB MXFP4. Fits 2x5090 w/ 32k ctx.
60+
# # Create variant: ollama run gpt-oss:120b → /set parameter num_ctx 32768 → /save gpt-oss-120b-32k
61+
# reasoning = true;
62+
# tool_call = true;
63+
# limit = { context = 32768; output = 8192; };
64+
# };
65+
# "gpt-oss-20b-32k" = {
66+
# name = "GPT-OSS 20B 32k (local)";
67+
# # MoE: 14GB weights, fits easily on 64GB with large context.
68+
# # Create variant: ollama run gpt-oss:20b → /set parameter num_ctx 32768 → /save gpt-oss-20b-32k
69+
# reasoning = true;
70+
# tool_call = true;
71+
# limit = { context = 32768; output = 8192; };
72+
# };
9373

9474
# === Qwen3-Coder - BOTH reasoning AND reliable tool calling ===
9575

9676
# Qwen3-Coder 30B - best for agentic work (reasoning + tools both work)
9777
# Unsloth fixed tool calling in Aug 2025
98-
"qwen3-coder:30b" = {
99-
name = "Qwen3-Coder 30B (local)";
78+
# IMPORTANT: Create variant first:
79+
# ollama run qwen3-coder:30b
80+
# /set parameter num_ctx 32768
81+
# /save qwen3-coder-30b-32k
82+
# /bye
83+
"qwen3-coder-30b-32k" = {
84+
name = "Qwen3-Coder 30B 32k (local)";
10085
reasoning = true;
10186
tool_call = true;
10287
interleaved = {

0 commit comments

Comments
 (0)