mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
fix(dashscope): keep the thinking override inside the type-discipline budget
Main consumed the LIT001 budget headroom, so the override signature now takes Mapping for its parameters and marks the inherited dict/list return contracts as mutable-ok. Co-authored-by: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Co-authored-by: songkuan-zheng <songkuan-zheng@users.noreply.github.com>
This commit is contained in:
parent
4321424ae7
commit
fee105a772
1 changed files with 4 additions and 4 deletions
|
|
@ -105,17 +105,17 @@ class DashScopeChatConfig(OpenAIGPTConfig):
|
|||
return resolved_api_base
|
||||
return f"{resolved_api_base}/chat/completions"
|
||||
|
||||
def get_supported_openai_params(self, model: str) -> list:
|
||||
def get_supported_openai_params(self, model: str) -> list: # mutable-ok: inherited list contract of OpenAIGPTConfig
|
||||
base_params: Final = super().get_supported_openai_params(model)
|
||||
return [*base_params, "thinking", "reasoning_effort"] # mutable-ok: inherited list contract
|
||||
|
||||
def _map_openai_params(
|
||||
self,
|
||||
non_default_params: dict[str, object],
|
||||
optional_params: dict[str, object],
|
||||
non_default_params: Mapping[str, object],
|
||||
optional_params: Mapping[str, object],
|
||||
model: str,
|
||||
drop_params: bool,
|
||||
) -> dict[str, object]:
|
||||
) -> dict[str, object]: # mutable-ok: dict return contract of OpenAIGPTConfig
|
||||
supported_openai_params: Final = frozenset(self.get_supported_openai_params(model))
|
||||
passthrough_params: Final = MappingProxyType(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue