Commit Graph
6 Commits
Author SHA1 Message Date
Connor Johnstone 0943d99465 Update 2026-09-29 16:24:41 -04:00
connor 14aee0c1e4 opencode: cap the ChatGPT route at 272k and run work agents at low effort
The ChatGPT subscription meters on TOKENS, not messages. OpenAI moved to
token-based accounting and states plainly that "a longer task can use more of
your allowance than a short task, so a fixed number of messages is not a
reliable measure of remaining usage". On that plan the declared context IS
the budget.

Reverts chatgpt/* and agent/*-gpt-5.x from 1,050,000 back to 272,000 in all
three profiles. Raising them to the API's published figure was correct for
capability and wrong for cost: measured over 450 requests, chatgpt/gpt-5.6-
terra averaged 128,395 prompt tokens against 374 completion -- a 343:1 ratio
-- and peaked at 249,647, i.e. sessions grew until they hit the declared
ceiling and compacted there. Quadrupling the ceiling quadruples the room they
grow into, and every turn re-sends the whole context. 272,000 also matches
Codex's own documented context.

⚠ THE LESSON FROM THE LOCAL TIER DOES NOT TRANSFER. Declaring the true
context is strictly right for a local model, where context is free -- that
fix took muse-glimmer-30b from 15/24 to 21/24. On a metered subscription the
same change is a bill. Same edit, opposite sign, and the distinguishing
question is who pays per token.

Also points dev/architect/review/duck/brainstorm at a new
chatgpt/gpt-5.6-terra-low alias, which pins reasoning_effort server-side.
GPT-5.6 defaults to MEDIUM when effort is omitted, and nothing anywhere in
these configs set it, so every work agent has been running at medium. The
hypothesis being tested is not that this saves the ~374 completion tokens
directly, but that less reasoning means fewer tool calls, fewer turns, and
therefore less context re-transmission -- which is where the tokens actually
go.

⚠ THAT HYPOTHESIS IS UNVERIFIED, and so is whether the parameter arrives at
all. LiteLLM documents dropping reasoning_effort from gpt-5.4-and-newer
requests that carry tools, which is every agentic request; this route goes
through the Responses transformer, which may exempt it. A dropped param
returns a normal 200 and changes nothing. A synthetic A/B was run and was
INCONCLUSIVE: the fixture was too easy, reasoning came back 11 tokens and 0
in the two arms, so there was no signal to compare, and low made MORE tool
calls (9 vs 8) at n=1. Real sessions will settle it -- watch completion_
tokens in the spend log against the 374 baseline.

OMO agents are untouched: they are defined in ~/.omo/omo.jsonc, not here.
personal.json's five stay on muse-glimmer-30b-low from the local trial.
2026-09-23 10:14:16 -04:00
connorandClaude Opus 5 4e3a0d6ccc opencode: context limits from vendor docs, not inherited guesses
Checked every hosted entry against published documentation 2026-09-21. There
were errors in BOTH directions, and the overstatements are the dangerous
half -- an understated limit wastes tokens, an overstated one is a hard API
rejection partway through a session.

  anthropic/claude-haiku-4-5   1,000,000 ->   200,000   OVERSTATED 5x
  openai/gpt-5.6-sol             200,000 -> 1,050,000
  openai/gpt-5.5                 200,000 -> 1,050,000
  openai/gpt-5.4                 200,000 -> 1,050,000
  openai/gpt-5.4-mini            200,000 -> 1,050,000
  chatgpt/* (4 aliases)          272,000 -> 1,050,000
  agent/*-gpt-5.x (11 aliases)   272,000 -> 1,050,000
  agent/*-glm-5.3 (4 aliases)    150,000 ->   200,000   deliberate cap
  anthropic/claude-{opus,sonnet}-5           unchanged, already correct

Haiku is the one that mattered. Opus 5 and Sonnet 5 really are 1M, the whole
Anthropic block was set to 1M, and Haiku inherited a limit five times its
real 200k. Opencode would have grown a session past the ceiling and the API
would have refused it.

⚠ glm-5.3 is capped at 200,000 BY CHOICE. Its real maximum is 1M. GLM bills
per input token and cost on this stack tracks context size and cache-read
volume more than model choice, so the cap is budget control, not ignorance.
Do not "correct" it upward against the docs. This is the one place where a
declared limit below the vendor maximum is intentional.

⚠ chatgpt/* now carries the API's 1,050,000, but OpenAI does not publish a
context limit for ChatGPT-plan routing and it has historically been far
below the API's. This is deliberately optimistic and being watched for a
crash; if long sessions start failing, that is the first thing to lower.

Left alone for want of evidence, not because they are right:
openai/gpt-5.3-codex (200,000), agent/librarian-glm-5.3-flash (128,000),
agent/sisyphus-junior-glm-5.3-flash (150,000). Raising an unconfirmed limit
risks the Haiku failure mode, so these stay until measured.

Unrelated but found while checking: LiteLLM declares kimi/kimi-k2.7-code at
272,000 against a published 262,144. Overstated by ~10k.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9UH1zGZZtA9yhohmQrcT6
2026-09-21 22:01:33 -04:00
connorandClaude Opus 5 f9cfab6221 opencode: declare the context these models actually serve
Every local model was declared at 32768 (16384 for the OMO local aliases)
regardless of what llama-swap is configured to serve. gpt-oss-20b runs with
`-c 65536`, so opencode was compacting at half the real window -- and
local/librarian and local/explore, which both route to gpt-oss-20b, at a
quarter of it.

Compaction is not free and it is not neutral. Measured on mainframe
2026-09-21, one agent session against a model told it had 32k when it had
131k: four cache-cold prefills, and 780 seconds spent after a working fix
re-reading the same forty lines, because each compaction discarded the memory
of having already verified it. Reasoning spend per step went from 2-5 tokens
to 1739. The model was not confused; it had been made to forget.

Values are llama-swap's own `-c`:

  gpt-oss-20b       65536    (was 32768)
  local/librarian   65536    (was 16384 / 32768)
  local/explore     65536    (was 16384 / 32768)
  qwen3-coder-30b   32768    unchanged, already correct
  gemma3-12b        32768    unchanged, already correct

The hosted entries were already right and are untouched.

⚠ These are hand-maintained and llama-swap's config is the source of truth.
If a `-c` changes there, change it here. llmbench now derives the same
numbers by parsing that file, and raises rather than guessing when an alias
is unknown -- a wrong context limit produces plausible numbers instead of an
error, which is how this went unnoticed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9UH1zGZZtA9yhohmQrcT6
2026-09-21 21:51:51 -04:00
Connor Johnstone f38ffc6dbd some updates for the laptop paths, mostly 2026-09-15 15:27:53 -04:00
connor e6644d0616 Rebuild dotfiles as one branch with per-host layers
Replaces the previous repo, which had split into two histories that never
met (mainframe on a dead GitLab remote, the laptops on Gitea) with 146
dirty files across three machines and the NAS never enrolled at all.

Branch-per-machine is gone. One main, with host differences expressed as
small files under hosts/<hostname>/ rather than as branches, so there is
nothing to merge. The reconciled zsh layer reduces 15-33 line forks to
1-7 effective lines per host; distro differences (oh-my-zsh prefix,
syntax-highlighting path, fd vs fdfind) are probed in common/ instead.

Fresh history: the old one carried six plaintext credentials, 45 MB of
mail caches, browser caches and vendored binaries. 5,096 tracked files
and 144 MB become 462 files and 2.6 MB. The .gitignore is now an
allowlist, which is what keeps that true.

Root cause of the rot: ~/.local/bin was a symlink to scripts/ with GOPATH
inside it, so every go install wrote into version control (2.2 GB on the
work laptop). PATH now points at the repo instead of the reverse.

Also: Hyprland replaces sway and is sourced in two halves so $browser is
defined before use; singleton automations carry ConditionHost= alongside
host-layer-only placement; ddns moves from cron to a guarded timer;
package manifests and pkg-snapshot/pkg-restore replace the X11-era
install_scripts/; networkmanager-dmenu added to system76 (the binding
always existed, the package never did).
2026-09-14 14:24:37 -04:00