Skip to content

docs: scope issue #21 (TTS, STT, Files API, Context Compaction, Batch) - #34

Merged
hrco merged 3 commits into
releasefrom
docs/issue-21-schemas-scope
Jul 4, 2026
Merged

docs: scope issue #21 (TTS, STT, Files API, Context Compaction, Batch)#34
hrco merged 3 commits into
releasefrom
docs/issue-21-schemas-scope

Conversation

@hrco

@hrco hrco commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds docs/xai-delta-2026-07-issue21-schemas.md — exact wire schemas for all 5 new-surface APIs (TTS, STT, Files, Context Compaction, Batch), researched directly against docs.x.ai.
  • Adds docs/issue-21-scope.md — concrete implementation scope: 5 independently-mergeable PRs (one per surface, following the Safe-refresh pattern from fix: encode order_id to bytes before hmac.compare_digest #29-33), each with tool schemas, make_*_request() helper design, and test file plan.

Batch API is included as PR 5 (chat-only) per founder direction, even though it's a stretch goal not in issue #21's acceptance checklist — image/video batch request shapes are unconfirmed in the docs, so those are explicitly out of scope for v1.

Two flagged open risks carried into implementation rather than guessed at:

  • STT keyterm delimiter format (unconfirmed)
  • Files-upload multipart field ordering (expires_after before file) — httpx's data=/files= merge doesn't guarantee this

No server.py changes — planning/research docs only, mirrors how #28 shipped ahead of the code PRs for the prior Safe-refresh batch.

Test plan

  • N/A — docs-only PR, no runtime code changed
  • Founder review of scope/sequencing before PR 1 (grok-tts) implementation starts

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a scope document outlining the planned rollout for several API features and what is included or excluded in the first release.
    • Added a schema reference covering confirmed request/response formats and upload constraints across supported endpoints.
    • Captured open implementation questions and shared requirements to help keep future work consistent.

Exact wire schemas researched from docs.x.ai, plus a 5-PR implementation
scope following the Safe-refresh pattern (one small, founder-gated PR
per surface). Batch API included as a 5th PR (chat-only, per founder
direction) even though it's not in issue #21's acceptance checklist.

No server.py changes — planning docs only, same as #28.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hrco, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5929b279-0617-4ece-9b75-3a7f74bf176d

📥 Commits

Reviewing files that changed from the base of the PR and between 8b1f28d and de98b1a.

📒 Files selected for processing (1)
  • docs/xai-delta-2026-07-issue21-schemas.md
📝 Walkthrough

Walkthrough

This PR adds two documentation files: an implementation scope plan for Issue #21 covering PR-by-PR rollout of TTS, STT, Files API, Context Compaction, and Batch API tools, and a companion xAI wire-schema reference documenting confirmed and unconfirmed request/response shapes for these endpoints.

Changes

Issue #21 documentation

Layer / File(s) Summary
Scope overview and shared requirements
docs/issue-21-scope.md
Sets PR sequencing, acceptance criteria, shared per-PR implementation requirements (helper patterns, mocked tests, doc updates), and lists open verification risks.
TTS scope and schema
docs/issue-21-scope.md, docs/xai-delta-2026-07-issue21-schemas.md
Documents PR 1 (grok-tts) tool schema, constants, and v1 exclusions alongside the /v1/tts wire schema, response modes, and encoding notes.
STT scope and schema
docs/issue-21-scope.md, docs/xai-delta-2026-07-issue21-schemas.md
Documents PR 2 (grok-stt) multipart submission approach and tool schema alongside the /v1/stt wire schema and field constraints.
Files API scope and schema
docs/issue-21-scope.md, docs/xai-delta-2026-07-issue21-schemas.md
Documents PR 3 Files tools, multipart ordering requirements, and excluded sub-features alongside the /v1/files endpoint schemas.
Context Compaction scope and schema
docs/issue-21-scope.md, docs/xai-delta-2026-07-issue21-schemas.md
Documents PR 4 (grok-context-compact) tool definition and reuse pattern alongside the /v1/responses/compact schema.
Batch API scope and schema
docs/issue-21-scope.md, docs/xai-delta-2026-07-issue21-schemas.md
Documents PR 5 chat-only Batch API tools and wrapping behavior alongside the /v1/batches schema and unconfirmed request shapes.
Schema document overview
docs/xai-delta-2026-07-issue21-schemas.md
Introduces the schema document title, source context, and a confirmed-vs-unconfirmed summary across all surfaces.

Estimated code review effort: 2 (Simple) | ~10 minutes

Related issues: Issue #21 (implementation scope for TTS, STT, Files API, Context Compaction, and Batch API tools)

Suggested labels: documentation

Suggested reviewers: hrco

Poem

A rabbit scribbles plans in ink,
Five PRs lined up, click by click 🐇
TTS hums, STT hears,
Files upload, compaction clears,
Batches wait their turn in queue —
Docs now show the whole way through!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the docs-only scope for Issue #21 across the five API surfaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/issue-21-schemas-scope

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hrco hrco mentioned this pull request Jul 2, 2026
4 tasks

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/xai-delta-2026-07-issue21-schemas.md`:
- Around line 1-286: The Markdown in this document has multiple spacing/lint
issues around headings and fenced code blocks, causing MD022/MD031 failures.
Normalize the formatting by adding the required blank lines before and after
headings and fenced blocks throughout the document, especially around the
sections and JSON examples, while keeping the existing content in place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dae59e3b-dcac-43d4-bd51-250010e8de92

📥 Commits

Reviewing files that changed from the base of the PR and between e7ee108 and 8b1f28d.

📒 Files selected for processing (2)
  • docs/issue-21-scope.md
  • docs/xai-delta-2026-07-issue21-schemas.md

Comment thread docs/xai-delta-2026-07-issue21-schemas.md
@hrco hrco mentioned this pull request Jul 2, 2026
4 tasks
@hrco
hrco merged commit df1f5ac into release Jul 4, 2026
1 check passed
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.

1 participant