mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
Bug Fix - Responses API, Loosen restrictions on allowed environments for computer use tool (#10168)
* loosen allowed types on ComputerToolParam * test_basic_computer_use_preview_tool_call
This commit is contained in:
parent
c80e984d7e
commit
653570824a
2 changed files with 111 additions and 1 deletions
|
@ -892,6 +892,19 @@ OpenAIAudioTranscriptionOptionalParams = Literal[
|
|||
OpenAIImageVariationOptionalParams = Literal["n", "size", "response_format", "user"]
|
||||
|
||||
|
||||
class ComputerToolParam(TypedDict, total=False):
|
||||
display_height: Required[float]
|
||||
"""The height of the computer display."""
|
||||
|
||||
display_width: Required[float]
|
||||
"""The width of the computer display."""
|
||||
|
||||
environment: Required[Union[Literal["mac", "windows", "ubuntu", "browser"], str]]
|
||||
"""The type of computer environment to control."""
|
||||
|
||||
type: Required[Union[Literal["computer_use_preview"], str]]
|
||||
|
||||
|
||||
class ResponsesAPIOptionalRequestParams(TypedDict, total=False):
|
||||
"""TypedDict for Optional parameters supported by the responses API."""
|
||||
|
||||
|
@ -907,7 +920,7 @@ class ResponsesAPIOptionalRequestParams(TypedDict, total=False):
|
|||
temperature: Optional[float]
|
||||
text: Optional[ResponseTextConfigParam]
|
||||
tool_choice: Optional[ToolChoice]
|
||||
tools: Optional[List[ToolParam]]
|
||||
tools: Optional[List[Union[ToolParam, ComputerToolParam]]]
|
||||
top_p: Optional[float]
|
||||
truncation: Optional[Literal["auto", "disabled"]]
|
||||
user: Optional[str]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue