Skip to content

Studio: language and platform tabs for the API page code examples - #15084

Merged
shimmyshimmer merged 5 commits into
mainfrom
studio-api-example-tabs
Oct 24, 2026
Merged

shimmyshimmer merged 5 commits into
mainfrom
studio-api-example-tabs

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Studio: language and platform tabs for the API page code examples

Both code examples on the API page now use the same tabbed code box as Settings > API: curl, Python and JavaScript on the left, Linux / macOS / WSL and Windows on the right, with copy and a resize grip.

  • API example dialog: shows the model's default sampling in all three languages. Python passes temperature, top_p and presence_penalty as arguments and top_k, min_p and repetition_penalty through extra_body; JavaScript and curl put every field at the top level. The box grows to fit the request so the sampling values are visible without scrolling.
  • "No API traffic yet" example: was a single Linux/macOS curl command that does not run in PowerShell. It now offers all three languages and both platforms.
  • Windows curl: writes the body to body.json and calls curl.exe, as the settings tab already does, because PowerShell mangles inline JSON quotes.
  • The language and platform picks are shared with Settings > API. Picking a language here keeps the request kind chosen there (Basic, With tools, Advanced sampling).
  • In light mode the selected language and platform tab is the standard filled-button grey with no shadow (it was a white lifted pill). Dark mode and the other segmented toggles are unchanged.
  • The model row's API example icon is 16px, up from 14px.
  • The startup bundle budget is raised by 138 B raw / 53 B transfer: Vite's preload map naming the example box, now a lazy chunk shared by the API page and Settings.

Screenshots

API example dialog, Python, with the model's default sampling

API example dialog, curl on Windows (body through body.json)

No API traffic yet example, curl on Windows

Verification

  • npm run typecheck, npm test (13856 pass, new cases for the curl and JavaScript bodies, Windows quoting and the stored language), npm run build
  • Isolated Studio on macOS (CPU) with a GGUF loaded: dialog in all languages and platforms, quick start in curl (both platforms) and Python

Not tested here

  • Running the generated snippets end to end, and the Windows command on a Windows machine

shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 24, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 24, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 24, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 24, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T09:08:55.001717Z e32cad4 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e32cad44c9

ℹ️ 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".

@shimmyshimmer
shimmyshimmer merged commit db76346 into main Oct 24, 2026
20 of 38 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-api-example-tabs branch October 24, 2026 09:42
Souravrajvi0 added a commit to Souravrajvi0/unsloth that referenced this pull request Oct 24, 2026
Souravrajvi0 added a commit to Souravrajvi0/unsloth that referenced this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants