Commit 2865124
committed
fix: prioritize CLI --model argument over command markdown model
Fixes #17783
The CLI --model argument should have highest priority according to docs,
but it was being overridden by model specified in command/agent markdown.
For subtasks (commands with subtask: true or using a subagent), the
command/agent model takes precedence as these are specialized operations.
Changed the priority order in session/prompt.ts to:
1. For subtasks: command.model -> command.agent.model
2. For regular commands: input.model (CLI) -> command.model -> command.agent.model
3. Last used model as fallback1 parent 51fcd04 commit 2865124
1 file changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1803 | 1803 | | |
1804 | 1804 | | |
1805 | 1805 | | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1806 | 1809 | | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
1810 | | - | |
1811 | | - | |
1812 | | - | |
1813 | | - | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
1814 | 1817 | | |
| 1818 | + | |
| 1819 | + | |
1815 | 1820 | | |
1816 | 1821 | | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
1817 | 1829 | | |
1818 | 1830 | | |
1819 | 1831 | | |
| |||
1830 | 1842 | | |
1831 | 1843 | | |
1832 | 1844 | | |
1833 | | - | |
1834 | 1845 | | |
1835 | 1846 | | |
1836 | 1847 | | |
| |||
1843 | 1854 | | |
1844 | 1855 | | |
1845 | 1856 | | |
1846 | | - | |
1847 | 1857 | | |
1848 | 1858 | | |
1849 | 1859 | | |
| |||
0 commit comments