Support OpenAI Responses API for the OpenAI-Compatible provider
GitLens 18.3.0 currently sends OpenAI and OpenAI-Compatible requests exclusively through the Chat Completions API. Please consider adding native support for the OpenAI Responses API, especially for large Commit Composer workloads.
Use case and observed behavior
I used Commit Composer with a large staged change set through an OpenAI-compatible gateway:
- Approximately 72.6K prompt tokens
- Approximately 5.4K completion tokens
- Chat Completions requests repeatedly failed downstream with HTTP 503 after ~143 seconds or HTTP 524 after ~264 seconds
- The model backend nevertheless recorded successful, billable generations, meaning the non-streaming HTTP response was lost on the return path
As a proof of concept, I locally adapted the bundled OpenAI-Compatible provider to:
- Rewrite the configured
/v1/chat/completionsURL to/v1/responses - Translate
messagestoinput - Translate
max_completion_tokenstomax_output_tokens - Set
store: false - Normalize Responses
output_textand usage fields into the shape GitLens already expects
The same workload then completed successfully through the Responses API in 99.74 seconds, and Commit Composer produced a usable nine-commit composition.
Suggested API/configuration shape
A provider setting such as:
gitlens.ai.openaicompatible.api: chat-completions | responses
or automatic endpoint detection would preserve compatibility while allowing Responses-capable gateways and models to opt in.
Longer term, Responses could also enable background: true plus response polling, and previous_response_id could make Composer correction attempts cheaper.
Related Composer retry observation
Composer validation correctly detected malformed hunk assignments and retried:
Missing hunks: 140Duplicate hunks found: 12, 13, 14, 15, 16, 17
The final result was still nine commits, but validation caused another large API request. This is secondary to the Responses request, though native conversation state may help avoid resending the entire large prompt during corrections.
Environment
- GitLens 18.3.0
- VS Code on Windows
- OpenAI-Compatible provider
- Responses-capable proxy/gateway
I work on AceDataCloud's OpenAI-compatible gateway, which has both Chat Completions and Responses endpoints. The observed lost-response/billed-generation case makes the wire selection more than a model-picker preference. A per-provider opt-in looks safer than auto-detecting based on a model name, especially for gateways with aliases and mixed model families.
For a regression test, I'd keep the existing Chat Completions setting as default; when Responses is selected, verify messages → input, output-token mapping, tool-call IDs/results, streaming completion, usage normalization, and cancellation. A timeout after the upstream accepted work should surface as ambiguous rather than silently retrying a paid generation. Our documented Responses route is /openai/responses under its own API root, so a configurable exact path/base URL is safer than assuming every compatible gateway uses /v1/responses: https://platform.acedata.cloud/documents/openai-responses.
Disclosure: AceDataCloud affiliation. I can share a redacted compatibility fixture if useful; this does not claim to reproduce the reporter's 503/524 gateway path.