Skip to content

feat(config): add subagent LLM configuration support#1489

Open
tatianna0 wants to merge 1 commit intoHKUDS:mainfrom
tatianna0:feature/subagent-config
Open

feat(config): add subagent LLM configuration support#1489
tatianna0 wants to merge 1 commit intoHKUDS:mainfrom
tatianna0:feature/subagent-config

Conversation

@tatianna0
Copy link
Copy Markdown

Summary

Allow subagent to use independent LLM configuration. Main agent typically needs stronger LLM for coordination, while subagent can use cheaper models to save tokens.

  • Add subagent field to AgentsConfig
  • Subagent uses its own provider field; falls back to defaults if not configured
  • Add AgentRuntimeConfig TypedDict for type safety
  • Refactor AgentLoop to accept agent_config and subagent_config dicts
  • Add provider parameter to get_provider_name/get_provider/get_api_base methods

Example config

{
  "agents": {
    "defaults": {
      "workspace": "~/.nanobot/workspace",
      "model": "glm-5",
      "provider": "zhipu",
      "maxTokens": 8192,
      "temperature": 0.1,
      "maxToolIterations": 40,
      "memoryWindow": 100,
      "reasoningEffort": null
    },
    "subagent": {
      "workspace": "~/.nanobot/workspace",
      "model": "qwen3.5-plus",
      "provider": "dashscope",
      "maxTokens": 8192,
      "temperature": 0.1,
      "maxToolIterations": 40,
      "memoryWindow": 100,
      "reasoningEffort": null
    }
  }
}

Test plan

  • Test with subagent config using different provider
  • Test without subagent config (uses defaults)
  • Test provider reuse when same provider type

Allow subagent to use independent LLM configuration.
Main agent typically needs stronger LLM for coordination,
while subagent can use cheaper models to save tokens.

- Add subagent field to AgentsConfig
- Subagent uses its own provider field; falls back to defaults if not configured
- Add AgentRuntimeConfig TypedDict for type safety
- Refactor AgentLoop to accept agent_config and subagent_config dicts
- Add provider parameter to get_provider_name/get_provider/get_api_base
@wenjielei1990
Copy link
Copy Markdown
Contributor

looks a reasonal move :)

@Re-bin
Copy link
Copy Markdown
Collaborator

Re-bin commented Mar 5, 2026

cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants