@@ -62,6 +62,15 @@ var (
6262 errSmallModelNotFound = errors.New("small model not found in provider config")
6363)
6464
65+// Copilot models that use the Responses API instead of Chat Completions.
66+var copilotResponsesModels = map[string]bool{
67+ "gpt-5.2": true,
68+ "gpt-5.2-codex": true,
69+ "gpt-5.3-codex": true,
70+ "gpt-5.4-mini": true,
71+ "gpt-5-mini": true,
72+}
73+
6574type Coordinator interface {
6675 // INFO: (kujtim) this is not used yet we will use this when we have multiple agents
6776 // SetMainAgent(string)
@@ -731,7 +740,12 @@ func (c *coordinator) buildOpenaiCompatProvider(baseURL, apiKey string, headers
731740 // Set HTTP client based on provider and debug mode.
732741 var httpClient *http.Client
733742 if providerID == string(catwalk.InferenceProviderCopilot) {
734− opts = append(opts, openaicompat.WithUseResponsesAPI())
743+ opts = append(opts,
744+ openaicompat.WithUseResponsesAPI(),
745+ openaicompat.WithResponsesAPIFunc(func(modelID string) bool {
746+ return copilotResponsesModels[modelID]
747+ }),
748+ )
735749 httpClient = copilot.NewClient(isSubAgent, c.cfg.Config().Options.Debug)
736750 } else if c.cfg.Config().Options.Debug {
737751 httpClient = log.NewHTTPClient()