agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

model selector

Open FatherfoxStrongpaw opened this issue 5 months ago • 1 comments

Traceback (most recent call last): Traceback (most recent call last): File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/llm_http_handler.py", line 111, in _make_common_async_call response = await async_httpx_client.post( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/litellm_core_utils/logging_utils.py", line 135, in async_wrapper result = await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 324, in post raise e File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 280, in post response.raise_for_status() File "/opt/venv/lib/python3.12/site-packages/httpx/_models.py", line 829, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://openrouter.ai/api/v1/chat/completions' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/venv/lib/python3.12/site-packages/litellm/main.py", line 538, in acompletion response = await init_response ^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/llm_http_handler.py", line 600, in acompletion_stream_function completion_stream, _response_headers = await self.make_async_call_stream_helper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/llm_http_handler.py", line 659, in make_async_call_stream_helper response = await self._make_common_async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/llm_http_handler.py", line 136, in _make_common_async_call raise self._handle_error(e=e, provider_config=provider_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/llms/custom_httpx/llm_http_handler.py", line 2403, in _handle_error raise provider_config.get_error_class( litellm.llms.openrouter.common_utils.OpenRouterException: {"error":{"message":"No auth credentials found","code":401}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/a0/agent.py", line 323, in monologue prompt = await self.prepare_prompt(loop_data=self.loop_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/agent.py", line 411, in prepare_prompt await self.call_extensions("message_loop_prompts_after", loop_data=loop_data) File "/a0/agent.py", line 831, in call_extensions await cls(agent=self).execute(**kwargs) File "/a0/python/extensions/message_loop_prompts_after/_91_recall_wait.py", line 13, in execute await task File "/usr/lib/python3.12/asyncio/futures.py", line 289, in await yield self # This tells Task to wait for completion. ^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup future.result()

16 stack lines skipped <<<

File "/a0/models.py", line 272, in unified_call _completion = await acompletion( ^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/utils.py", line 1552, in wrapper_async raise e File "/opt/venv/lib/python3.12/site-packages/litellm/utils.py", line 1410, in wrapper_async result = await original_function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/main.py", line 557, in acompletion raise exception_type( ^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2293, in exception_type raise e File "/opt/venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2164, in exception_type raise AuthenticationError( litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenrouterException - {"error":{"message":"No auth credentials found","code":401}}

litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenrouterException - {"error":{"message":"No auth credentials found","code":401}}

just trying to use a different model than your default. you really need to get the model selector straight.

FatherfoxStrongpaw avatar Aug 03 '25 03:08 FatherfoxStrongpaw

AuthenticationError: OpenrouterException - {"error":{"message":"No auth credentials found" Meaning API key for openrouter is invalid or not set.

frdel avatar Aug 06 '25 20:08 frdel