A proxy server/adapter layer that relays requests to VS Code APIs.
Listens at localhost:5555 by default. For authentication, open
output/vscode-cp-proxy for authentication token, or, set your own
token using command setToken provided by this extension by pressing
(Ctrl+Shift+P) in VS Code.
Currently supported endpoints:
OpenAI
/openai/v1/models
Lists the models supported
/openai/v1/chat/completions
Translates the incoming requests in OpenAI format into VS
Code chat API invocations.
Streams responses by default. Non-streaming behavior not
tested.
Injects "service_tier": "flex" and "fail_fast": true into the
JSON body before forwarding.
Forwards the incoming Authorization header as is. The target
host and path are fixed by the extension. Other incoming
headers are never forwarded.
Streams the upstream response back to the client unchanged.
The proxy token gate does not apply to this endpoint. The
incoming Authorization header carries the DeepInfra API key,
so it cannot also carry the proxy token. When the incoming
request has no Authorization header, the request is rejected
with HTTP 400.
Use with Emacs
Load/require vscode-cp-proxy.el
M-x vscode-cp-proxy-set-gptel-backend
If using a custom token, you can store it in the authinfo gpg file and configure as: