Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Navigation
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
    • Development
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. cody
  3. clients
  4. app
  5. app_configuration

Cody App Configuration

Starting December 2023, we are completely sunsetting the Cody App, which has been deprecated.

Using a third-party LLM provider

Instead of using Sourcegraph Cody Gateway, you can configure the Cody app to use a third-party provide directly. Currently this can only be Anthropic or OpenAI.

You must create your own key with Anthropic here or with OpenAI here. Once you have the key, go to Settings > Advanced settings and update your site configuration:

{
  // [...]
  "cody.enabled": true,
  "completions": {
    "enabled": true,
    "provider": "anthropic", // or "openai" if you use OpenAI
    "accessToken": "<key>",
    "endpoint": "https://api.anthropic.com/v1/complete" // or "https://api.openai.com/v1/chat/completions"
  },
  "embeddings": {
    "enabled": true,
    "provider": "openai",
    "accessToken": "<key>",
    "endpoint": "https://api.openai.com/v1/embeddings"
  },
}

WARNING: When using OpenAI models for completions, only chat completions will work - code completions are currently unsupported.

On this page

  1. Cody App Configuration

    1. Using a third-party LLM provider