feat: let builder use caller or platform llm
All checks were successful
build / build (push) Successful in 23s

This commit is contained in:
robert
2026-05-26 10:52:09 -03:00
parent b9e63112d5
commit 7829e5c71e
8 changed files with 31 additions and 17 deletions

View File

@@ -10,8 +10,8 @@ This agent only works when invoked through the platform orchestrator,
because it needs three things forwarded from the caller:
1. ``ctx.workspace.bucket`` — the user's MinIO bucket
2. ``ctx.llm`` — a platform-scoped LiteLLM grant token for the builder's
own DeepAgents loop
2. ``ctx.llm`` — caller-selected LLM credentials when available, otherwise
a platform-scoped LiteLLM grant token for the builder's own DeepAgents loop
3. ``ctx.cp_jwt`` — the user's CP JWT, so cp_deploy_tarball can
POST to /v1/agents/from-tarball as the user.
"""
@@ -53,7 +53,7 @@ class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
config_model = BuilderConfig
auth_model = NoAuth
tools_used = ("deepagents", "langgraph", "a2a-pack", "litellm", "microsandbox")
llm_provisioning = LLMProvisioning.PLATFORM
llm_provisioning = LLMProvisioning.PLATFORM_OR_CALLER_PROVIDED
wants_cp_jwt = True
workspace_access = WorkspaceAccess.dynamic(
allowed_modes=(WorkspaceMode.READ_ONLY, WorkspaceMode.READ_WRITE_OVERLAY),
@@ -62,8 +62,9 @@ class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
price_per_call_usd=0.10,
caller_pays_llm=False,
notes=(
"Uses a platform-scoped LiteLLM grant for the builder's own "
"reasoning loop; deployed agent is yours forever."
"Uses caller-selected LLM credentials when available; otherwise "
"uses a platform-scoped LiteLLM grant for the builder's own "
"reasoning loop. Deployed agents remain yours."
),
)