Skip to content

feat: provision media billing atomically - #6

Merged
3metaJun merged 1 commit into
metaproxy/v1.0.0-rc.21from
feat/metaproxy-media-billing
Aug 29, 2026
Merged

feat: provision media billing atomically#6
3metaJun merged 1 commit into
metaproxy/v1.0.0-rc.21from
feat/metaproxy-media-billing

Conversation

@3metaJun

Copy link
Copy Markdown
Owner

Description

Adds atomic provisioning for tiered_expr media billing and preserves Grok-compatible image request fields through the OpenAI image DTO. The provision endpoint validates billing mode and expression pairs before replacing channels and options in one transaction. MiniMax keeps its explicit aspect_ratio compatibility.

Type of change

  • New feature
  • Bug fix

Verification

  • go test ./dto ./controller ./model ./relay/channel/minimax ./relay/helper
  • go test ./service -run 'TestTryTieredSettle|TestPostTextConsumeQuota' -count=1
  • Real local new-api E2E through the apikey.fun Grok upstream:
    • 1K standard image returned one URL and charged the exact generated tier
    • 2K quality request with n=2 returned two URLs and charged the exact generated tier
  • Reviewed by gpt-5.6-luna with model_reasoning_effort=max: PASS

Checklist

  • The description was reviewed and written for this change.
  • I searched existing work and kept this PR focused.
  • I understand the implementation and its impact.
  • Local tests and a real upstream E2E passed.
  • No credentials or unrelated files are included.

Agent: gpt-5.6-sol via T3 Code
Review: gpt-5.6-luna (max) via Codex CLI

@3metaJun
3metaJun merged commit fff1170 into metaproxy/v1.0.0-rc.21 Aug 29, 2026
1 check passed
@3metaJun
3metaJun deleted the feat/metaproxy-media-billing branch August 29, 2026 02:02
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