Skip to content

V3.5.87 - #180

Merged
chauncygu merged 2 commits into
mainfrom
v3.5.87
Aug 17, 2026
Merged

V3.5.87#180
chauncygu merged 2 commits into
mainfrom
v3.5.87

Conversation

@chauncygu

Copy link
Copy Markdown
Contributor

No description provided.

Multi-level gateway model IDs (openrouter/<vendor>/<model>) broke four
things that only bit gateway routes:

- stream_openai_compat re-derived the provider from an already-stripped
  model string, so openrouter/deepseek/* resolved to the DeepSeek API and
  picked up DeepSeek-only request fields (extra_body.thinking,
  reasoning_effort) plus the wrong output caps; openrouter/openai/* sent
  max_completion_tokens instead of the max_tokens OpenRouter documents.
  stream() now passes the resolved provider via config['_provider_name'].
- COSTS/_MODEL_CONTEXT_LIMITS are keyed by plain model name, so every
  openrouter/* route priced at $0.00 (the quota dollar budget never
  fired for a gateway that bills real money) and inherited a flat 128k
  context window. New lookup_model_key() drops the vendor path and the
  @provider/quant routing suffix; context falls back to the vendor's own
  window when the per-model registry has no entry.
- The @<provider>[/<quant>] suffix made prompt-family overlay routing
  tail to 'fp8', silently dropping claude.md/qwen.md.

Tests: tests/test_openrouter_provider.py 11 -> 23 cases.
Docs: usage.md (OpenRouter setup + provider pinning), recipes.md,
architecture.md, i18n READMEs.
….87)

auto mode now asks only when an action can change the user's files, run
arbitrary code, or reach outside the session.

- Read-only tools come from ToolDef.read_only instead of a hardcoded
  five-name list: 18 already-read-only tools (GetDiagnostics, TaskList,
  MemorySearch, ReadPDF, SummarizeLargeFile, ...) stopped prompting.
  Session-state tools (TaskCreate/TaskUpdate/MemorySave/Skill/SleepTimer)
  join them; unclassified MCP/plugin tools still prompt.
- _is_safe_bash is a shlex parser instead of a prefix match: pipelines of
  read-only stages auto-run (git log | head -20), while redirection,
  backgrounding, subshells and command substitution are refused. Closes a
  hole where anything starting with 'python '/'node '/'find ' auto-ran
  arbitrary code; interpreters now prompt, their --version forms do not.
- Write auto-approves only when it CREATES a file inside the workspace;
  overwrites, paths outside it, and dot-paths (.git/hooks, .github,
  .env) still prompt. Disable with /config auto_create_files=false.
- New 's' answer grants one signature (Bash:git commit, Edit:/path) for
  the session: in-memory only, ignored in manual mode, listed by
  /permissions, dropped by /permissions clear.
- cli._ask_permission_event tolerates 2-arg permission handlers, which
  would otherwise raise into the callers' except and silently DENY.
- /config bash_safe_extra=[...] extends the read-only vocabulary.

Tests: tests/test_permission_auto_approve.py, 118 cases.
Docs: security.md (policy + boundaries), reference.md, features.md,
README, news.md, i18n CN. Version 3.5.86 -> 3.5.87.
@chauncygu
chauncygu merged commit 480e158 into main Aug 17, 2026
6 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