Conversation
…ut tools
Strict OpenAI-compatible endpoints (xAI-style gateways/relays) reject
requests that set tool_choice without a tools array ("A tool_choice was
set on the request but no tools were specified"). Text-only calls such
as compaction summaries and title generation carry no tools but always
sent tool_choice: "none", so compaction on gpt-5.6 via chat-completions
relays failed with 400.
Gate tool_choice at the openai-completions dispatch point: only forward
it when the request actually carries tools, matching the existing guard
in agentRunner. tool_choice is meaningless without tools, so behavior
is unchanged on lenient endpoints.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…el ids Since ee8dba1 anthropic adaptive-thinking dispatch relies solely on the catalog's compat.forceAdaptiveThinking, so any model id that misses the exact catalog match (date suffixes, case variants, relay renames like claude-4.6-sonnet) degraded to budget mode: requests carried the removed budget_tokens field with no output_config.effort, which 4.7+/Fable-class endpoints reject with 400 and relays silently strip — the user's thinking level selection had no effect ("always Medium" reports). Fix in modelFactory with two fallbacks, both written onto the model object because pi-ai's raw stream() dispatches adaptive-vs-budget from model.compat as well: - Normalized catalog lookup (lowercase, strip @Version, strip -YYYYMMDD) inherits full catalog metadata while keeping the user-configured id in the request body. - For ids the catalog still misses, restore the pre-refactor family heuristics (plus reversed naming like claude-4.6-sonnet/claude-5-sonnet, with a lookbehind so claude-3-5-sonnet stays budget) to set compat.forceAdaptiveThinking and the xhigh/max thinkingLevelMap tiers. Mirror the same resolution into the web settings module so the WebUI level dropdown matches what the desktop actually sends. Add wire-level regression tests capturing the real pi-ai anthropic payload per level. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve publisher-scoped ClawHub downloads and preserve source identity metadata. Normalize compatible legacy skill names and show install preparation progress immediately in GUI and WebUI.
Replace the global model choice with per-conversation state so parallel tasks no longer clobber each other's model: - chatHistory gains selected_model_json (schema v2; idempotent ensure re-run migrates existing DBs), with a targeted chat_history_set_model command mirroring set_pinned (no updated_at bump) and COALESCE-guarded upserts so null inputs never clobber a stored choice. - ConversationSummary carries the selection (proto field 13) through history-sync, the mirrored sidebar layer, and the web wire types. - Desktop resolves via a single derivation (gateway override > conversation selection > default); the visible entry's selection is React state so runtime-cache rebuilds can't drop it; records seed the entry on open/hydrate/bridge-ready, and sends pin the effective model. - Web keeps unsent picks in a per-conversation override map, sends them with each chat command, and converges on the history-sync echo. - settings.selectedModel narrows to "default for new conversations" (last picked anywhere); ChatHeader on both ends now takes onSelectModel instead of setSettings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
b21ebbf,d42cffc): replaces the global model choice with per-conversation state so parallel tasks no longer clobber each other's model.chatHistorygainsselected_model_json(schema v2) with a targetedchat_history_set_modelcommand;ConversationSummarycarries the selection (proto field 13) through history-sync, sidebar, and web wire types. Desktop resolves via a single derivation (gateway override > conversation selection > default); web keeps unsent picks in a per-conversation override map and converges on the history-sync echo. Also preserves model changes made during active runs.023272d).666503c): resolves publisher-scoped downloads (ownerHandle for duplicate slugs), preserves source identity metadata, normalizes legacy skill names, and shows install preparation progress immediately in GUI and WebUI.53e3507): normalized catalog lookup (strip date suffix/@version/case) plus family heuristics writecompat.forceAdaptiveThinkingback onto the model object, fixing 400s and "always Medium" thinking on date-suffixed/relay-renamed ids; mirrored into web settings.tool_choiceon openai-completions requests without tools (3a8d64e): strict OpenAI-compatible endpoints rejecttool_choicewith notools; text-only calls (compaction, title generation) no longer send it.Test plan
tool_choicegating (stream-by-api-tool-choice.test.mjs)🤖 Generated with Claude Code