feat(agent): add OpenAI service-tier configuration#2719
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 495af02aeb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "auto" => Ok(Some(OpenAiServiceTier::Auto)), | ||
| "default" => Ok(Some(OpenAiServiceTier::Default)), | ||
| "flex" => Ok(Some(OpenAiServiceTier::Flex)), | ||
| "priority" => Ok(Some(OpenAiServiceTier::Priority)), |
There was a problem hiding this comment.
OpenAI's API reference lists scale as a valid service_tier request value alongside auto, default, flex, and priority (see https://developers.openai.com/api/reference/resources/chat). With this allowlist, an operator on Scale Tier who sets BUZZ_AGENT_SERVICE_TIER=scale gets a startup config error before any request is made, and the matching desktop selector cannot offer the valid tier either.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The request values are auto, default, flex, and priority. Scale Tier is organization/project capacity, not a per-request selector.
OpenAI uses Scale capacity automatically when the project is Scale-enabled and the request uses auto or omits service_tier. We are therefore leaving scale out of the parser and UI.
| hook_servers: parse_hook_servers_env("MCP_HOOK_SERVERS"), | ||
| hints_enabled: parse_env("BUZZ_AGENT_NO_HINTS", 0u8)? == 0, | ||
| thinking_effort: parse_thinking_effort(env("BUZZ_AGENT_THINKING_EFFORT").as_deref())?, | ||
| service_tier: parse_service_tier(env("BUZZ_AGENT_SERVICE_TIER").as_deref())?, |
There was a problem hiding this comment.
Scope service-tier parsing to OpenAI
Because this parses BUZZ_AGENT_SERVICE_TIER for every provider, a stale or manually-entered OpenAI-only value now prevents Anthropic or Databricks agents from starting even though apply_openai_service_tier intentionally keeps the field out of those request bodies. This is especially easy to hit when the env var is inherited from global/persona env and the agent switches providers; parse it only on the OpenAI path, similar to OPENAI_COMPAT_API, or otherwise ignore it for non-OpenAI providers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed. BUZZ_AGENT_SERVICE_TIER is now parsed only when the resolved provider is OpenAI. For Anthropic and Databricks providers, the value is ignored, so a stale OpenAI-specific environment variable cannot affect startup.
| /** OpenAI service tiers accepted by buzz-agent. */ | ||
| export const BUZZ_AGENT_SERVICE_TIER_VALUES = [ | ||
| "auto", | ||
| "default", | ||
| "flex", | ||
| "priority", |
There was a problem hiding this comment.
Route service-tier fields through the catalog
This adds the service-tier capability as a frontend-only env key/value table, with rendering gated separately in the component, but the runtime catalog/core never exposes whether the selected harness supports BUZZ_AGENT_SERVICE_TIER. That leaves the shared defaults/onboarding renderer and the documented reset/absence policies unaware of the new field; add the capability to KnownAcpRuntime/AcpRuntimeCatalogEntry and project it through deriveAgentConfigFieldModel instead of maintaining a separate TypeScript table.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Defaults/onboarding catalog integration would be a broader configuration-model change, so we are leaving that for a separate follow-up rather than expanding this PR.
a8b8408 to
119b3e5
Compare
Signed-off-by: maddygoround <m.rathod@xsolla.com>
…arity Signed-off-by: maddygoround <m.rathod@xsolla.com>
Signed-off-by: maddygoround <m.rathod@xsolla.com>
119b3e5 to
0a4eaff
Compare
Adds OpenAI service-tier configuration to Buzz agents.
Changes
autodefaultflexpriorityBUZZ_AGENT_SERVICE_TIER.service_tieron OpenAI Chat Completions and Responses requests.