BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
13.8k stars 1.62k forks source link

[Bug]: Trying to use AWS credentials even if not use AWS model #6686

Closed joaomdmoura closed 2 days ago

joaomdmoura commented 2 days ago

What happened?

Got an error where it tried to send the AWS_* env vars to the request even tho I'm using openai's mode. Also results in the request failing.

Relevant log output

File "/Users/joaomoura/workspace/aws_infrastructure_security_audit_and_reporting/.venv/lib/python3.11/site-packages/litellm/utils.py", line 958, in wrapper
    raise e
  File "/Users/joaomoura/workspace/aws_infrastructure_security_audit_and_reporting/.venv/lib/python3.11/site-packages/litellm/utils.py", line 847, in wrapper
    result = original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joaomoura/workspace/aws_infrastructure_security_audit_and_reporting/.venv/lib/python3.11/site-packages/litellm/main.py", line 3032, in completion
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/Users/joaomoura/workspace/aws_infrastructure_security_audit_and_reporting/.venv/lib/python3.11/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2122, in exception_type
    raise e
  File "/Users/joaomoura/workspace/aws_infrastructure_security_audit_and_reporting/.venv/lib/python3.11/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 282, in exception_type
    raise BadRequestError(
litellm.exceptions.BadRequestError: litellm.BadRequestError: OpenAIException - Error code: 400 - {'error': {'message': 'Unrecognized request arguments supplied: AWS_ACCESS_KEY_ID, AWS_REGION_NAME, AWS_SECRET_ACCESS_KEY', 'type': 'invalid_request_error', 'param': None, 'code': None}}
An error occurred while running the crew: Command '['uv', 'run', 'run_crew']' returned non-zero exit status 1.

Twitter / LinkedIn details

No response

joaomdmoura commented 2 days ago

nvm me, it proved to be an issue somewhere else in my code