Skip to content

Set gpt-5.4-mini pricing in LLM review workflow - #12

Merged
Vilin97 merged 2 commits into
mainfrom
set-llm-pricing
May 9, 2026
Merged

Vilin97 merged 2 commits into
mainfrom
set-llm-pricing

Conversation

@Vilin97

@Vilin97 Vilin97 commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Per https://developers.openai.com/api/docs/pricing :

  • Input: $0.75 per 1M tokens
  • Output: $4.50 per 1M tokens

Cost line in review comments will now render in USD instead of the set INPUT_PRICE_PER_M / OUTPUT_PRICE_PER_M placeholder.

Per https://developers.openai.com/api/docs/pricing : $0.75 / $4.50 per
1M input/output tokens. Cost line will now render in review comments
instead of the "set INPUT_PRICE_PER_M / OUTPUT_PRICE_PER_M" placeholder.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 18:55
@Vilin97
Vilin97 requested a review from justincasher as a code owner May 9, 2026 18:55

Copilot AI 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.

Pull request overview

Updates the LLM review GitHub Actions workflow to populate real USD pricing for the configured review model so the posted PR comment can render an actual cost estimate.

Changes:

  • Set INPUT_PRICE_PER_M and OUTPUT_PRICE_PER_M to the stated gpt-5.4-mini rates (USD per 1M tokens).
  • Updated the inline workflow comment to point to the pricing reference when bumping models.

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

…tions

review.py:
- Always tries `service_tier="flex"` first (~50% cheaper, slower).
- On 429 Resource Unavailable retries with `service_tier="auto"` so a flex
  outage never silently drops a review.
- Threads the actual tier used through to the rendered comment, alongside
  token counts and per-tier cost.
- OpenAI client timeout raised to 900s (15 min) since flex requests can
  exceed the default 10-minute window.

Workflow env split into per-tier prices (gpt-5.4-mini current rates):
- flex:     $0.375 in / $2.25 out per 1M tokens
- standard: $0.75 in / $4.50 out per 1M tokens

.github/copilot-instructions.md:
- Configures GitHub's automatic Copilot PR review with the same scope
  and out-of-scope list as our custom workflow. Both reviewers now read
  from a single source of truth (REVIEW_RULES.md).
- Two reviewers running in parallel for now; we'll calibrate and drop
  one once we see how each behaves on real PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Vilin97
Vilin97 merged commit b0ff6bc into main May 9, 2026
2 checks passed
@Vilin97
Vilin97 deleted the set-llm-pricing branch May 9, 2026 19:04
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.

2 participants