Skip to content

v0.10.0: make the any-model claim hold under weak models, cheap on st… - #33

Merged
AlleyBo55 merged 1 commit into
masterfrom
release/v0.10.0
Sep 24, 2026
Merged

AlleyBo55 merged 1 commit into
masterfrom
release/v0.10.0

Conversation

@AlleyBo55

Copy link
Copy Markdown
Owner

…rong ones

No new parity rows. The provider layer, the permission boundary and the agent loop get their first tests; what the tests found gets fixed; and the things that decide whether "works with any model" is true get built.

Fixed

  • Streams that broke mid-reply were recorded as complete (both providers returned silently on a bad frame or dropped connection). Now surfaced as the error event the REPL renders. Anthropic mid-stream error frames too.
  • Model fallback never fired for rate limits: the chain judged the RetriesExhausted wrapper (status 0), not the 429 inside it. OpenAI's context_length_exceeded lives in error.code and was never read.
  • Streamed token counts were zero: OpenAI-compatible streams never asked for usage; Anthropic input tokens live in message_start and only message_delta was read.
  • Trusted-tool prefixes matched substrings of the raw JSON: "BashTool:ls *" approved rm -rf ./tools, "FileWriteTool:src *" approved src/../../etc/passwd. Now word-boundary on the command, directory boundary on the cleaned path, and every command in a compound line must be covered; substitution and file-writing redirects are never auto-trusted.
  • Malformed tool arguments executed with empty input; the model now gets the bad JSON quoted back and a request to resend.
  • Codex provider path was unreachable and read the wrong keys from ~/.codex/auth.json.
  • Context estimate ignored tool results, so auto-compaction fired far too late. A file ending in a newline no longer gets a phantom empty last line.

Added

  • Zero-config local models: an Ollama-style id routes to a running Ollama or LM Studio with no key. With no --model and no keys, gocode picks a local coding model and says so. With nothing set up, it prints three ways to start instead of a credentials error. Bare gocode in a terminal starts chat; --help is grouped and the porting-harness commands are hidden.
  • Loop guard: identical tool calls with identical results three times warn the model, five times stop the loop (stop_reason "stuck").
  • --max-cost on chat and prompt: a dollar ceiling for unattended runs, enforced before tools run, transcript kept valid.
  • Per-model cost ledger behind /cost with a real price table; cache reads priced at Anthropic's rates.
  • Prompt caching on Anthropic: cache_control on the system block (covers tools) and on the newest message, set on request copies so breakpoints never accumulate. GOCODE_DISABLE_PROMPT_CACHE opts out.
  • Tool output capped at 40 KB per call (head and tail kept, marker explains how to ask for more); FileReadTool pages at 2000 lines.
  • gocode doctor --model X probes streaming, system prompt, tool calls and parallel tool calls; cached in .gocode/capabilities.json; chat warns at startup from the cache.
  • Swarm made real: every spawned sub-agent joins under its own name, is offered send_agent_message and list_agents, reads its inbox each turn; background agents report to main. Previously the tool was never offered and no mailbox was ever read.
  • evals/: 15 tasks with hidden tests and reference solutions, a runner that scores gocode per model, and a self-test proving each task is solvable and discriminating without spending tokens. Opt-in, not in CI.
  • Tests for apiclient (recorded SSE fixtures for both wire formats), agent, permissions, doctor, swarm, orchestrator, toolimpl.

Changed

  • /cost is multi-line and priced per model; --output-format json total_cost uses the same pricing.
  • Bare gocode on a TTY starts chat instead of printing help.
  • --model codex with no credentials errors at startup.
  • BashTool:git * no longer covers git log | head; trust head * too.
  • Anthropic requests send system as a block list.

Known gaps: proxy providers prefer the env key over --api-key; the price table is hand-maintained; the deepseek alias points at a retired model; nothing here has yet been run against a live model.

…rong ones

No new parity rows. The provider layer, the permission boundary and the
agent loop get their first tests; what the tests found gets fixed; and the
things that decide whether "works with any model" is true get built.

Fixed
- Streams that broke mid-reply were recorded as complete (both providers
  returned silently on a bad frame or dropped connection). Now surfaced as
  the error event the REPL renders. Anthropic mid-stream error frames too.
- Model fallback never fired for rate limits: the chain judged the
  RetriesExhausted wrapper (status 0), not the 429 inside it. OpenAI's
  context_length_exceeded lives in error.code and was never read.
- Streamed token counts were zero: OpenAI-compatible streams never asked for
  usage; Anthropic input tokens live in message_start and only message_delta
  was read.
- Trusted-tool prefixes matched substrings of the raw JSON: "BashTool:ls *"
  approved `rm -rf ./tools`, "FileWriteTool:src *" approved
  src/../../etc/passwd. Now word-boundary on the command, directory boundary
  on the cleaned path, and every command in a compound line must be covered;
  substitution and file-writing redirects are never auto-trusted.
- Malformed tool arguments executed with empty input; the model now gets the
  bad JSON quoted back and a request to resend.
- Codex provider path was unreachable and read the wrong keys from
  ~/.codex/auth.json.
- Context estimate ignored tool results, so auto-compaction fired far too
  late. A file ending in a newline no longer gets a phantom empty last line.

Added
- Zero-config local models: an Ollama-style id routes to a running Ollama or
  LM Studio with no key. With no --model and no keys, gocode picks a local
  coding model and says so. With nothing set up, it prints three ways to
  start instead of a credentials error. Bare `gocode` in a terminal starts
  chat; --help is grouped and the porting-harness commands are hidden.
- Loop guard: identical tool calls with identical results three times warn
  the model, five times stop the loop (stop_reason "stuck").
- --max-cost on chat and prompt: a dollar ceiling for unattended runs,
  enforced before tools run, transcript kept valid.
- Per-model cost ledger behind /cost with a real price table; cache reads
  priced at Anthropic's rates.
- Prompt caching on Anthropic: cache_control on the system block (covers
  tools) and on the newest message, set on request copies so breakpoints
  never accumulate. GOCODE_DISABLE_PROMPT_CACHE opts out.
- Tool output capped at 40 KB per call (head and tail kept, marker explains
  how to ask for more); FileReadTool pages at 2000 lines.
- gocode doctor --model X probes streaming, system prompt, tool calls and
  parallel tool calls; cached in .gocode/capabilities.json; chat warns at
  startup from the cache.
- Swarm made real: every spawned sub-agent joins under its own name, is
  offered send_agent_message and list_agents, reads its inbox each turn;
  background agents report to main. Previously the tool was never offered
  and no mailbox was ever read.
- evals/: 15 tasks with hidden tests and reference solutions, a runner that
  scores gocode per model, and a self-test proving each task is solvable and
  discriminating without spending tokens. Opt-in, not in CI.
- Tests for apiclient (recorded SSE fixtures for both wire formats),
  agent, permissions, doctor, swarm, orchestrator, toolimpl.

Changed
- /cost is multi-line and priced per model; --output-format json total_cost
  uses the same pricing.
- Bare `gocode` on a TTY starts chat instead of printing help.
- `--model codex` with no credentials errors at startup.
- `BashTool:git *` no longer covers `git log | head`; trust `head *` too.
- Anthropic requests send `system` as a block list.

Known gaps: proxy providers prefer the env key over --api-key; the price
table is hand-maintained; the `deepseek` alias points at a retired model;
nothing here has yet been run against a live model.
@AlleyBo55
AlleyBo55 merged commit 213a3c3 into master Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant