Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: mistral-embed 'Extra inputs are not permitted' #3725

Open
lolsborn opened this issue May 18, 2024 · 5 comments
Open

[Bug]: mistral-embed 'Extra inputs are not permitted' #3725

lolsborn opened this issue May 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@lolsborn
Copy link

What happened?

Related to: #1471

Currently I've tested open-mixtral-8x7b and everything works fine, but mistral-embed fails with a message that says 'Extra inputs are not permitted'

This looks like the same bug mentioned in #1471 but is effecting mistral-extra (and possibly other untested mistal models)

Relevant log output

Traceback (most recent call last):
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/proxy/proxy_server.py", line 3882, in embeddings
    response = await llm_router.aembedding(**data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1204, in aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1201, in aembedding
    response = await self.async_function_with_fallbacks(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1386, in async_function_with_fallbacks
    raise original_exception
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1307, in async_function_with_fallbacks
    response = await self.async_function_with_retries(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1447, in async_function_with_retries
    raise original_exception
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1403, in async_function_with_retries
    response = await original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1294, in _aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1281, in _aembedding
    response = await response
               ^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3465, in wrapper_async
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3297, in wrapper_async
    result = await original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/main.py", line 2507, in aembedding
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 8708, in exception_type
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 7461, in exception_type
    raise BadRequestError(
litellm.exceptions.BadRequestError: MistralException - Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}
INFO:     127.0.0.1:61246 - "POST /embeddings HTTP/1.1" 422 Unprocessable Entity

Twitter / LinkedIn details

No response

@lolsborn lolsborn added the bug Something isn't working label May 18, 2024
@lolsborn
Copy link
Author

The key bits here seem to be [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted' I think the body and user keys should be omitted

@krrishdholakia
Copy link
Contributor

@lolsborn can you run the query with --detailed_debug if you're on the proxy (or litellm.set_verbose = True on the sdk)

and share what the curl request from litellm is

@lolsborn
Copy link
Author

19:26:15 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - Inside Max Parallel Request Pre-Call Hook
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: litellm::2024-05-18-19-26::request_count; local_only: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: {'current_requests': 0, 'current_tpm': 27819, 'current_rpm': 55}
19:26:15 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - current: {'current_requests': 0, 'current_tpm': 27819, 'current_rpm': 55}
19:26:15 - LiteLLM Proxy:DEBUG: tpm_rpm_limiter.py:33 - Inside Max TPM/RPM Limiter Pre-Call Hook - token='123' key_name=None key_alias=None spend=0.0 max_budget=None expires=None models=[] aliases={} config={} user_id=None team_id=None max_parallel_requests=None metadata={} tpm_limit=None rpm_limit=None budget_duration=None budget_reset_at=None allowed_cache_controls=[] permissions={} model_spend={} model_max_budget={} soft_budget_cooldown=False litellm_budget_table=None org_id=None user_id_rate_limits=None team_id_rate_limits=None team_spend=None team_alias=None team_tpm_limit=None team_rpm_limit=None team_max_budget=None team_models=[] team_blocked=False soft_budget=None team_model_aliases=None api_key='litellm' user_role=None
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: litellm; local_only: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: None
19:26:15 - LiteLLM Proxy:DEBUG: tpm_rpm_limiter.py:33 - _set_limits: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: None_user_api_key_user_id; local_only: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: None
19:26:15 - LiteLLM Proxy:DEBUG: utils.py:37 - final data being sent to embeddings call: {'input': ['wall of text'], 'user': ''}'


19:26:15 - LiteLLM:DEBUG: utils.py:958 - Async Wrapper: Completed Call, calling async_success_handler: <bound method Logging.async_success_handler of <litellm.utils.Logging object at 0x109a37170>>
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Logging Details LiteLLM-Success Call: None
19:26:15 - LiteLLM:DEBUG: utils.py:1309 - Model=dataroom-mvp-gpt35;
19:26:15 - LiteLLM:DEBUG: utils.py:4052 - completion_response response ms: 996.063 
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Looking up model=azure/gpt-35-turbo in model_cost_map
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Success: model=azure/gpt-35-turbo in model_cost_map
19:26:15 - LiteLLM:DEBUG: utils.py:958 - prompt_tokens=499; completion_tokens=1
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Returned custom cost for model=azure/gpt-35-turbo - prompt_tokens_cost_usd_dollar: 0.0007485, completion_tokens_cost_usd_dollar: 2e-06
19:26:15 - LiteLLM:DEBUG: utils.py:958 - final cost: 0.0007505000000000001; prompt_tokens_cost_usd_dollar: 0.0007485; completion_tokens_cost_usd_dollar: 2e-06
19:26:15 - LiteLLM:DEBUG: utils.py:958 - success callbacks: [<litellm.proxy.hooks.parallel_request_limiter._PROXY_MaxParallelRequestsHandler object at 0x1093e9d60>, <litellm.proxy.hooks.tpm_rpm_limiter._PROXY_MaxTPMRPMLimiter object at 0x1093e9d90>, <litellm.proxy.hooks.max_budget_limiter._PROXY_MaxBudgetLimiter object at 0x1093e9dc0>, <litellm.proxy.hooks.cache_control_check._PROXY_CacheControlCheck object at 0x1093e9df0>, <litellm._service_logger.ServiceLogging object at 0x109792930>]
19:26:15 - LiteLLM Router:INFO: router.py:529 - litellm.acompletion(model=azure/dataroom-mvp-gpt35)�[32m 200 OK
19:26:15 - LiteLLM Router:DEBUG: router.py:1308 - Async Response: ModelResponse(id='chatcmpl-9QQXXXTOuRrSJznUiDjqaYMzDbxxd', choices=[Choices(finish_reason='stop', index=0, message=Message(content='100', role='assistant'))], created=1716085575, model='gpt-35-turbo', object='chat.completion', system_fingerprint=None, usage=Usage(completion_tokens=1, prompt_tokens=499, total_tokens=500))
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Logging Details LiteLLM-Async Success Call: None
19:26:15 - LiteLLM:DEBUG: utils.py:1309 - Model=dataroom-mvp-gpt35;
19:26:15 - LiteLLM:DEBUG: utils.py:4052 - completion_response response ms: 996.063 
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Looking up model=azure/gpt-35-turbo in model_cost_map
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Success: model=azure/gpt-35-turbo in model_cost_map
19:26:15 - LiteLLM:DEBUG: utils.py:958 - prompt_tokens=499; completion_tokens=1
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Returned custom cost for model=azure/gpt-35-turbo - prompt_tokens_cost_usd_dollar: 0.0007485, completion_tokens_cost_usd_dollar: 2e-06
19:26:15 - LiteLLM:DEBUG: utils.py:958 - final cost: 0.0007505000000000001; prompt_tokens_cost_usd_dollar: 0.0007485; completion_tokens_cost_usd_dollar: 2e-06
19:26:15 - LiteLLM:DEBUG: utils.py:958 - Async success callbacks: [<litellm.proxy.hooks.parallel_request_limiter._PROXY_MaxParallelRequestsHandler object at 0x1093e9d60>, <litellm.proxy.hooks.tpm_rpm_limiter._PROXY_MaxTPMRPMLimiter object at 0x1093e9d90>, <litellm.proxy.hooks.max_budget_limiter._PROXY_MaxBudgetLimiter object at 0x1093e9dc0>, <litellm.proxy.hooks.cache_control_check._PROXY_CacheControlCheck object at 0x1093e9df0>, <litellm._service_logger.ServiceLogging object at 0x109792930>, <bound method ProxyLogging.response_taking_too_long_callback of <litellm.proxy.utils.ProxyLogging object at 0x1093e99a0>>]
19:26:15 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - INSIDE parallel request limiter ASYNC SUCCESS LOGGING
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: litellm::2024-05-18-19-26::request_count; local_only: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: {'current_requests': 0, 'current_tpm': 27819, 'current_rpm': 55}
19:26:15 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - updated_value in success call: {'current_requests': 0, 'current_tpm': 28319, 'current_rpm': 56}, precise_minute: 2024-05-18-19-26
19:26:15 - LiteLLM:DEBUG: caching.py:22 - set cache: key: litellm::2024-05-18-19-26::request_count; value: {'current_requests': 0, 'current_tpm': 28319, 'current_rpm': 56}
19:26:15 - LiteLLM:DEBUG: caching.py:22 - InMemoryCache: set_cache
19:26:15 - LiteLLM Proxy:DEBUG: tpm_rpm_limiter.py:33 - INSIDE TPM RPM Limiter ASYNC SUCCESS LOGGING
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: litellm; local_only: False
19:26:15 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: None
INFO:     127.0.0.1:60313 - "POST /chat/completions HTTP/1.1" 200 OK
19:26:16 - LiteLLM:DEBUG: utils.py:958 - RAW RESPONSE:
Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}


19:26:16 - LiteLLM:DEBUG: utils.py:958 - Logging Details: logger_fn - None | callable(logger_fn) - False
19:26:16 - LiteLLM:DEBUG: utils.py:958 - Logging Details LiteLLM-Failure Call
19:26:16 - LiteLLM Router:DEBUG: router.py:1775 - Attempting to add 123444 to cooldown list. updated_fails: 1; self.allowed_fails: 0
19:26:16 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: 02-26:cooldown_models; local_only: False
19:26:16 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: None
19:26:16 - LiteLLM Router:DEBUG: router.py:1784 - adding 123444 to cooldown models
19:26:16 - LiteLLM:DEBUG: caching.py:22 - set cache: key: 02-26:cooldown_models; value: ['123444']
19:26:16 - LiteLLM:DEBUG: caching.py:22 - InMemoryCache: set_cache
19:26:16 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - Inside Max Parallel Request Failure Hook
19:26:16 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - user_api_key: litellm
19:26:16 - LiteLLM:DEBUG: caching.py:22 - get cache: cache key: litellm::2024-05-18-19-26::request_count; local_only: False
19:26:16 - LiteLLM:DEBUG: caching.py:22 - get cache: cache result: {'current_requests': 0, 'current_tpm': 28319, 'current_rpm': 56}
19:26:16 - LiteLLM Proxy:DEBUG: parallel_request_limiter.py:21 - updated_value in failure call: {'current_requests': 0, 'current_tpm': 28319, 'current_rpm': 56}
19:26:16 - LiteLLM:DEBUG: caching.py:22 - set cache: key: litellm::2024-05-18-19-26::request_count; value: {'current_requests': 0, 'current_tpm': 28319, 'current_rpm': 56}
19:26:16 - LiteLLM:DEBUG: caching.py:22 - InMemoryCache: set_cache
19:26:16 - LiteLLM Router:INFO: router.py:1289 - litellm.aembedding(model=mistral/mistral-embed) Exception MistralException - Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}
19:26:16 - LiteLLM Router:DEBUG: router.py:1311 - TracebackTraceback (most recent call last):
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/main.py", line 2498, in aembedding
    response = await init_response
               ^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/llms/openai.py", line 628, in aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/llms/openai.py", line 611, in aembedding
    response = await openai_aclient.embeddings.create(**data, timeout=timeout)  # type: ignore
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/resources/embeddings.py", line 214, in create
    return await self._post(
           ^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1782, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1485, in request
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1576, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.UnprocessableEntityError: Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1307, in async_function_with_fallbacks
    response = await self.async_function_with_retries(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1447, in async_function_with_retries
    raise original_exception
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1403, in async_function_with_retries
    response = await original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1294, in _aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1281, in _aembedding
    response = await response
               ^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3465, in wrapper_async
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3297, in wrapper_async
    result = await original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/main.py", line 2507, in aembedding
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 8708, in exception_type
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 7461, in exception_type
    raise BadRequestError(
litellm.exceptions.BadRequestError: MistralException - Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}

19:26:16 - LiteLLM Router:DEBUG: router.py:1315 - Trying to fallback b/w models
Traceback (most recent call last):
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/main.py", line 2498, in aembedding
    response = await init_response
               ^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/llms/openai.py", line 628, in aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/llms/openai.py", line 611, in aembedding
    response = await openai_aclient.embeddings.create(**data, timeout=timeout)  # type: ignore
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/resources/embeddings.py", line 214, in create
    return await self._post(
           ^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1782, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1485, in request
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/openai/_base_client.py", line 1576, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.UnprocessableEntityError: Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/proxy/proxy_server.py", line 3882, in embeddings
    response = await llm_router.aembedding(**data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1204, in aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1201, in aembedding
    response = await self.async_function_with_fallbacks(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1386, in async_function_with_fallbacks
    raise original_exception
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1307, in async_function_with_fallbacks
    response = await self.async_function_with_retries(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1447, in async_function_with_retries
    raise original_exception
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1403, in async_function_with_retries
    response = await original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1294, in _aembedding
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/router.py", line 1281, in _aembedding
    response = await response
               ^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3465, in wrapper_async
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 3297, in wrapper_async
    result = await original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/main.py", line 2507, in aembedding
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 8708, in exception_type
    raise e
  File "/opt/casemark/litellm/lib/python3.12/site-packages/litellm/utils.py", line 7461, in exception_type
    raise BadRequestError(
litellm.exceptions.BadRequestError: MistralException - Error code: 422 - {'object': 'error', 'message': {'detail': [{'type': 'extra_forbidden', 'loc': ['body', 'user'], 'msg': 'Extra inputs are not permitted', 'input': '', 'url': 'https://errors.pydantic.dev/2.5/v/extra_forbidden'}]}, 'type': 'invalid_request_error', 'param': None, 'code': None}
INFO:     127.0.0.1:60288 - "POST /embeddings HTTP/1.1" 422 Unprocessable Entity
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [55640]```

@lolsborn
Copy link
Author

I realize this is not a real solution, but adding line 4253 is solving this issue for me on Mistral at the moment
image

@lolsborn
Copy link
Author

Actually do we ever need the user field for embed creation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants