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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andrewbelcher created an issue. See original summary.

andrewbelcher’s picture

Status: Active » Needs review

  • andrewbelcher committed 97db22cd on 1.0.x
    Issue #3512600 by andrewbelcher: Refine model settings from LiteLLM...
andrewbelcher’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.