(backend config.BackendConfig, taskType string)
| 150 | } |
| 151 | |
| 152 | func supportsTask(backend config.BackendConfig, taskType string) bool { |
| 153 | if taskType == "" { |
| 154 | return true |
| 155 | } |
| 156 | |
| 157 | switch taskType { |
| 158 | case "simple": |
| 159 | return hasCapability(backend.Capabilities, "chat") || hasCapability(backend.Capabilities, "summarization") |
| 160 | case "complex": |
| 161 | return hasCapability(backend.Capabilities, "reasoning") |
| 162 | default: |
| 163 | return hasCapability(backend.Capabilities, taskType) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | func hasCapability(capabilities []string, expected string) bool { |
| 168 | for _, c := range capabilities { |
no test coverage detected