Sourcegraph Cody Gateway
Learn how Cody Gateway powers the default Sourcegraph provider for completions to facilitate Cody features.
Sourcegraph Cody Gateway powers the default "provider": "sourcegraph"
and Cody completions for Sourcegraph Enterprise users. It supports a variety of upstream LLM providers, such as Anthropic and OpenAI, with rate limits, quotas, and model availability tied to your Sourcegraph Enterprise subscription.
Supported Models
See our page on Supported LLMs for a current list of supported models and providers.
Using Cody Gateway in Sourcegraph Enterprise
To enable completions provided by Cody Gateway on your Sourcegraph Enterprise instance, make sure your license key is set, and Cody is enabled in your site configuration:
JSONC{ "licenseKey": "<...>", "cody.enabled": true, "completions": { "provider": "sourcegraph" } }
After adding the license key, the default configuration and authentication will be automatically applied.
For more details about configuring Cody, read the following resources:
Cody Gateway is hosted at cody-gateway.sourcegraph.com
. To use Cody Gateway, your Sourcegraph instance must be connected to the service in this domain.
Rate limits and quotas
Rate limits, quotas, and model availability are tied to your Sourcegraph Enterprise license for Sourcegraph Enterprise instances.
All successful requests to Cody Gateway will count toward your rate limits. Unsuccessful requests are not counted as usage.
Rate limits, quotas, and model availability are also configured per Cody feature - for example, you will have separate rate limits for Cody chat and completions.
In addition to the above, we may throttle concurrent requests to Cody Gateway per Sourcegraph Enterprise instance or Cody App user to prevent excessive burst consumption.
Privacy and security
Sourcegraph Cody Gateway does not retain sensitive data (prompt test and source code included in requests, etc.) from any traffic received. Only rate limit consumption per Sourcegraph Enterprise license and some high-level diagnostic data (error codes from upstream, numeric/enum request parameters, etc) are tracked.
For more details about Cody Gateway security practices, please reach out to your account manager. You can also refer to the Cody usage and privacy notice for more privacy details about Cody in general.