Skip to content

feat(agent): add OpenAI service-tier configuration#2719

Open
maddygoround wants to merge 3 commits into
block:mainfrom
maddygoround:openai/service_tier
Open

feat(agent): add OpenAI service-tier configuration#2719
maddygoround wants to merge 3 commits into
block:mainfrom
maddygoround:openai/service_tier

Conversation

@maddygoround

@maddygoround maddygoround commented Jul 24, 2026

Copy link
Copy Markdown

Adds OpenAI service-tier configuration to Buzz agents.

Changes

  • Adds a Service tier selector to Buzz agent model tuning.
  • Supports:
    • auto
    • default
    • flex
    • priority
  • Persists the setting through BUZZ_AGENT_SERVICE_TIER.
  • Sends service_tier on OpenAI Chat Completions and Responses requests.
  • Applies the setting to OpenAI summary requests as well.
  • Keeps the setting out of Anthropic and Databricks request paths.
  • Adds parsing, request-body, UI, and configuration tests.
  • Documents the new environment variable.
Screenshot 2026-07-24 at 7 18 12 PM

@maddygoround
maddygoround requested a review from a team as a code owner July 24, 2026 13:46

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment on lines +984 to +987
"auto" => Ok(Some(OpenAiServiceTier::Auto)),
"default" => Ok(Some(OpenAiServiceTier::Default)),
"flex" => Ok(Some(OpenAiServiceTier::Flex)),
"priority" => Ok(Some(OpenAiServiceTier::Priority)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept the Scale service tier

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 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/buzz-agent/src/config.rs Outdated
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())?,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +23 to +28
/** OpenAI service tiers accepted by buzz-agent. */
export const BUZZ_AGENT_SERVICE_TIER_VALUES = [
"auto",
"default",
"flex",
"priority",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maddygoround
maddygoround force-pushed the openai/service_tier branch from a8b8408 to 119b3e5 Compare July 24, 2026 15:21
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>
@maddygoround
maddygoround force-pushed the openai/service_tier branch from 119b3e5 to 0a4eaff Compare July 25, 2026 02:12
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