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 — LiteLLM error: Anthropic doesn't support tool calling without tools= param specified · Issue #2915 · anomalyco/opencode

LiteLLM error: Anthropic doesn't support tool calling without tools= param specified #2915

New issue
Copy link
New issue
Copy link
Closed
#8658
Closed
LiteLLM error: Anthropic doesn't support tool calling without tools= param specified#2915
#8658
Copy link
Assignees
rekram1-node

Description

@jessevdp
jessevdp
opened on Oct 2, 2025
Issue body actions

I'm running into some issues related to my provider: LiteLLM proxy. I realize this is a somewhat niche case, sorry 😬. See my config below.

Is this somehow something I can resolve client side?

AI_APICallError: litellm.UnsupportedParamsError: Anthropic doesn't support tool calling without tools= param specified. Pass tools= param OR set litellm.modify_params = True // litellm_settings::modify_params: True to add dummy tool to the request.

Dummy session with the error (error not shown in web UI for some reason?): https://opencode.ai/s/SWAsOXyz

Image

My config

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "my-litellm-provider": {
      "name": "My LiteLLM Provider",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://my-provider.com",
        "apiKey": "...",
        "includeUsage": true
      },
      "models": {
        "claude-4-5-sonnet": {
          "name": "Anthropic Claude 4.5 Sonnet",
          "release_date": "2025-09-29",
          "attachment": true,
          "reasoning": true,
          "temperature": true,
          "tool_call": true,
          "limit": {
            "context": 200000,
            "output": 64000
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budget_tokens": 16000,
            },
          }
        },
      }
    }
  }
}
Reacted by TJ Kolleh and Emerson Matos

Activity

  1. jessevdp commented on Oct 2, 2025

    @jessevdp
    jessevdp
    on Oct 2, 2025
    ContributorAuthor
    More actions

    It seems to only happen / error with the thinking options added.

  2. rekram1-node
    self-assigned this
    on Oct 2, 2025
  3. rekram1-node commented on Oct 2, 2025

    @rekram1-node
    rekram1-node
    on Oct 2, 2025
    Member
    More actions

    @jessevdp is your proxy dropping metadata? it seems like the issue is on your proxy rather than opencode.

    If you turn on reasoning we need to keep the reasoning chunks otherwise anthropic with return error

  4. jessevdp commented on Oct 3, 2025

    @jessevdp
    jessevdp
    on Oct 3, 2025
    ContributorAuthor
    More actions

    Thanks for getting back to me!

    I might have been too quick to come to conclusions. I turned off thinking mode because this LiteLLM proxy distributes between Google Vertex and AWS Bedrock and it seems when forwarding to Vertex thinking mode was giving an error.

    (I left a comment on a closed, seemingly sorta related issue #2599 (comment))

    After turning thinking mode off I was back to not getting those tools related error messages and continued work. But later in the day the error messages returned.

    What might have happened is that earlier in the day the issue was still there, but LiteLLM was falling back / retrying on Vertex (Bedrock is our main provider) and since thinking was now disabled those requests would succeed. We might have simply run out of Vertex capacity later that day.

    What’s interesting is that whenever I get this error and I just type “go” the agent seems fine to just carry on. But that might again just be related to capacity on Google Vertex I suppose…


    Anyway, I probably need to do some more digging to figure out what’s happening.

    Is there some way to enable a nice HTTP log? That way I can inspect the request that resulted in this issue. I’ve tried log level DEBUG but that doesn’t seem to be it.

    Reacted by Aiden Cline
  5. rekram1-node commented on Oct 3, 2025

    @rekram1-node
    rekram1-node
    on Oct 3, 2025
    Member
    More actions

    hm dont think we do any http logs now? I feel like we used to do it may still be possible id have to check

  6. mschenk42 commented on Oct 25, 2025

    @mschenk42
    mschenk42
    on Oct 25, 2025
    More actions

    I am also encountering this issue. This appears to occur consistently when the session is compressed either manually or automatically upon reaching the context limit. Otherwise, the system functions flawlessly. Given that it appears to be triggered by compression, it does not appear to be related to using the Lite LLM Proxy.

    I wanted to give you a heads up about the configuration. This is the main agent that uses subagents. I'm wondering if there's anything to do with the subagent sessions?

    When running without subagents manual compaction works fine.

    Image
    Reacted by Mark Henderson, Bo Xing and Yoonseok Kim
  7. rekram1-node commented on Oct 25, 2025

    @rekram1-node
    rekram1-node
    on Oct 25, 2025
    Member
    More actions

    would it be fixed if we just passed an empty tools array when we compact?

  8. mschenk42 commented on Oct 27, 2025

    @mschenk42
    mschenk42
    on Oct 27, 2025
    More actions

    Yeah, based on the error message that seems like it would resolve the problem.

  9. rekram1-node commented on Oct 27, 2025

    @rekram1-node
    rekram1-node
    on Oct 27, 2025
    Member
    More actions

    ill try that

  10. anomalyco
    deleted a comment from opencode-agent on Oct 27, 2025
  11. rekram1-node commented on Oct 27, 2025

    @rekram1-node
    rekram1-node
    on Oct 27, 2025
    Member
    More actions

    Should be fixed by: 0af4505

    Will release soon

    Reacted by Michael Schenk
  12. mschenk42 commented on Oct 28, 2025

    @mschenk42
    mschenk42
    on Oct 28, 2025
    More actions

    Unfortunately that didn't work. I'm going to reach out to our team that manages our Lite LLM Proxy. Thanks for trying to resolve. I'll share here if I find a way to resolve this.

  13. rekram1-node commented on Oct 28, 2025

    @rekram1-node
    rekram1-node
    on Oct 28, 2025
    Member
    More actions

    thank you for heads up

  14. hewliyang commented on Nov 5, 2025

    @hewliyang
    hewliyang
    on Nov 5, 2025
    More actions

    A long time ago, Anthropic models would throw an error if you submitted a completions request w/ a message history containing tool calls & results - but don't pass in any tools. This is what happens during compaction, where we send the existing conversation history + a summary prompt, but disable all tools, i.e. completion([...existing_history_with_tools, summarize_prompt])

    https://github.com/BerriAI/litellm/blob/c45fad3855847715afaebba71926f8e84eb7b355/litellm/llms/anthropic/chat/transformation.py#L672-L686

            if (
                "tools" not in optional_params
                and messages is not None
                and has_tool_call_blocks(messages)
            ):
                if litellm.modify_params:
                    optional_params["tools"], _ = self._map_tools(
                        add_dummy_tool(custom_llm_provider="anthropic")
                    )
                else:
                    raise litellm.UnsupportedParamsError(
                        message="Anthropic doesn't support tool calling without `tools=` param specified. Pass `tools=` param OR set `litellm.modify_params = True` // `litellm_settings::modify_params: True` to add dummy tool to the request.",
                        model="",
                        llm_provider="anthropic",
                    )

    This is no longer the case (evidenced by the fact that compaction works fine via AI SDK). In the short term you can fix this on the LiteLLM side by running the proxy with modify_params=True, as the error message implies. This will add a dummy tool to the request in this case

    https://github.com/BerriAI/litellm/blob/c45fad3855847715afaebba71926f8e84eb7b355/litellm/utils.py#L6809-L6827

    def add_dummy_tool(custom_llm_provider: str) -> List[ChatCompletionToolParam]:
        """
        Prevent Anthropic from raising error when tool_use block exists but no tools are provided.
    
        Relevent Issues: https://github.com/BerriAI/litellm/issues/5388, https://github.com/BerriAI/litellm/issues/5747
        """
        return [
            ChatCompletionToolParam(
                type="function",
                function=ChatCompletionToolParamFunctionChunk(
                    name="dummy_tool",
                    description="This is a dummy tool call",  # provided to satisfy bedrock constraint.
                    parameters={
                        "type": "object",
                        "properties": {},
                    },
                ),
            )
        ]

    But obviously this is suboptimal because now your arguments can be massaged in unknown ways.

    tldr: not an opencode problem, litellm has a lot of footguns

    Reacted by Christopher Sacca and Michael Schenk
  15. geoHeil commented on Dec 29, 2025

    @geoHeil
    geoHeil
    on Dec 29, 2025
    More actions

    For me, the native pass-through works much better

      "provider": {
        "my-litellm": {
        "my-anthropic": {
          "npm": "@ai-sdk/anthropic",
          "name": "my LiteLLM (Anthropic native)",
          "options": {
            "baseURL": "https://llm.my.corp.com/anthropic/v1",
            "apiKey": "{env:MY_KEY}"
          },
    
    Reacted by Jonathan Beckman, Emerson Gomes and Ryan Beall
  16. danielfrg commented on Jan 13, 2026

    @danielfrg
    danielfrg
    on Jan 13, 2026
    Contributor
    More actions

    I understand this is not an opencode problem directly but its hard to make changes on existing deployments in large companies. This is not the end of the world since a new session is usually fine to continue existing work but a workaround in the config would be nice, maybe a way to set a dummy tool in all calls so compaction works?

  17. hendem
    added a commit that references this issue on Jan 14, 2026

    fix: handle dangling tool_use blocks for LiteLLM proxy compatibility

    This issue will close once commit d805c88 is merged into the 'dev' branch.
    d805c88
  18. seilk
    added a commit that references this issue on Jan 15, 2026

    fix: handle dangling tool_use blocks for LiteLLM proxy compatibility

    This issue will close once commit 06d514a is merged into the 'main' branch.
    06d514a
  19. rekram1-node
    closed this as completedin #8658on Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.