Skip to content

[Workers AI] Expand all usage code examples by default on model pages#28462

Open
superhighfives wants to merge 1 commit intocloudflare:productionfrom
superhighfives:AI-4123/expand-model-usage-accordions
Open

[Workers AI] Expand all usage code examples by default on model pages#28462
superhighfives wants to merge 1 commit intocloudflare:productionfrom
superhighfives:AI-4123/expand-model-usage-accordions

Conversation

@superhighfives
Copy link

Summary

  • Adds open attribute to all <Details> components in Workers AI model code examples
  • Users can now immediately see Worker, Python, and curl code snippets without clicking to expand
  • Affects all 22 model code example components

Jira

https://jira.cfdata.org/browse/AI-4123

Add 'open' attribute to all Details components in model code examples
so users can immediately see Worker, Python, and curl examples without
needing to click to expand them.

Jira: AI-4123
Copilot AI review requested due to automatic review settings February 20, 2026 02:42
@superhighfives superhighfives requested review from a team and kodster28 as code owners February 20, 2026 02:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Workers AI model documentation components so that code example sections are expanded by default, letting users immediately see the Workers/TypeScript, Python, and curl snippets on model pages without extra clicks.

Changes:

  • Adds the open attribute to <Details> blocks across model code example components.
  • Ensures code snippets are visible by default for Workers/TypeScript, Python, and curl examples (where present).

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/models/code/WhisperBase64Code.astro Expand Workers/Python/curl code examples by default via open.
src/components/models/code/TranslationCode.astro Expand Workers/Python/curl code examples by default via open.
src/components/models/code/TextToImageCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/TextGenerationCode.astro Expand all code example sections (including streaming/lora variants) by default via open.
src/components/models/code/TextEmbeddingCode.astro Expand Workers/Python/curl code examples by default via open.
src/components/models/code/TextClassificationCode.astro Expand Workers/Python/curl code examples by default via open.
src/components/models/code/SummarizationCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/StableDiffusion-v1-5-inpaintingCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/StableDiffusion-v1-5-img2imgCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/OpenAIResponsesTextGenerationCode.astro Expand Worker/Python/curl examples by default via open.
src/components/models/code/ObjectDetectionCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/MelottsCode.astro Expand Workers/TypeScript example by default via open.
src/components/models/code/LlamaGuard.astro Expand Worker/Python/curl examples by default via open.
src/components/models/code/ImageToTextCode.astro Expand Workers/TypeScript example by default via open.
src/components/models/code/ImageClassificationCode.astro Expand Workers/curl code examples by default via open.
src/components/models/code/Flux-2.astro Expand Workers/curl code examples by default via open.
src/components/models/code/Flux-1-Schnell.astro Expand both Workers examples and curl by default via open.
src/components/models/code/DeepgramNova.astro Expand Worker/curl code examples by default via open.
src/components/models/code/DeepgramFlux.astro Expand the step-by-step Details sections by default via open.
src/components/models/code/DeepgramAura.astro Expand Worker/curl code examples by default via open.
src/components/models/code/Bge-Reranker-Base.astro Expand Worker/Python/curl examples by default via open.
src/components/models/code/AutomaticSpeechRecognitionCode.astro Expand Workers/curl code examples by default via open.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</Details>

<Details header="cURL">
<Details header="cURL" open>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The header casing is inconsistent within this component: it uses "cURL" in one section but "curl" elsewhere. Since these Details are now expanded by default, the inconsistency is more visible; consider standardizing on one label (the rest of the model examples appear to use "curl").

Suggested change
<Details header="cURL" open>
<Details header="curl" open>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments