GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): prevent agent loop from stopping after tool calls with OpenAI-compatible providers by valenvivaldi · Pull Request #14973 · anomalyco/opencode

Conversation

@valenvivaldi

@valenvivaldi valenvivaldi commented Feb 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #14972
Related: #14063

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Some OpenAI-compatible providers (Gemini, LiteLLM) return finish_reason: "stop" instead of "tool_calls" when their response contains tool calls. This differs from the OpenAI standard.

The agent loop exit condition in prompt.ts (line ~318) only checks the finish reason to decide whether to continue. When it sees "stop", it breaks the loop — even though tools were just executed and need their results processed by the model.

The fix adds one extra check: before exiting the loop, look at the last assistant message parts for any type === "tool" entries. If tool parts exist, the model did call tools, so the loop must continue regardless of what finish_reason the provider reported.

How did you verify your code works?

  • Typecheck passes (16/16 packages)
  • Tested manually running bun run dev with Gemini 3 Flash configured as an OpenAI-compatible provider. Before the fix, the agent stopped after every tool call. After the fix, it continues processing tool results normally.

Screenshots / recordings

N/A — not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

meritozh, lalanikarim, feiwhang, vhautot, krozniata, peltax, etux, n0cl0ud, wartraxx51, Akkarine, and 12 more reacted with thumbs up emoji omavi, krozniata, peltax, etux, giovanni-zantedeschi-venko, vevar, adrianlzt, Scalamando, and brianmcconnel reacted with heart emoji vevar and brianmcconnel reacted with rocket emoji vevar and brianmcconnel reacted with eyes emoji
All reactions
  • 👍 22 reactions
  • ❤️ 9 reactions
  • 🚀 2 reactions
  • 👀 2 reactions
@valenvivaldi @claude
fix(core): prevent agent loop from stopping after tool calls with Ope…
acdd9b7
…nAI-compatible providers

Some OpenAI-compatible providers (Gemini, LiteLLM) return finish_reason
"stop" instead of "tool_calls" when the response contains tool calls.
This caused the agent loop to exit prematurely after executing a tool,
instead of continuing to process the tool results.

The fix adds a check for tool parts in the last assistant message. If
tool calls were made, the loop continues regardless of the provider's
reported finish_reason.

Fixes anomalyco#14972
Related: anomalyco#14063

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Feb 25, 2026
@github-actions

github-actions Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Feb 25, 2026
📊 AI CLI 工具社区动态日报 2026-02-25 duanyytop/agents-radar#9
Closed
@peltax peltax mentioned this pull request Mar 8, 2026
Agent stops after tool execution with OpenAI-compatible providers (Gemini, LiteLLM) #14972
Closed
valenvivaldi added 2 commits March 9, 2026 13:45
@valenvivaldi
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
437bed8
@valenvivaldi
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
cb23ea7
@valenvivaldi

valenvivaldi commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

Hey everyone, thanks for all the thumbs up! 👍

I've been keeping this branch updated with the latest dev — the bug is still present upstream as of today.

On our end, we need this fix since our team uses a LiteLLM proxy to route requests to Gemini, OpenAI, and other providers. Without it, the agent stops after every tool call, which makes it essentially unusable for agentic workflows.

Great to see this is also helping folks running local LLMs — glad it's not just us!

Hoping a maintainer gets a chance to review this at some point. The fix is minimal (7 lines) and all CI checks pass.

letmeseek, jimweller, giovanni-zantedeschi-venko, vevar, Omar-Obando, paulgrow-octane, adrianlzt, Scalamando, martin-liu, JuliaBars, and 3 more reacted with thumbs up emoji
All reactions
  • 👍 13 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

valenvivaldi added 2 commits March 16, 2026 10:02
@valenvivaldi
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
023c91d
@valenvivaldi
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
b95adf0
@martin-liu

martin-liu commented Mar 20, 2026

Copy link
Copy Markdown

@Hona Would appreciate a look when you have a chance.

This seems to affect a broad set of users of OpenAI-compatible providers, especially many companies using proxy layers. Thanks!

giovanni-zantedeschi-venko and brianmcconnel reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

valenvivaldi and others added 3 commits March 21, 2026 21:04
@valenvivaldi
Merge remote-tracking branch 'origin/dev' into fix/agent-loop-openai-…
37581e1
…compatible-tool-calls
@valenvivaldi
ci: retrigger typecheck (stale .ts-dist cache)
22dff7f
@rekram1-node
Refactor comment for clarity in prompt.ts
cd2fd02
@martin-liu

martin-liu commented Mar 26, 2026

Copy link
Copy Markdown

@rekram1-node The tests failed on your comment-only commit, looks like unrelated flaky tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@valenvivaldi
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
a325f13
@valenvivaldi

valenvivaldi commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi everyone! Just updated the branch with the latest from dev — all CI checks are passing. 🟢

rtrigg and Scalamando reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@valenvivaldi
merge: resolve conflict with dev branch
9513125
Dev removed "unknown" from the finish reason check array.
Our fix (!hasToolCalls) is preserved as it's the proper solution
for OpenAI-compatible providers returning wrong finish reasons.
@valenvivaldi

valenvivaldi commented Mar 30, 2026

Copy link
Copy Markdown
Contributor Author

Branch updated — merged latest dev

Conflict resolved in packages/opencode/src/session/prompt.ts

What changed in dev: The "unknown" finish reason was removed from the exit condition array. It was originally included as a workaround for providers that mapped bad stop reasons to "unknown", but it was commented out and removed as it's no longer considered necessary (see the comment in dev: "in v6 unknown became other but other existed in v5 too and was distinctly different").

Why our fix is still necessary: Removing "unknown" doesn't address the core issue this PR solves. The problem is that some OpenAI-compatible providers return finish_reason: "stop" instead of "tool_calls" even when tools were actually called, causing the agent loop to exit prematurely. Our fix adds a !hasToolCalls check that inspects the actual message parts for tool calls, regardless of what the provider reports as the finish reason. This is a more robust solution than relying on finish reason values.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henry701 added a commit to henry701/opencode that referenced this pull request Mar 31, 2026
@henry701
feat: merge PR anomalyco#14743 (prompt cache stability) + PR anomalyc…
8ac066b
…o#14973 (agent loop fix)

PR anomalyco#14743 — fix(cache): improve Anthropic prompt cache hit rate
- Split system prompt into stable (global) + dynamic (project) blocks
- Remove cwd from bash tool schema (was busting cache per-repo)
- Freeze date under OPENCODE_EXPERIMENTAL_CACHE_STABILIZATION flag
- Add optional 1h TTL on first system block (OPENCODE_EXPERIMENTAL_CACHE_1H_TTL)
- Add OPENCODE_CACHE_AUDIT logging for per-call cache accounting
- Track global vs project skill scope for stable cache prefix
- Add splitSystemPrompt provider option to opt out

PR anomalyco#14973 — fix(core): prevent agent loop stopping after tool calls
- Check lastAssistantMsg.parts for tool type before exiting loop
- Fixes OpenAI-compatible providers (Gemini, LiteLLM) returning
  finish_reason 'stop' instead of 'tool_calls' when tools were called

ci: add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to upstream-sync workflow
build: relax bun version check to minor-level for local builds
henry701 added a commit to henry701/opencode that referenced this pull request Mar 31, 2026
@henry701
fix: resolve upstream merge conflicts in llm.ts + prompt.ts; simplify…
5b54985
… sync workflow

- llm.ts: restore systemSplit to StreamInput, apply split system construction
  against upstream's new StreamRequest pattern (abort moved out of StreamInput)
- prompt.ts: update system assembly to use skills.{global,project} +
  instructions.{global,project} split API; pass systemSplit; add hasToolCalls
  check (PR anomalyco#14973) against upstream's effectified loop structure
- upstream-sync.yml: replace issues-based conflict notification with job
  summary (issues disabled on fork); drop issues: write permission
@github-actions github-actions Bot mentioned this pull request Apr 1, 2026
fix: treat "other" as a continue stop reason #20467
Closed
3 of 6 tasks
valenvivaldi and others added 2 commits April 1, 2026 16:33
@valenvivaldi
Merge remote-tracking branch 'origin/dev' into fix/agent-loop-openai-…
d29fe9d
…compatible-tool-calls

# Conflicts:
#	packages/opencode/src/session/prompt.ts
@rekram1-node
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
ed12106
@rekram1-node

rekram1-node commented Apr 1, 2026

Copy link
Copy Markdown
Member

Yeah I think this makes sense some providers dont map their stop reasons correctly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rekram1-node and others added 3 commits April 1, 2026 20:02
@rekram1-node
Merge branch 'dev' into fix/agent-loop-openai-compatible-tool-calls
cd7df71
@rekram1-node
ignore: add explaination comment
af385cd
@rekram1-node
test: add testcase for addition
11bc180
@rekram1-node
rekram1-node merged commit 733a3bd into anomalyco:dev Apr 2, 2026
13 of 16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

jeromelau pushed a commit to jeromelau/opencode that referenced this pull request Apr 2, 2026
@valenvivaldi @rekram1-node liuzeming
fix(core): prevent agent loop from stopping after tool calls with Ope…
d6e30de
…nAI-compatible providers (anomalyco#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
henry701 added a commit to henry701/opencode that referenced this pull request Apr 2, 2026
@henry701
fix: resolve upstream merge conflicts — instruction.ts effectified, p…
f958709
…rompt.ts system assembly updated

- instruction.ts: take upstream's Effect-based rewrite; port OPENCODE_EXPERIMENTAL_CACHE_STABILIZATION
  caching onto new Effect.fn(system) — same semantics, new structure
- prompt.ts: use upstream's Effect.all + instruction.service; preserve global-skills-first
  cache ordering and systemSplit; take upstream's cleaner hasToolCalls variable names (PR anomalyco#14973)
- instruction.test.ts: take upstream's updated test file wholesale
henry701 added a commit to henry701/opencode that referenced this pull request Apr 2, 2026
@henry701
feat: merge PR anomalyco#14743 (prompt cache stability) + PR anomalyc…
af158e8
…o#14973 (agent loop fix)

PR anomalyco#14743 — fix(cache): improve Anthropic prompt cache hit rate
- Split system prompt into stable (global) + dynamic (project) blocks
- Remove cwd from bash tool schema (was busting cache per-repo)
- Freeze date under OPENCODE_EXPERIMENTAL_CACHE_STABILIZATION flag
- Add optional 1h TTL on first system block (OPENCODE_EXPERIMENTAL_CACHE_1H_TTL)
- Add OPENCODE_CACHE_AUDIT logging for per-call cache accounting
- Track global vs project skill scope for stable cache prefix
- Add splitSystemPrompt provider option to opt out

PR anomalyco#14973 — fix(core): prevent agent loop stopping after tool calls
- Check lastAssistantMsg.parts for tool type before exiting loop
- Fixes OpenAI-compatible providers (Gemini, LiteLLM) returning
  finish_reason 'stop' instead of 'tool_calls' when tools were called

ci: add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to upstream-sync workflow
build: relax bun version check to minor-level for local builds
NicholasDominici added a commit to jairad26/opencode that referenced this pull request Apr 6, 2026
@NicholasDominici @nexxeln
@kitlangton @opencode-agent @github-actions @fwang @thdxr @greptile-apps @Brendonovich @rekram1-node @JosXa JosXa @Hona @kommander @mchenco @valenvivaldi @aaron-he-zhu Aaron Zhu @dpuyosa @noamzbr @BYK @MrMushrooooom @lennyvaknine43 Lenny Vaknine @ykswang @jpcarranza94 @claude @kflansburg @natewill @iamdavidhill @adamdotdevin @luanweslley77 opencode @Yuxin-Dong dongyuxin @blackheaven @georgeharker @meruiden @derekbar90
Sync Opencode 1.3.17 (#40)
c22eead
* refactor(init): tighten AGENTS guidance (anomalyco#20422)

* refactor(shell): use Effect ChildProcess for shell command execution (anomalyco#20494)

* refactor: use Effect services instead of async facades in provider, auth, and file (anomalyco#20480)

* chore: generate

* chore: update nix node_modules hashes

* Update VOUCHED list

anomalyco#20482 (comment)

* test(app): migrate more e2e suites to isolated backend (anomalyco#20505)

* fix(account): coalesce concurrent console token refreshes (anomalyco#20503)

* test(app): fix isolated backend follow-ups (anomalyco#20513)

* wip: zen

* refactor: replace BunProc with Npm module using @npmcli/arborist (anomalyco#18308)

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* zen: sync

* fix: normalize filepath in FileTime to prevent Windows path mismatch (anomalyco#20367)

Co-authored-by: JosXa <[email protected]>
Co-authored-by: Luke Parker <[email protected]>

* resolve subpath only packages for plugins (anomalyco#20555)

* Fix selection expansion by retaining focused input selections during global key events (anomalyco#20205)

* feat: add new provider plugin hook for resolving models and sync models from github models endpoint (falls back to models.dev) (anomalyco#20533)

* fix(tui): apply scroll configuration uniformly across all scrollboxes (anomalyco#14735)

* chore(tui): clean up scroll config follow-up (anomalyco#20561)

* fix(opencode): batch snapshot revert without reordering (anomalyco#20564)

* fix(test): auto-acknowledge tool-result follow-ups in mock LLM server (anomalyco#20528)

* chore: generate

* refactor: add Effect-returning versions of MessageV2 functions (anomalyco#20374)

* refactor(bash): use Effect ChildProcess for bash tool execution (anomalyco#20496)

* chore: generate

* Refactor plugin/config loading, add theme-only plugin package support (anomalyco#20556)

* fix(test): use effect helper in snapshot race test (anomalyco#20567)

* refactor(revert): yield SessionSummary.Service directly (anomalyco#20541)

* fix: show model display name in message footer and transcript (anomalyco#20539)

* flock npm.add (anomalyco#20557)

* fix(account): refresh console tokens before expiry (anomalyco#20558)

* chore: add User-Agent headers for Cloudflare providers (anomalyco#20538)

Co-authored-by: Aiden Cline <[email protected]>

* fix(build): replace require() with dynamic import() in cross-spawn-spawner (anomalyco#20580)

* chore: generate

* tui: add consent dialog when sharing for the first time (anomalyco#20525)

* test(app): block real llm calls in e2e prompts (anomalyco#20579)

* refactor(instruction): migrate to Effect service pattern (anomalyco#20542)

* fix(cli): use simple logo in CLI (anomalyco#20585)

* fix(core): prevent agent loop from stopping after tool calls with OpenAI-compatible providers (anomalyco#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* fix(session): compaction agent responds in same language as conversation (anomalyco#20581)

Co-authored-by: Aaron Zhu <[email protected]>

* refactor(account): share token freshness helper (anomalyco#20591)

* fix(cli): restore colored help logo (anomalyco#20592)

* feat(opencode): Add Venice AI package as dependency (anomalyco#20570)

* chore: generate

* cli: update usage exceeded error

* chore: update nix node_modules hashes

* fix(node): set OPENCODE_CHANNEL during build (anomalyco#20616)

* zen: friendly trial ended message

* refactor: simplify solid reactivity across app and web (anomalyco#20497)

* use solid-primitives/resize-observer across web code (anomalyco#20613)

* cleanup event listeners with solid-primitives/event-listener (anomalyco#20619)

* chore: update nix node_modules hashes

* refactor: split up models.dev and config model definitions to prevent coupling (anomalyco#20605)

* chore: generate

* feat: add optional messageID to ShellInput (anomalyco#20657)

* chore: generate

* ignore: fix typecheck in dev (anomalyco#20702)

* fix(format): use biome format instead of check to prevent import removal (anomalyco#20545)

Co-authored-by: Aiden Cline <[email protected]>

* tweak: add abort signal timeout to the github copilot model fetch to prevent infinite blocking (anomalyco#20705)

* Add MiMo-V2 models to Go UI and docs (anomalyco#20709)

* refactor(format): update formatter interface to return command from enabled() (anomalyco#20703)

* app: unify auto scroll ref handling (anomalyco#20716)

* go: add mimo

* electron: add basic context menu for inspect element (anomalyco#20723)

* feat: add macOS managed preferences support for enterprise MDM deployments (anomalyco#19178)

Co-authored-by: Lenny Vaknine <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* chore: generate

* feat(acp): Add messageID and emit user_message_chunk on prompt/command (anomalyco#18625)

Co-authored-by: Aiden Cline <[email protected]>

* chore: generate

* test(app): add a golden path for mocked e2e prompts (anomalyco#20593)

* chore: update nix node_modules hashes

* docs(effect): refresh migration status (anomalyco#20665)

* test(opencode): remove temporary e2e url repro (anomalyco#20729)

* refactor(app): unexport internal e2e helpers (anomalyco#20730)

* test(app): emit junit artifacts for playwright (anomalyco#20732)

* refactor(todo): effectify session todo (anomalyco#20595)

* Adds TUI prompt traits, refs, and plugin slots (anomalyco#20741)

* chore: update nix node_modules hashes

* dialog aware prompt cursor (anomalyco#20753)

* fix(opencode): honor model limit.input overrides (anomalyco#16306)

Co-authored-by: Aiden Cline <[email protected]>

* refactor(effect): prune unused facades (anomalyco#20748)

* fix: rm dynamic part from bash tool description again to restore cache hits across projects (anomalyco#20771)

* refactor(share): effectify share next (anomalyco#20596)

* fix: call models.dev once instead of twice on start (anomalyco#20765)

* fix: prevent Tool.define() wrapper accumulation on object-defined tools (anomalyco#16952)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* chore: generate

* add automatic heap snapshots for high-memory cli processes (anomalyco#20788)

* feat: Send x-session-affinity and x-parent-session-id headers (anomalyco#20744)

* fix(sdk): handle Windows opencode spawn and shutdown (anomalyco#20772)

* chore: update nix node_modules hashes

* electron: better menus (anomalyco#20878)

* fix(core): fix restoring earlier messages in a reverted chain (anomalyco#20780)

* fix(session): delay jump-to-bottom button (anomalyco#20853)

* fix(prompt): unmount model controls in shell mode (anomalyco#20886)

* fix(session): disable todo dock auto-scroll (anomalyco#20840)

* feat(ui): redesign modified files section in session turn (anomalyco#20348)

Co-authored-by: David Hill <[email protected]>

* fix(app): hide default session timestamps (anomalyco#20892)

* refactor(effect): resolve built tools through the registry (anomalyco#20787)

* fix: restore prompt focus after footer selection (anomalyco#20841)

* feat: restore git-backed review modes (anomalyco#20845)

* chore: generate

* fix(app): show correct submit icon when typing follow up

* chore(app): remove queued follow-ups for now

* refactor(effect): build todowrite tool from Todo service (anomalyco#20789)

Co-authored-by: Juan Pablo Carranza Hurtado <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>

* test(ci): publish unit reports in actions (anomalyco#20547)

* chore: rm models snapshot (anomalyco#20929)

* notes on v2 (anomalyco#20941)

* chore: generate

* refactor(provider): stop custom loaders using facades (anomalyco#20776)

Co-authored-by: luanweslley77 <[email protected]>

* perf(opencode): batch snapshot diffFull blob reads (anomalyco#20752)

Co-authored-by: Nate Williams <[email protected]>

* fix(ci): create JUnit output dirs before tests (anomalyco#20959)

* release: v1.3.14

* refactor: remove redundant Kimi skill section (anomalyco#20393)

Co-authored-by: dongyuxin <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* fix(npm): Arborist reify fails on compiled binary — Bun pre-resolves node-gyp path at build time (anomalyco#21040)

* release: v1.3.15

* fix: ensure reasoning tokens arent double counted when calculating usage (anomalyco#21047)

* feat(tui): show console-managed providers (anomalyco#20956)

* refactor(effect): move read tool onto defineEffect (anomalyco#21016)

* chore: generate

* fix(tui): only show org switch affordances when useful (anomalyco#21054)

* chore: generate

* test: add regression test for double counting bug (anomalyco#21053)

* doc: udpate doc

* tweak: add newline between <content> and first line of read tool output to prevent confusion (anomalyco#21070)

* fix(plugin): parse package specifiers with npm-package-arg and sanitize win32 cache paths (anomalyco#21135)

* chore: update nix node_modules hashes

* feat(tui): make the mouse disablable (anomalyco#6824, anomalyco#7926) (anomalyco#13748)

* fix(core): implement proper configOptions for acp (anomalyco#21134)

* fix: pass both 'openai' and 'azure' providerOptions keys for @ai-sdk/azure (anomalyco#20272)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* fix(tui): default Ctrl+Z to undo on Windows (anomalyco#21138)

* release: v1.3.16

* zen: remove header check

* zen: normalize ipv6

* fix: show clear error when Cloudflare provider env vars are missing (anomalyco#20399)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* fix(tui): revert kitty keyboard events workaround on windows (anomalyco#20180)

* release: v1.3.17

* fix(lsp): MEMORY LEAK: ensure typescript server uses native project config (anomalyco#19953)

* chore: generate

* docs: update Cloudflare provider setup to reflect /connect prompt flow (anomalyco#20589)

* refactor: replace Bun.serve with Node http.createServer in OAuth handlers (anomalyco#18327)

Co-authored-by: LukeParkerDev <[email protected]>

* upgrade opentui to 0.1.97 (anomalyco#21137)

* refactor(server): replace Bun serve with Hono node adapters (anomalyco#18335)

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>

* chore: update nix node_modules hashes

* tweak: ensure copilot anthropic models have same reasoning effort model as copilot cli, also fix qwen incorrectly having variants (anomalyco#21212)

* tweak: adjust chat.params hook to allow altering of the maxOutputTokens (anomalyco#21220)

* tweak: move the max token exclusions to plugins  @rekram1-node (anomalyco#21225)

* fix: bump openrouter ai sdk pkg to fix openrouter issues (anomalyco#21242)

---------

Co-authored-by: Shoubhit Dash <[email protected]>
Co-authored-by: Kit Langton <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank <[email protected]>
Co-authored-by: Dax <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Joscha Götzer <[email protected]>
Co-authored-by: JosXa <[email protected]>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Sebastian <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: MC <[email protected]>
Co-authored-by: Valentin Vivaldi <[email protected]>
Co-authored-by: Aaron Zhu <[email protected]>
Co-authored-by: Aaron Zhu <[email protected]>
Co-authored-by: dpuyosa <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: Noam Bressler <[email protected]>
Co-authored-by: Burak Yigit Kaya <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Lenny Vaknine <[email protected]>
Co-authored-by: Lenny Vaknine <[email protected]>
Co-authored-by: ykswang <[email protected]>
Co-authored-by: Juan Pablo Carranza Hurtado <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Kevin Flansburg <[email protected]>
Co-authored-by: Nate Williams <[email protected]>
Co-authored-by: David Hill <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: luanweslley77 <[email protected]>
Co-authored-by: opencode <[email protected]>
Co-authored-by: Yuxin Dong <[email protected]>
Co-authored-by: dongyuxin <[email protected]>
Co-authored-by: Gautier DI FOLCO <[email protected]>
Co-authored-by: George Harker <[email protected]>
Co-authored-by: Corné Steenhuis <[email protected]>
Co-authored-by: Derek Barrera <[email protected]>
@achin90 achin90 mentioned this pull request Apr 10, 2026
DispatchTUI prtest achin90/Dispatch#3
Closed
@kkugot

kkugot commented Apr 13, 2026

Copy link
Copy Markdown

There is still issue for some other providers after AI SDK 6 update, please see this PR #20467

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
@valenvivaldi @rekram1-node
fix(core): prevent agent loop from stopping after tool calls with Ope…
7256211
…nAI-compatible providers (anomalyco#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@valenvivaldi @rekram1-node
fix(core): prevent agent loop from stopping after tool calls with Ope…
679385d
…nAI-compatible providers (anomalyco#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
@valenvivaldi @rekram1-node
fix(core): prevent agent loop from stopping after tool calls with Ope…
4f8d523
…nAI-compatible providers (anomalyco#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
@c3-harshalgajjar

c3-harshalgajjar commented Jul 8, 2026

Copy link
Copy Markdown

When is this going to be released?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node

rekram1-node commented Jul 8, 2026

Copy link
Copy Markdown
Member

@c3-harshalgajjar its been released for weeks

c3-harshalgajjar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@valenvivaldi @rekram1-node
fix(core): prevent agent loop from stopping after tool calls with Ope…
5170b27
…nAI-compatible providers (#14973)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Agent stops after tool execution with OpenAI-compatible providers (Gemini, LiteLLM)

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@valenvivaldi @martin-liu @rekram1-node @kkugot @c3-harshalgajjar
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.