Skip to content

Navigation Menu

Sign in
Sign up

TypeError: AsyncOpenAI.__init__() got an unexpected keyword argument 'extra_headers' #190

Unanswered
uniform641 asked this question in Q&A
Discussion options

I met a problem running bub locally. I follow the instructions on https://bub.build/docs/getting-started/run-bub-locally/ with changes on .env (BUB_CLIENT_ARGS={"extra_headers":{"HTTP-Referer":"https://openclaw.ai","X-Title":"OpenClaw"}}). When I use bub by uv run bub chat, it responses with

 File "/home/uniform64/bub/.venv/lib/python3.14/site-packages/any_llm/any_llm.py", line 224, in _create_provider
 return provider_class(api_key=api_key, api_base=api_base, **kwargs)
 │ │ │ └ {'extra_headers': {'HTTP-Referer': 'https://openclaw.ai', 'X-Title': 'OpenClaw'}}
 │ │ └ 'https://api.kimi.com/coding/v1'
 │ └ 'sk-kimi-'
 └ <class 'any_llm.providers.moonshot.moonshot.MoonshotProvider'>
 File "/home/uniform64/bub/.venv/lib/python3.14/site-packages/any_llm/any_llm.py", line 118, in __init__
 self._init_client(
 │ └ <function BaseOpenAIProvider._init_client at 0x7f61f3c9ef00>
 └ <any_llm.providers.moonshot.moonshot.MoonshotProvider object at 0x7f61f25dee40>
 File "/home/uniform64/bub/.venv/lib/python3.14/site-packages/any_llm/providers/openai/base.py", line 161, in _init_client
 self.client = AsyncOpenAI(
 │ └ <class 'openai.AsyncOpenAI'>
 └ <any_llm.providers.moonshot.moonshot.MoonshotProvider object at 0x7f61f25dee40>
TypeError: AsyncOpenAI.__init__() got an unexpected keyword argument 'extra_headers'
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────── Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ An error occurred at stage 'turn': AsyncOpenAI.__init__() got an unexpected keyword argument 'extra_headers' │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Is there anything wrong with my config? How can I fix it?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /