system_gpt_router
Owner-quota GPT routing for internal Stargazer jobs.
The ChatGPT-authenticated Codex adapter is deliberately owned by the inference service. Internal jobs running in that process call it directly; jobs in the agents service cross a small Redis request/reply boundary. Callers retain their existing Gemini-proxy code as the fallback, so this module never silently changes an internal job into a user-visible reply path.
Bases:
RuntimeErrorThe owner-quota GPT route could not safely complete the request.
- class system_gpt_router.OwnerQuotaGptRoute(model, effort, chat_url, service_tier, beneficiary_subject, account_id)
Bases:
objectOne resolved route against the configured owner’s current login.
- Parameters:
- class system_gpt_router.OwnerQuotaGptRouter(redis_client, openrouter=None, *, owner_discord_id='829047047633764402', request_timeout_seconds=60.0)
Bases:
objectRoute one tool-free internal completion through the owner’s Codex quota.
- Parameters:
- async complete(*, messages=None, prompt=None, effort='low', job='internal', timeout_seconds=None)
- async generate_image(*, prompt, image_urls=None, effort='low', job='image', timeout_seconds=240.0)
Generate one GPT image against the configured owner’s Codex quota.
- class system_gpt_router.OwnerQuotaGptBroker(redis_client, router, *, consumer_name)
Bases:
objectInference-owned Redis consumer for agents-service GPT requests.
- Parameters:
redis_client (Any)
router (OwnerQuotaGptRouter)
consumer_name (str)