litellm - 💡(How to fix) Fix [Bug]: Error reported when configuring the OpenAI API for the Aliyun Coding Plan in the Litellm backend [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#24842Fetched 2026-04-08 01:59:15
View on GitHub
Comments
3
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
commented ×3closed ×1labeled ×1

Error Message

cluade code error:

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?

litellm version : [v1.82.6] use docker images: ghcr.io/berriai/litellm:main-latest config:

  • model_name: qwen3.5-plus
    litellm_params: model: openai/qwen3.5-plus
    api_base: https://coding.dashscope.aliyuncs.com/v1 api_key: sk-sp-***
    rpm: 100
    stream: true model_info: supports_tool_use: true supports_function_calling: true
    supports_streaming: true input_cost_per_token: 0.0000008 output_cost_per_token: 0.0000048 litellm_settings: drop_params: True
    translate_tools: true modify_params: true use_chat_completions_url_for_anthropic_messages: true

cluade code error: Cannot read properties of undefined (reading 'input_tokens')

Steps to Reproduce

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.82.6

Twitter / LinkedIn details

No response

extent analysis

TL;DR

The error "Cannot read properties of undefined (reading 'input_tokens')" suggests a potential issue with the configuration or the model's input handling, which may be resolved by verifying the model settings and input data.

Guidance

  • Review the litellm_params and model_info configurations to ensure that the input_tokens property is correctly defined and passed to the model.
  • Check the api_base and api_key settings to verify that the API connection is established correctly and the model is properly initialized.
  • Investigate the drop_params setting in litellm_settings, as it may be causing the input_tokens property to be dropped or undefined.
  • Verify that the input data being passed to the model is correctly formatted and contains the required input_tokens property.

Example

No specific code example can be provided without more context, but ensuring that the input_tokens property is defined and passed correctly to the model is crucial.

Notes

The issue may be related to the specific model version (qwen3.5-plus) or the API connection settings. Further investigation into the model's documentation and the API's requirements may be necessary to resolve the issue.

Recommendation

Apply workaround: Verify and adjust the model settings and input data to ensure that the input_tokens property is correctly defined and passed to the model. This is recommended because the issue seems to be related to the configuration or input handling, and adjusting these settings may resolve the error without requiring an upgrade or more invasive changes.

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