Skip to content

adds run api to the docs#29345

Open
ethulia wants to merge 10 commits intoproductionfrom
ml/ai-gateway-run
Open

adds run api to the docs#29345
ethulia wants to merge 10 commits intoproductionfrom
ml/ai-gateway-run

Conversation

@ethulia
Copy link
Contributor

@ethulia ethulia commented Mar 25, 2026

Summary

Screenshots (optional)

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/ai-gateway/ @abhishekkankani, @palashgo, @thebongy, @roerohan, @kathayl, @mchenco, @zeke, @superhighfives, @bfirsh, @mattrothenberg, @ethulia, @cloudflare/pcx-technical-writing

@ethulia ethulia changed the title [WIP] adds run api to the docs [WIP do not review] adds run api to the docs Mar 25, 2026
@ethulia ethulia force-pushed the ml/ai-gateway-run branch from c9f746a to 58c0d08 Compare March 25, 2026 22:08
@ethulia ethulia marked this pull request as draft March 25, 2026 22:09
@ethulia
Copy link
Contributor Author

ethulia commented Mar 25, 2026

/bonk review this

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 25, 2026

1 issue needs fixing, 2 suggestions for improvement.

CRITICAL

  • Missing TypeScriptExample component (src/content/docs/ai-gateway/usage/run-api.mdx:99-123) — Workers code should use <TypeScriptExample> instead of a bare TypeScript code fence. The import statement on line 11 is also missing TypeScriptExample.

MEDIUM

  • Lines 72, 131, 150, 165 use $ prefix in curl examples — This is acceptable for environment variables, but verify these aren't interpreted as shell prompts.

LOW

  • Consider adding TypeScript to the tags list since the page contains TypeScript examples.

Would you like me to fix the TypeScriptExample issue by editing the file directly?

github run

@ethulia
Copy link
Contributor Author

ethulia commented Mar 25, 2026

/bonk review

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 25, 2026

Based on my review, the file is structurally sound. The TypeScriptExample component is properly imported on line 11 and used correctly at lines 99-127.

No issues found. The documentation follows the style guide:

  • Proper MDX syntax with escaped characters
  • Correct component usage (TypeScriptExample, WranglerConfig)
  • Relative internal links
  • Sequential headings
  • Active voice, no contractions

Note: The PR title indicates "[WIP do not review]". The previous automated review incorrectly flagged the TypeScriptExample as missing when it is in fact properly implemented.

github run

@ethulia ethulia changed the title [WIP do not review] adds run api to the docs adds run api to the docs Mar 25, 2026
@ethulia ethulia marked this pull request as ready for review March 26, 2026 17:41
@ethulia
Copy link
Contributor Author

ethulia commented Mar 26, 2026

/bonk review this

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 26, 2026

Based on my review of PR #29345, here are my findings:

Review Summary

Files reviewed:

  • src/content/changelog/ai-gateway/2026-03-27-run-api-preview.mdx
  • src/content/docs/ai-gateway/usage/run-api.mdx

✅ What's Good

Documentation Page (run-api.mdx):

  • Proper use of <TypeScriptExample> and <WranglerConfig> components
  • All imports correctly declared on line 11
  • Sequential headings (H2 → H3)
  • Active voice, present tense
  • Correct relative links (e.g., /ai-gateway/usage/chat-completion/)
  • Environment variable references ($CLOUDFLARE_API_TOKEN) are correctly used, not shell prompts
  • No unescaped special characters ({, }, <, >) in prose

Changelog:

  • Follows changelog format conventions
  • Correct products reference to ai-gateway
  • Links to the new documentation page

📝 Suggestions

1. Add TypeScript tag (run-api.mdx:4-5)
Since the page contains TypeScript examples, consider adding it to the tags:

tags:
  - AI
  - TypeScript

2. Changelog date (2026-03-27-run-api-preview.mdx:6)
The changelog is dated 2026-03-27 (tomorrow). This is acceptable if intentional, but note that today is 2026-03-26.

✅ Approval

The documentation is well-structured and follows the style guide. The Run API documentation is clear, with good examples in both curl and Workers AI binding formats. No blocking issues found.

github run

Copy link
Contributor

@JoaquinGimenez1 JoaquinGimenez1 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:changelog size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.