Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix: avoid Anthropic tool-history requests without tools#8248

Open
seilk wants to merge 1 commit intoanomalyco:devanomalyco/opencode:devfrom
seilk:fix/anthropic-tool-history-tools-paramseilk/opencode:fix/anthropic-tool-history-tools-paramCopy head branch name to clipboard
Open

fix: avoid Anthropic tool-history requests without tools#8248
seilk wants to merge 1 commit intoanomalyco:devanomalyco/opencode:devfrom
seilk:fix/anthropic-tool-history-tools-paramseilk/opencode:fix/anthropic-tool-history-tools-paramCopy head branch name to clipboard

Conversation

@seilk
Copy link
Contributor

@seilk seilk commented Jan 13, 2026

What does this PR do?

Fixes Anthropic/LiteLLM proxies rejecting requests when message history contains tool calls but tools param is empty.
Adds a dummy tool when:

How did you verify your code works?

  • bun run tsc --noEmit passes
  • Tested with LiteLLM gateway: tool-history requests now succeed
  • Existing tests unaffected (557 pass, 95 fail - same as baseline)

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

packages/opencode/src/session/llm.ts Outdated Show resolved Hide resolved
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.

fix: Anthropic via LiteLLM/proxies rejects requests with tool history but no tools param

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.