fix: generate agents with platform LLM grants
All checks were successful
build / build (push) Successful in 21s
All checks were successful
build / build (push) Successful in 21s
This commit is contained in:
@@ -53,6 +53,17 @@ 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:
|
||||
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("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("ctx.llm.api_key", files["agent-quality-review/SKILL.md"])
|
||||
|
||||
def test_prompt_requires_resource_mirror_for_heavy_agents(self) -> None:
|
||||
self.assertIn("declare resources in BOTH places", SYSTEM_PROMPT)
|
||||
self.assertIn("resources = Resources", SYSTEM_PROMPT)
|
||||
|
||||
@@ -31,7 +31,7 @@ class TemplateInitTests(unittest.TestCase):
|
||||
self.assertEqual(set(files), {"agent.py", "a2a.yaml", "requirements.txt"})
|
||||
self.assertIn('name = "research-agent"', files["agent.py"])
|
||||
self.assertIn('description = "Research helper"', files["agent.py"])
|
||||
self.assertIn("LLMProvisioning.CALLER_PROVIDED", files["agent.py"])
|
||||
self.assertIn("LLMProvisioning.PLATFORM", files["agent.py"])
|
||||
self.assertIn("WorkspaceAccess.dynamic", files["agent.py"])
|
||||
self.assertIn("RUNTIME_SKILLS_DIR", files["agent.py"])
|
||||
self.assertIn("_runtime_skills_root", files["agent.py"])
|
||||
|
||||
Reference in New Issue
Block a user