litellm - 💡(How to fix) Fix Custom_openaiException - AsyncCompletions.create() got an unexpected keyword argument 'client_metadata' [1 pull requests]

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…

Error Message

this is error infomation: "traceback": " File "/usr/lib/python3.13/site-packages/litellm/proxy/response_api_endpoints/endpoints.py", line 198, in responses_api\n response = await processor.base_process_llm_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<16 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/proxy/common_request_processing.py", line 992, in base_process_llm_request\n responses = await llm_responses\n ^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5083, in async_wrapper\n return await self._ageneric_api_call_with_fallbacks(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<2 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3779, in _ageneric_api_call_with_fallbacks\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3766, in _ageneric_api_call_with_fallbacks\n response = await self.async_function_with_fallbacks(**kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5489, in async_function_with_fallbacks\n return await self.async_function_with_fallbacks_common_utils(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<8 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5446, in async_function_with_fallbacks_common_utils\n raise original_exception\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5480, in async_function_with_fallbacks\n response = await self.async_function_with_retries(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5743, in async_function_with_retries\n raise original_exception\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5672, in async_function_with_retries\n response = await self.make_call(original_function, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5754, in make_call\n response = await response\n ^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3891, in _ageneric_api_call_with_fallbacks_helper\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3877, in _ageneric_api_call_with_fallbacks_helper\n response = await response # type: ignore\n ^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 2094, in wrapper_async\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 1893, in wrapper_async\n result = await original_function(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/responses/main.py", line 580, in aresponses\n raise litellm.exception_type(\n ...<5 lines>...\n )\n File "/usr/lib/python3.13/site-packages/litellm/responses/main.py", line 558, in aresponses\n response = await init_response\n ^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/responses/litellm_completion_transformation/handler.py", line 114, in async_response_api_handler\n ] = await litellm.acompletion(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n **acompletion_args,\n ^^^^^^^^^^^^^^^^^^^\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 2094, in wrapper_async\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 1893, in wrapper_async\n result = await original_function(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/main.py", line 639, in acompletion\n raise exception_type(\n ~~~~~~~~~~~~~~^\n model=model,\n ^^^^^^^^^^^^\n ...<3 lines>...\n extra_kwargs=kwargs,\n ^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2456, in exception_type\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 588, in exception_type\n raise InternalServerError(\n ...<5 lines>...\n )\n"

Root Cause

then, i add a virtual key to share this model, then ,i use cc-switch to add this model because i use codex ,and test is ok

Fix Action

Fixed

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?

[Bug]: litellm.InternalServerError: InternalServerError: Custom_openaiException - AsyncCompletions.create() got an unexpected keyword argument 'client_metadata'. Received Model Group=qwen3.5-0.8b Available Model Group Fallbacks=None LiteLLM Retried: 2 times

my config.yaml is:

general_settings: master_key: sk-1234 # ? your proxy admin key (must start with sk-) database_url: "postgresql://llmproxy:dbpassword9090@db:5432/litellm" store_model_in_db: True

litellm_settings:

set_verbose: True # Uncomment this if you want to see verbose logs; not recommended in production

drop_params: True

Steps to Reproduce

first. i use lmstudio create model, the model name is "qwen3.5-0.8b", then, i use litellm add model,provider , i chose custom openai

<img width="1277" height="258" alt="Image" src="https://github.com/user-attachments/assets/328a27f1-702f-441d-9869-1a66db0eef40" />

then, i add a virtual key to share this model, then ,i use cc-switch to add this model because i use codex ,and test is ok

<img width="692" height="543" alt="Image" src="https://github.com/user-attachments/assets/7c378637-82ed-449b-8daa-d7f0234ff247" />

then, i use codex

<img width="975" height="149" alt="Image" src="https://github.com/user-attachments/assets/4e173777-7036-4c6a-b195-be38c3074181" /> <img width="904" height="316" alt="Image" src="https://github.com/user-attachments/assets/6036b391-899d-4ddb-908f-711dfbf86f1b" />

this is error infomation:

"error_information": { "traceback": " File "/usr/lib/python3.13/site-packages/litellm/proxy/response_api_endpoints/endpoints.py", line 198, in responses_api\n response = await processor.base_process_llm_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<16 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/proxy/common_request_processing.py", line 992, in base_process_llm_request\n responses = await llm_responses\n ^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5083, in async_wrapper\n return await self._ageneric_api_call_with_fallbacks(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<2 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3779, in _ageneric_api_call_with_fallbacks\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3766, in _ageneric_api_call_with_fallbacks\n response = await self.async_function_with_fallbacks(**kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5489, in async_function_with_fallbacks\n return await self.async_function_with_fallbacks_common_utils(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<8 lines>...\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5446, in async_function_with_fallbacks_common_utils\n raise original_exception\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5480, in async_function_with_fallbacks\n response = await self.async_function_with_retries(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5743, in async_function_with_retries\n raise original_exception\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5672, in async_function_with_retries\n response = await self.make_call(original_function, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 5754, in make_call\n response = await response\n ^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3891, in _ageneric_api_call_with_fallbacks_helper\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/router.py", line 3877, in _ageneric_api_call_with_fallbacks_helper\n response = await response # type: ignore\n ^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 2094, in wrapper_async\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 1893, in wrapper_async\n result = await original_function(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/responses/main.py", line 580, in aresponses\n raise litellm.exception_type(\n ...<5 lines>...\n )\n File "/usr/lib/python3.13/site-packages/litellm/responses/main.py", line 558, in aresponses\n response = await init_response\n ^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/responses/litellm_completion_transformation/handler.py", line 114, in async_response_api_handler\n ] = await litellm.acompletion(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n **acompletion_args,\n ^^^^^^^^^^^^^^^^^^^\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 2094, in wrapper_async\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/utils.py", line 1893, in wrapper_async\n result = await original_function(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.13/site-packages/litellm/main.py", line 639, in acompletion\n raise exception_type(\n ~~~~~~~~~~~~~~^\n model=model,\n ^^^^^^^^^^^^\n ...<3 lines>...\n extra_kwargs=kwargs,\n ^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2456, in exception_type\n raise e\n File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 588, in exception_type\n raise InternalServerError(\n ...<5 lines>...\n )\n"

Relevant log output

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.82.6

Twitter / LinkedIn details

No response

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

litellm - 💡(How to fix) Fix Custom_openaiException - AsyncCompletions.create() got an unexpected keyword argument 'client_metadata' [1 pull requests]