Repository navigation
v0.10.0: make the any-model claim hold under weak models, cheap on st… - #33
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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
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.Added
gocodein a terminal starts chat; --help is grouped and the porting-harness commands are hidden.Changed
gocodeon a TTY starts chat instead of printing help.--model codexwith no credentials errors at startup.BashTool:git *no longer coversgit log | head; trusthead *too.systemas a block list.Known gaps: proxy providers prefer the env key over --api-key; the price table is hand-maintained; the
deepseekalias points at a retired model; nothing here has yet been run against a live model.