Files
Tyler James Leonhardt cebc749d20 agentHost: revert reserved integration id change; tag Codex proxy with vscode_codex UA (#322600)
* Revert "Merge pull request #321964 from microsoft/fix-agenthost-reserved-integration-id"

This reverts commit b82871d0b1, reversing
changes made to 18ab318cd2.

* agentHost: do not pass an integration id into CAPIClient

The 'code-oss' integration id is reserved and rejected by
@vscode/copilot-api's CAPIClient constructor. Stop passing it in and
drop the now-unnecessary getIntegrationId() test overrides; the
Copilot-Integration-Id header still defaults via the library and the
per-request suppressIntegrationId opt-in is unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: tag Codex proxy requests with a vscode_codex user-agent

Mirror the Claude proxy and oaiLanguageModelServer.ts by transforming the
inbound codex user-agent (replacing the client-name portion with the
vscode_codex prefix) and forwarding it to CAPI on /v1/responses requests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: tag Codex agent model-list fetch with a vscode_codex user-agent

The Codex agent's _refreshModels() call to ICopilotApiService.models() did
not set a User-Agent, unlike the Claude agent (which sends
vscode_claude_code/<version>). Add a matching vscode_codex/<version> header
so the model-list fetch is identifiable server-side, consistent with the
Codex proxy's responses requests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: simplify CopilotApiService test construction

Address PR review: the anonymous CopilotApiService subclasses no longer
override anything after the getIntegrationId() removal, so replace them with
direct construction for readability and cleaner stack traces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-23 21:28:04 +00:00
..