mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
fix(zai): 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
0b937512ed
commit
e1088967e2
1 changed files with 3 additions and 3 deletions
|
|
@ -60,11 +60,11 @@ class ZAIChatConfig(OpenAIGPTConfig):
|
|||
|
||||
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))
|
||||
reasoning_params: Final = MappingProxyType(
|
||||
{k: v for k, v in non_default_params.items() if k in ZAI_REASONING_PARAMS and k in supported_openai_params}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue