Chat explorer errors due on unsupported OpenAI params

Created on 12 March 2025, 30 days ago

Problem/Motivation

The chat explorer triggers the following errors as not all OpenAI params are supported for all models (AWS Bedrock Claude in this case):

An error occurred
The following error occurred while processing your request:

Error invoking model response: litellm.UnsupportedParamsError: bedrock does not support parameters: {'presence_penalty': 0, 'frequency_penalty': 0}, for model=anthropic.claude-3-haiku-20240307-v1:0. To drop these, set `litellm.drop_params=True` or for proxy: `litellm_settings: drop_params: true` . Received Model Group=chat Available Model Group Fallbacks=None

Of the following exception type:

Drupal\ai\Exception\AiRequestErrorException

Steps to reproduce

Use the chat explorer with an AWS Bedrock Claude model.

Proposed resolution

We should filter the available model settings based on the LiteLLM's model info.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom andrewbelcher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024