Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tabpfn_client/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class FitRequest(BaseModel):
# Budget for the fit (seconds). Only consulted when `thinking_effort` is set.
thinking_timeout_s: Optional[float] = None
# Optimization metric for the fit. Only consulted when `thinking_effort` is set.
thinking_metric: Optional[str] = None
thinking_effort_metric: Optional[str] = None


class FitResponse(BaseModel):
Expand Down
4 changes: 3 additions & 1 deletion src/tabpfn_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ def fit(
# The client-side `thinking_*` knobs forward 1:1 to the server's
# top-level FitRequest fields. When the user enabled thinking via
# `thinking_mode=True` without picking a level, default to "medium".
# The user-facing kwarg is `thinking_metric`; on the wire it is sent
# as `thinking_effort_metric` (matching the server's FitRequest schema).
if thinking_enabled and tabpfn_config:
thinking_effort = tabpfn_config.get("thinking_effort") or "medium"
thinking_timeout_s = tabpfn_config.get("thinking_timeout_s")
Expand Down Expand Up @@ -444,7 +446,7 @@ def fit(
tabpfn_config=server_tabpfn_config,
thinking_effort=thinking_effort,
thinking_timeout_s=thinking_timeout_s,
thinking_metric=thinking_metric,
thinking_effort_metric=thinking_metric,
),
timeout=client_options.timeout,
headers=client_options.headers,
Expand Down
Loading