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>
This commit is contained in:
tanzhenxin 2026-03-27 11:49:45 +08:00
parent 3776825c2d
commit 5d58b2f112
17 changed files with 372 additions and 207 deletions

View file

@ -40,6 +40,13 @@ export const AgentViewerStep = ({ selectedAgent }: AgentViewerStepProps) => {
<Text>{toolsDisplay}</Text>
</Box>
{agent.model && (
<Box>
<Text color={theme.text.primary}>{t('Model: ')}</Text>
<Text>{agent.model}</Text>
</Box>
)}
{shouldShowColor(agent.color) && (
<Box>
<Text color={theme.text.primary}>{t('Color: ')}</Text>