Skip to content

feat(api): enforce OpenAI-shaped metadata on Completions and chat - #383

Closed
seonghobae wants to merge 1 commit into
mainfrom
feat/cmpl-metadata-openai-shape-20260813211353
Closed

feat(api): enforce OpenAI-shaped metadata on Completions and chat#383
seonghobae wants to merge 1 commit into
mainfrom
feat/cmpl-metadata-openai-shape-20260813211353

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • OpenAI-shaped metadata on Completions and chat: object of string pairs, max 16.
  • Keys ≤64 chars; values ≤512 chars; non-string entries fail closed.
  • Completions ALLOWED_COMPLETIONS_KEYS includes metadata.
  • Full tip substrate + HTTP tests.

Test plan

  • python tests/test_completions_metadata_openai_shape.py (4/4 HTTP)
  • CI Full unit + Semgrep

Accept metadata as ≤16 string key/value pairs (keys ≤64, values ≤512).
Non-objects, non-string entries, and oversized maps fail closed. Completions
now allows the metadata field. HTTP tests cover accept and reject on
/v1/completions with full tip substrate.
@seonghobae
seonghobae enabled auto-merge (squash) August 13, 2026 12:14
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 12 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: CHILL

Plan: Pro Plus

Run ID: 68fb12f7-ec73-4133-954a-df5cb35be6a8

📥 Commits

Reviewing files that changed from the base of the PR and between 6841b71 and 962a5eb.

📒 Files selected for processing (4)
  • contextual_orchestrator/cost_ledger.py
  • contextual_orchestrator/orchestrator.py
  • contextual_orchestrator/server.py
  • tests/test_completions_metadata_openai_shape.py

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.

@seonghobae seonghobae closed this Aug 14, 2026
auto-merge was automatically disabled August 14, 2026 08:25

Pull request was closed

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