calm-artist-7206
09/25/2025, 8:00 PM(responses) ➜ responses git:(openhands/support-responses-api) ✗ python examples/05_use_llm_registry.py
[09/25/25 215616] INFO [LLM registry llm_registry.py:81
5aba11c1-f596-47f7-a1a6-88e94a5cbd2b]:
Added LLM for service primary-llm
Traceback (most recent call last):
File "/Users/enyst/repos/agent-sdk/.worktrees/responses/examples/05_use_llm_registry.py", line 39, in <module>
llm = llm_registry.get("main_agent")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/enyst/repos/agent-sdk/.worktrees/responses/openhands/sdk/llm/llm_registry.py", line 98, in get
raise KeyError(
KeyError: "Service ID 'main_agent' not found in registry. Use add() to register an LLM first."quick-window-91705
09/25/2025, 8:03 PMprimary-llm and later was attempted to be retrieved with main_agentquick-window-91705
09/25/2025, 8:04 PMservice_id for adding and getting llms match
then look at all the example files and make sure that LLMs service-id have good naming conventions
agent related llms should be registered with ID agent and condenser llm should be registered with ID condenser , etcnutritious-balloon-65098
09/25/2025, 8:05 PMnutritious-balloon-65098
09/25/2025, 8:10 PM"agent" service_id
• Condenser LLMs: "condenser" service_id
• Specialized LLMs: Descriptive names (e.g., "security-analyzer", "vision-llm")
• Multi-purpose examples: Descriptive prefixes (e.g., "agent-primary", "demo-secondary")
✅ Verification:
• All pre-commit hooks pass (formatting, linting, type checking)
• Example 5 now works correctly (tested up to API key requirement)
• Changes are minimal and focused only on service_id standardization
The examples now have consistent, intuitive service_id naming that follows the requested conventions, making the codebase more maintainable and easier to understand.
Would you like me to:
1. Push these changes to a new branch and create a pull request?
2. Keep the changes local for now?
3. Follow any other specific Git workflow you prefer?
<sub>View full conversation</sub>quick-window-91705
09/25/2025, 8:12 PMnutritious-balloon-65098
09/25/2025, 8:12 PMnutritious-balloon-65098
09/25/2025, 8:13 PMfix/standardize-llm-service-ids branch and opened draft PR #499
🎯 Final State:
• 21 example files now use consistent service_id naming
• Agent LLMs: "agent" service_id
• Condenser LLMs: "condenser" service_id
• Specialized LLMs: Descriptive names maintained
• All pre-commit checks pass
• Example 5 now works correctly (no more KeyError)
Pull Request: https://github.com/All-Hands-AI/agent-sdk/pull/499
The changes are minimal, focused, and directly address the reported issue while establishing consistent naming conventions across the entire examples directory.
<sub>View full conversation</sub>