This commit is contained in:
@@ -32,16 +32,15 @@ class BuilderPromptTests(unittest.TestCase):
|
||||
self.assertIn("stream=True", agent_source)
|
||||
self.assertIn('grant_write_prefixes=("agents/{name}/",)', agent_source)
|
||||
|
||||
def test_outer_builder_accepts_user_creds_or_platform_llm_grants(self) -> None:
|
||||
def test_outer_builder_uses_user_llm_credentials(self) -> None:
|
||||
agent_source = Path(__file__).resolve().parents[1].joinpath("agent.py").read_text()
|
||||
|
||||
self.assertIn(
|
||||
"llm_provisioning = LLMProvisioning.PLATFORM_OR_CALLER_PROVIDED",
|
||||
"llm_provisioning = LLMProvisioning.PLATFORM",
|
||||
agent_source,
|
||||
)
|
||||
self.assertIn("caller_pays_llm=False", agent_source)
|
||||
self.assertIn("platform-scoped LiteLLM grant", agent_source)
|
||||
self.assertIn("caller-selected LLM credentials", agent_source)
|
||||
self.assertIn("caller_pays_llm=True", agent_source)
|
||||
self.assertIn("caller's saved LLM credential", agent_source)
|
||||
|
||||
def test_builder_defaults_raise_timeout_budget(self) -> None:
|
||||
config_source = Path(__file__).resolve().parents[1].joinpath(
|
||||
@@ -60,15 +59,15 @@ class BuilderPromptTests(unittest.TestCase):
|
||||
self.assertIn(f"a2a-pack>={A2A_PACK_MIN_VERSION}", requirements)
|
||||
self.assertIn("a2a-pack>={A2A_PACK_MIN_VERSION}", tools_source)
|
||||
|
||||
def test_prompt_defaults_generated_agents_to_platform_llm_grants(self) -> None:
|
||||
def test_prompt_defaults_generated_agents_to_user_llm_credentials(self) -> None:
|
||||
self.assertIn("LLMProvisioning.PLATFORM", SYSTEM_PROMPT)
|
||||
self.assertIn("caller_pays_llm=False", SYSTEM_PROMPT)
|
||||
self.assertIn("main-agent handoffs mint a scoped A2A LiteLLM grant", SYSTEM_PROMPT)
|
||||
self.assertIn("caller_pays_llm=True", SYSTEM_PROMPT)
|
||||
self.assertIn("main-agent handoffs forward the caller's saved LLM", SYSTEM_PROMPT)
|
||||
self.assertIn("ctx.llm.api_key", SYSTEM_PROMPT)
|
||||
|
||||
files = _builder_skill_files()
|
||||
self.assertIn("LLMProvisioning.PLATFORM", files["a2apack-agent-authoring/SKILL.md"])
|
||||
self.assertIn("caller_pays_llm=False", files["a2apack-agent-authoring/SKILL.md"])
|
||||
self.assertIn("caller_pays_llm=True", files["a2apack-agent-authoring/SKILL.md"])
|
||||
self.assertIn("ctx.llm.api_key", files["agent-quality-review/SKILL.md"])
|
||||
|
||||
def test_prompt_rejects_platform_derived_pricing_fields(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user