* Get the executor model name for a task, respecting chain config. * Falls back to config.model.name if no chain configured. * * @param {string} task - User task (for complexity estimation) * @param {object} config - SmallCode config
(task, config)
| 127 | * @param {object} config - SmallCode config |
| 128 | */ |
| 129 | function getExecutorModel(task, config) { |
| 130 | const chain = getChainConfig(); |
| 131 | if (!chain.enabled) return config.model.name; |
| 132 | if (!chain.executor) return config.model.name; |
| 133 | return chain.executor; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Get the base URL for the executor, respecting chain config. |
no test coverage detected