Skip to content

Studio: show the exact call arguments in expanded web search cards - #17927

Merged
danielhanchen merged 1 commit into
mainfrom
studio-web-search-tool-args
Nov 16, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-web-search-tool-args

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Fixes #17918

Problem

When a web search tool card is expanded, Studio only shows the parsed query (or URL) in the header and the returned links. The exact arguments the model sent are never shown. For a normal call that is fine, but when a call is malformed or cut off (for example llama-server dies with a Vulkan device lost error mid call), the card is blank and there is no way to see what the model actually asked for. The arguments are already saved with the chat message (argsText on the tool-call part), they were just not rendered by this card. The generic tool card already shows argsText; the dedicated web search card did not.

Change

The expanded, finished web search card now ends with a small Arguments disclosure, closed by default, that shows the call's argsText as inert monospace text (bidi controls escaped, same treatment as the URL pane above it). Nothing else in the card moves:

  • the collapsed card and its header are unchanged
  • the running state, the approval URL pane and the result rendering are unchanged
  • the disclosure is closed until clicked, so an expanded card looks the same as before apart from one extra Arguments line

No backend, persistence or API change: the text comes from the tool-call part the frontend already stores and replays.

Tests

  • tests/web-search-args-disclosure.test.ts (new): the finished branch of the card renders a <details data-slot="tool-web-search-args"> with escapeBidiControls(argsText), and the card reads argsText from its props. Both fail on main, pass here.
  • Existing web search card suites (web-fetch-parked-url, web-search-action-variants, tool-card-arg-coercion) pass.
  • npm run typecheck, eslint and prettier --check on the changed files are clean.

Before / after

A chat seeded with two finished web_search calls: a normal one, and an empty one ({} with no result, the shape a call cut off mid stream leaves). Both cards expanded, Arguments opened on the after side. Before: the empty card shows nothing. After: each card shows the exact call text.

Expanded web search cards, before and after

Also checked on the after build in Firefox and WebKit: the disclosure is closed by default, opens on click, and shows the same text.

@danielhanchen danielhanchen self-assigned this Nov 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T07:33:29.929865Z fcf7732 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T07:30:12.012951Z
We couldn’t complete this review. Comment @codex review to try again.
fcf7732 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: fcf7732bbc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 16, 2026
danielhanchen added a commit that referenced this pull request Nov 16, 2026
…d model (Windows race) (#17944)

## Summary

The Windows `Chat UI Tests` lane still fails intermittently at the model
picker step after #17902 (seen on the staging run of #17927, whose base
includes #17902):

```
playwright_chat_ui.py, line 1470: search.fill("")
TimeoutError: Locator.fill: Timeout 60000ms exceeded.
  waiting for get_by_placeholder(re.compile(r"Search.*models?", re.IGNORECASE)).visible.first
```

The job's screenshots show the race:

- `03c-model-picker-open`: the selector still reads `Select model` and
the picker is open and expanded, showing `Search on device models` and
`Loading models`. After the reload the frontend has not yet learned
which model is resident, so the picker opens expanded (`isExpanded =
expanded || !chosenName`) and the driver finds and fills the search.
- `03d-model-picker-search-qwen`: a moment later the residency check
lands, the chip reads `gemma-3-270m-it-GGUF`, and the picker collapses
to the loaded model's row (#17839's collapse on load). The search field
is gone, so the next `fill()` waits 60 s for it.

On Linux the residency check usually lands before the click, so the
picker opens collapsed and #17902's expand handles it; the slower
Windows runner opens it first.

The collapse itself is intended, and a person opening the picker in that
first moment after a reload is a narrow case, so this changes the
driver, not the product.

## Change

- `tests/studio/playwright_chat_ui.py`: before opening the picker, wait
(up to 30 s, polling the page) until the model selector no longer reads
`Select model`, i.e. the frontend knows the model loaded above. If it
never does, the step logs a warning and goes on as before, so the step
still reports the real failure.
- `tests/studio/test_chat_ui_picker_collapsed_row.py`: the search step
must wait for the selector to name the model before it clicks it.

## Testing

- `test_chat_ui_picker_collapsed_row.py` and every test that reads
`playwright_chat_ui.py`: 78 passed. With the driver reverted to main,
the new check fails.
- The wait against a scripted page in Chromium (Playwright 1.64): a
selector that switches from `Select model` to the model name after 1.5 s
settles after 1.6 s; one that never switches times out with a readable
message, which the step logs as a warning.
@danielhanchen
danielhanchen merged commit 5a6f6f5 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the studio-web-search-tool-args branch November 16, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Reddit issue] Issues during inference

1 participant