fix(params): support Scaleway chat parameters

This commit is contained in:
daleselaji-dev 2026-10-05 22:55:44 +08:00
parent 02f61c9c42
commit 792216ab0e
2 changed files with 14 additions and 0 deletions

View file

@ -40,6 +40,9 @@ def get_supported_openai_params(
except BadRequestError:
return None
if custom_llm_provider == "scaleway" and request_type == "chat_completion":
return litellm.OpenAIConfig().get_supported_openai_params(model=model)
if custom_llm_provider in LlmProvidersSet:
provider_config = litellm.ProviderConfigManager.get_provider_chat_config(
model=model,

View file

@ -125,6 +125,17 @@ def test_sambanova_embeddings_request_returns_list_not_none():
assert embedding_params == []
def test_json_configured_provider_advertises_openai_chat_params():
params = get_supported_openai_params(
model="qwen3.5-397b-a17b",
custom_llm_provider="scaleway",
)
assert params is not None
assert "tools" in params
assert "tool_choice" in params
def test_bedrock_converse_alias_resolves_like_bedrock():
"""The ``bedrock_converse`` invocation alias must resolve through AmazonConverseConfig
just like ``bedrock`` (the codebase already pairs them, e.g. ``_strip_model_name``).