| Name | Type | Description |
|---|---|---|
tools* | Sequence[dict[str, Any] | type | Callable | BaseTool] | A list of tool definitions to bind to this chat model.
Supports any tool handled by
convert_to_openai_tool
(Pydantic models, |
tool_choice | dict | str | bool | None | Default: None |
strict | bool | None | Default: None |
kwargs | Any | Default: {} |
Bind tool-like objects to this chat model.
Client-side function tools require the Perplexity Responses (Agent) API:
construct the model with use_responses_api=True and a tool-capable
model such as openai/gpt-5. The sonar family does not support
client-side function tools.
Which tool the model should use. Normalized here for API
parity with langchain-openai (a tool name, "auto", "none",
"any"/"required"/True, or an OpenAI-style dict) and stored
on the binding, but the Perplexity Responses (Agent) API does not
currently honor it: a non-empty tool_choice makes
_to_responses_payload raise ValueError at invoke time on the
Responses route. The restriction can be relaxed if Perplexity
adds tool_choice support.
If True, the tool parameter schema is sent with strict
enabled. If None (default), the flag is omitted.
Any additional parameters are passed directly to bind.