litellm - 💡(How to fix) Fix [Bug]: Under Anthropic style calls (with function-call), hosted-vllm backend responses tool-call with "invalid JSON" [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24695Fetched 2026-04-08 01:42:08
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Code Example

model_list:
  - model_name: "*"
    litellm_params:
      model: hosted_vllm/GLM-4.7-Flash
      api_base: http://127.0.0.1:1024/v1
      api_key: "none"
      drop_params: true
general_settings:
  disable_auth: true

---

litellm --config config.yaml --port 1025

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

version: 1.82.6

config.yaml:

model_list:
  - model_name: "*"
    litellm_params:
      model: hosted_vllm/GLM-4.7-Flash
      api_base: http://127.0.0.1:1024/v1
      api_key: "none"
      drop_params: true
general_settings:
  disable_auth: true

service start command:

litellm --config config.yaml --port 1025

Steps to Reproduce

Relevant log output

What part of LiteLLM is this about?

No response

What LiteLLM version are you on ?

v1.82.6

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

The fix involves modifying the config.yaml file to correctly configure the API connection.

Steps to Fix

  • Update the api_base URL in config.yaml to include the correct protocol and port.
  • Ensure the api_key is correctly set if authentication is required.

Example Code

model_list:
  - model_name: "*"
    litellm_params:
      model: hosted_vllm/GLM-4.7-Flash
      api_base: http://127.0.0.1:1024/v1
      api_key: "your_api_key_here"  # Replace with your actual API key
      drop_params: true

Verification

Start the service with the updated config.yaml file using the command litellm --config config.yaml --port 1025 and verify that the API connection is successful by checking the log output for any error messages related to the API connection.

Extra Tips

  • Make sure to replace "your_api_key_here" with your actual API key if authentication is required.
  • If you're still experiencing issues, try checking the API documentation for any specific requirements or restrictions on API connections.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING