qwen-code/packages/sdk-typescript/src
tanzhenxin 5d58b2f112 feat: simplify subagent model configuration with model selector
Refactor subagent model configuration from nested modelConfig object to a simple model string field for better UX and clarity.

Changes:
- Replace modelConfig object with model string in SubagentConfig interface
- Add model-selection.ts utility for parsing and validating model selectors
- Support 'inherit' keyword and bare model IDs (e.g., 'glm-5', 'claude-sonnet-4-6')
- Maintain backward compatibility by parsing legacy modelConfig frontmatter
- Update validation to reject cross-provider authType-prefixed selectors
- Update SDK types (TypeScript and Java) to reflect new schema
- Add comprehensive tests for model selection and validation
- Update documentation with model selection examples

Breaking changes:
- modelConfig.frontmatter field deprecated in favor of model field
- Cross-provider model selectors (e.g., 'openai:gpt-4') not supported for subagents

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 11:49:45 +08:00
..
mcp Add Gemini provider, remove legacy Google OAuth, and tune generation defaults 2025-12-19 16:26:54 +08:00
query feat: add system prompt customization options in SDK and CLI 2026-03-16 02:57:31 +08:00
transport feat: add system prompt customization options in SDK and CLI 2026-03-16 02:57:31 +08:00
types feat: simplify subagent model configuration with model selector 2026-03-27 11:49:45 +08:00
utils feat: enhance session ID handling and error propagation 2026-02-13 21:41:38 +08:00
index.ts feat: simplify subagent model configuration with model selector 2026-03-27 11:49:45 +08:00