Skip to content

feat(acp): expose resolved service tier per prompt - #1499

Open
smsunarto wants to merge 1 commit into
get-bb:mainfrom
smsunarto:bb/expose-resolved-service-tier-thr_ihd6tgpcbp
Open

feat(acp): expose resolved service tier per prompt#1499
smsunarto wants to merge 1 commit into
get-bb:mainfrom
smsunarto:bb/expose-resolved-service-tier-thr_ihd6tgpcbp

Conversation

@smsunarto

Copy link
Copy Markdown
Contributor

Summary

Include bb's resolved service tier in every custom-agent ACP session/prompt request:

{
  "_meta": {
    "getbb.app/serviceTier": "default"
  }
}

The value is always default or fast.

Motivation

Custom ACP agents currently need to read bb's thread event API to find the resolved service tier. This change puts the final value directly on the prompt where it applies.

Behavior

  • Sends the tier with normal prompts, steers, queued steers, and compaction prompts.
  • Resolves the tier independently for each prompt after bb applies its precedence rules.
  • Sends an explicit default instead of omitting the key.
  • Works with agents that do not define modelCli.
  • Uses ACP's extensible _meta field with an owner-qualified key.
  • Allows existing agents to ignore the unknown metadata.

The value applies only to its prompt. Agents should not retain it as the default for later prompts. An explicit default clears Fast mode from an earlier prompt.

The value is a routing hint. It does not prove provider support, entitlement, or authorization.

Why prompt metadata?

ACP session configuration is agent-advertised and session-scoped. ACP does not define a standard service-tier option or option ID.

bb owns the Fast mode control and resolves its final value per prompt. Prompt metadata keeps that value atomic with the affected prompt and avoids a second session-state mechanism.

Session lifecycle

A setting change must not replace an active ACP session before a steer. This change defers session-level reconfiguration during active steers and applies it before the next normal turn.

This preserves the active turn and prevents stale steers while retaining CLI-backed model selection behavior.

Verification

  • Agent runtime typecheck passed.
  • Focused ACP and lifecycle tests: 143 passed.
  • Full @bb/agent-runtime suite: 942 passed.
  • Formatting and diff checks passed.

AGENT GENERATED: by Claude Mythos 5

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