Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (copilot): document provider-level-only billing-warning contract

Adam Eivyf8182e2d08e1
diff --git a/client/src/utils/providers.js b/client/src/utils/providers.js
index 3e2a19983b..e103ff2406 100644
--- a/client/src/utils/providers.js
+++ b/client/src/utils/providers.js
@@ -60,12 +60,21 @@ export const enabledApiProviderFilter = (provider) => Boolean(provider?.enabled)
export const isProcessProvider = (provider) => isCliProvider(provider) || isTuiProvider(provider);
/**
- * Check if a provider is the headless Claude Code CLI (`claude --print`) running
- * against a Claude Code subscription plan — i.e. NOT routed through Bedrock or
- * Vertex (those bill via the cloud account, not the plan). Used to surface the
- * billing-change warning: starting 2026-06-15 Anthropic clocks this non-interactive
- * usage under API billing (consuming API credits) instead of the Claude Code plan,
- * so it should be avoided in favor of the interactive Claude Code TUI provider.
+ * Check if a provider is the headless Claude Code CLI (`claude --print`) whose
+ * *provider-level config* points it at a Claude Code subscription plan — i.e. the
+ * provider's own `envVars` do NOT route it through Bedrock or Vertex (those bill
+ * via the cloud account, not the plan). Used to surface the billing-change warning:
+ * starting 2026-06-15 Anthropic clocks this non-interactive usage under API billing
+ * (consuming API credits) instead of the Claude Code plan, so it should be avoided
+ * in favor of the interactive Claude Code TUI provider.
+ *
+ * Contract is intentionally provider-level only: this is a client-side heuristic
+ * that sees just the saved provider record. A user who routes the spawn to
+ * Bedrock/Vertex *globally* via `~/.claude/settings.json` (merged below
+ * `provider.envVars` in `server/services/agentCliSpawning.js`) rather than on the
+ * provider would be cloud-billed but still match here. Configure Bedrock/Vertex on
+ * the provider's `envVars` (as the shipped `claude-code-bedrock` sample does) to
+ * suppress the warning.
*/
export const isClaudeCodePlanCli = (provider) =>
isCliProvider(provider) &&