diff --git a/docs/admin/architecture.mdx b/docs/admin/architecture.mdx index df395c8d6..c90db2765 100644 --- a/docs/admin/architecture.mdx +++ b/docs/admin/architecture.mdx @@ -188,11 +188,13 @@ Debugging includes [tracing](/admin/observability/tracing) and [logging](/admin/ ## Cody -This section covers the Enterprise architecture of our AI assistant, Cody. [Cody Enterprise](/cody/clients/enable-cody-enterprise) can be deployed via the Sourcegraph Cloud or on your self-hosted infrastructure. +[Cody Enterprise](/cody/clients/enable-cody-enterprise) can be deployed via [Sourcegraph Cloud](/cloud) or on your self-hosted infrastructure. This section contains architecture diagrams for Cody deployed in different Sourcegraph environments. -### Cody with Sourcegraph Cloud deployment +{/* Figma source: https://www.figma.com/file/lAPHpdhtEmOJ22IQXVZ0vs/Cody-architecture-diagrams-SQS-draft-2024-04?type=whiteboard&node-id=0-1&t=blg78H2YXXbdGSPc-0 */} -This is a recommended deployment for Cody Enterprise. It uses the Sourcegraph Cloud infrastructure and Cody gateway. +### Sourcegraph Cloud deployment + +This is a recommended deployment for Cody Enterprise. It uses the Sourcegraph Cloud infrastructure and is backed by the [Sourcegraph Model Provider (Cody Gateway)](/model-provider). @@ -202,7 +204,7 @@ This is an example of a more complex deployment that uses Sourcegraph Enterprise -### Data flow +### Cody Data flow The following diagram describes the data flow between the different components of Cody Enterprise. diff --git a/docs/admin/self-hosted.mdx b/docs/admin/self-hosted.mdx index 40301820b..d87b23962 100644 --- a/docs/admin/self-hosted.mdx +++ b/docs/admin/self-hosted.mdx @@ -1,4 +1,4 @@ -# Administration +# Enterprise Self-Hosted Supported on [Enterprise](/pricing/enterprise) plans. diff --git a/docs/cody/capabilities/auto-edit.mdx b/docs/cody/capabilities/auto-edit.mdx index bff568ff5..ec72da7d7 100644 --- a/docs/cody/capabilities/auto-edit.mdx +++ b/docs/cody/capabilities/auto-edit.mdx @@ -56,7 +56,7 @@ Site admins can opt their organization out of the auto-edit feature by disabling ### Configure auto-edit access -Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit: +Auto-edit is available as default for Enterprise customers with [Sourcegraph Model Provider (Cody Gateway)](/model-provider) access. To configure auto-edit: - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) @@ -104,7 +104,7 @@ Site admins can opt their organization out of the auto-edit feature by disabling ### Configure auto-edit access -Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit: +Auto-edit is available as default for Enterprise customers with [Sourcegraph Model Provider (Cody Gateway)](/model-provider) access. To configure auto-edit: - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) @@ -151,7 +151,7 @@ You can opt out and switch back to autocomplete by deselecting it from the Cody ### Configure auto-edit access -Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit: +Auto-edit is available as default for Enterprise customers with [Sourcegraph Model Provider (Cody Gateway)](/model-provider) access. To configure auto-edit: - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) diff --git a/docs/cody/clients/enable-cody-enterprise.mdx b/docs/cody/clients/enable-cody-enterprise.mdx index 73933eb45..3b929ad3f 100644 --- a/docs/cody/clients/enable-cody-enterprise.mdx +++ b/docs/cody/clients/enable-cody-enterprise.mdx @@ -22,13 +22,13 @@ With [Sourcegraph Cloud](/cloud/), you get Cody as a managed service, and you ** ### Prerequisites - You have Sourcegraph version `5.1.0` or more -- A Sourcegraph Enterprise subscription with [Cody Gateway](/cody/core-concepts/cody-gateway) or an account with a third-party LLM provider +- A Sourcegraph Enterprise subscription with [Sourcegraph Model Provider (Cody Gateway)](/model-provider) or an account with a third-party LLM provider ### Enable Cody on your Sourcegraph instance Site admins can only enable Cody on the Sourcegraph instance. To do so, -- First, configure your desired LLM provider either by [using Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway) or by directly using a third-party LLM provider +- First, configure your desired LLM provider either by [using Sourcegraph Model Provider (Cody Gateway)](/model-provider) or by directly using a third-party LLM provider - Next, go to **Site admin > Site configuration** (`/site-admin/configuration`) on your instance and set: ```json diff --git a/docs/cody/clients/install-vscode.mdx b/docs/cody/clients/install-vscode.mdx index 28cd08745..a84313e88 100644 --- a/docs/cody/clients/install-vscode.mdx +++ b/docs/cody/clients/install-vscode.mdx @@ -232,7 +232,7 @@ Enterprise users get Claude 3.5 Sonnet as the default LLM models without extra c For enterprise users on Amazon Bedrock: 3.5 Sonnet is unavailable in `us-west-2` but available in `us-east-1`. Check the current model availability on AWS and your customer's instance location before switching. Provisioned throughput via AWS is not supported for 3.5 Sonnet. -You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. Your site administrator determines the LLM, and cannot be changed within the editor. However, Cody Enterprise users when using Cody Gateway have the ability to [configure custom models](/cody/core-concepts/cody-gateway#configuring-custom-models) from Anthropic, OpenAI, and Google Gemini. +You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. Your site administrator determines the LLM, and cannot be changed within the editor. However, Cody Enterprise users when using Sourcegraph Model Provider (Cody Gateway) have the ability to [configure custom models](/model-provider#configuring-custom-models) from Anthropic, OpenAI, and Google Gemini. Read more about all the supported LLM models [here](/cody/capabilities/supported-models) diff --git a/docs/cody/core-concepts/cody-gateway.mdx b/docs/cody/core-concepts/cody-gateway.mdx deleted file mode 100644 index 1b345363c..000000000 --- a/docs/cody/core-concepts/cody-gateway.mdx +++ /dev/null @@ -1,51 +0,0 @@ -# Sourcegraph Cody Gateway - -

Learn how Cody Gateway powers the default Sourcegraph provider for completions, enabling Cody features for Sourcegraph Enterprise customers.

- -Cody Gateway is available for Sourcegraph Enterprise customers using version 5.1 or more. - -Cody Gateway powers the default `"provider": "sourcegraph"` and Cody completions for Sourcegraph Enterprise users. It integrates with various upstream LLM providers, including [Anthropic](https://www.anthropic.com/) and [OpenAI](https://openai.com/), with rate limits, quotas, and model availability tied to your Sourcegraph Enterprise subscription. - -## Supported Models - -For a full list of supported models and providers, read our [Supported LLMs](/cody/capabilities/supported-models) docs. - -## Setting up 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](/admin/config/site_config): - -```jsonc -{ - "licenseKey": "<...>", - "cody.enabled": true, - "completions": { - "provider": "sourcegraph" - } -} -``` - -Once the license key is added, default configuration and authentication are automatically applied. - -For more details about configuring Cody, it's recommended to read about [Enabling Cody for Sourcegraph Enterprise](/cody/clients/enable-cody-enterprise). - -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. - -Sourcegraph Cody Gateway access must be included in your Sourcegraph Enterprise subscription. You can verify it by checking it with your account manager. If you are a [Sourcegraph Cloud](/cloud/) user, Cody is enabled by default on your instance starting with Sourcegraph 5.1. - -## 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. - -You can reach out for more details about Sourcegraph Cody Gateway access available to you and how you can gain access to higher rate limits, quotas, and/or model options. - -## 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 high-level diagnostic data (error codes from upstream, numeric/enum request parameters, etc) are tracked. - -For more details about Cody Gateway security practices, please contact your account manager. For more privacy details about Cody in general, refer to the [Cody usage and privacy notice](https://about.sourcegraph.com/terms/cody-notice). diff --git a/docs/cody/core-concepts/enterprise-architecture.mdx b/docs/cody/core-concepts/enterprise-architecture.mdx deleted file mode 100644 index c45a5073d..000000000 --- a/docs/cody/core-concepts/enterprise-architecture.mdx +++ /dev/null @@ -1,23 +0,0 @@ -# Cody Enterprise architecture - -

[Cody Enterprise](/cody/clients/enable-cody-enterprise) can be deployed via the Sourcegraph Cloud or on your self-hosted infrastructure. This page describes the architecture diagrams for Cody deployed in different Sourcegraph environments.

- -{/* Figma source: https://www.figma.com/file/lAPHpdhtEmOJ22IQXVZ0vs/Cody-architecture-diagrams-SQS-draft-2024-04?type=whiteboard&node-id=0-1&t=blg78H2YXXbdGSPc-0 */} - -## Sourcegraph Cloud deployment - -This is a recommended deployment for Cody Enterprise. It uses the Sourcegraph Cloud infrastructure and Cody gateway. - - - -## Sourcegraph Enterprise Server (self-hosted) on Amazon Bedrock - -This is an example of a more complex deployment that uses Sourcegraph Enterprise Server (self-hosted) and Amazon Bedrock. - - - -## Data flow - -The following diagram describes the data flow between the different components of Cody Enterprise. - - diff --git a/docs/cody/core-concepts/index.mdx b/docs/cody/core-concepts/index.mdx index 3585e4967..012898429 100644 --- a/docs/cody/core-concepts/index.mdx +++ b/docs/cody/core-concepts/index.mdx @@ -8,9 +8,9 @@ - + - + diff --git a/docs/cody/enterprise/completions-configuration.mdx b/docs/cody/enterprise/completions-configuration.mdx index 952876b9f..49d704c40 100644 --- a/docs/cody/enterprise/completions-configuration.mdx +++ b/docs/cody/enterprise/completions-configuration.mdx @@ -168,7 +168,7 @@ For the access token, When tested with other coder models for the autocomplete use case, [StarCoder](https://huggingface.co/blog/starcoder) offered significant improvements in quality and latency compared to our control groups for users on Sourcegraph.com. You can read more about the improvements in our [October 2023 release notes](https://sourcegraph.com/blog/feature-release-october-2023) and the [GA release notes](https://sourcegraph.com/blog/cody-is-generally-available). -To ensure a fast and reliable experience, we are partnering with [Fireworks](https://fireworks.ai/) and have set up a dedicated hardware deployment for our Enterprise users. Sourcegraph supports StarCoder using the [Cody Gateway](/cody/core-concepts/cody-gateway). +To ensure a fast and reliable experience, we are partnering with [Fireworks](https://fireworks.ai/) and have set up a dedicated hardware deployment for our Enterprise users. Sourcegraph supports StarCoder using the [Sourcegraph Model Provider (Cody Gateway)](/model-provider). To enable StarCoder, go to **Site admin > Site configuration** (`/site-admin/configuration`) and change the `completionModel`: diff --git a/docs/cody/enterprise/features.mdx b/docs/cody/enterprise/features.mdx index 7eab89368..cea0f2d35 100644 --- a/docs/cody/enterprise/features.mdx +++ b/docs/cody/enterprise/features.mdx @@ -12,7 +12,7 @@ Site administrators can set the duration of access tokens for users connecting C Guardrails has been deprecated and is no longer recommended for use. -Guardrails for public code is only supported on VS Code, JetBrains IDEs extension, and Sourcegraph Web app for Cody Enterprise customers using [Cody Gateway](https://sourcegraph.com/docs/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway). It is not supported for any BYOK (Bring Your Own Key) deployments. +Guardrails for public code is only supported on VS Code, JetBrains IDEs extension, and Sourcegraph Web app for Cody Enterprise customers using [Sourcegraph Model Provider (Cody Gateway)](/model-provider). It is not supported for any BYOK (Bring Your Own Key) deployments. Open source attribution guardrails for public code, commonly called copyright guardrails, reduce the exposure to copyrighted code. This involves implementing a verification mechanism within Cody to ensure that any code generated by the platform does not replicate open source code. diff --git a/docs/cody/enterprise/model-configuration.mdx b/docs/cody/enterprise/model-configuration.mdx index fd7cce1af..1160dbb1b 100644 --- a/docs/cody/enterprise/model-configuration.mdx +++ b/docs/cody/enterprise/model-configuration.mdx @@ -36,9 +36,9 @@ For a minimal configuration example, see [Configure Sourcegraph-supplied models] ## Sourcegraph-provided models -Sourcegraph-provided models, accessible through the [Cody Gateway](/cody/core-concepts/cody-gateway), are managed via your site configuration. +Sourcegraph-provided models, accessible through the [Sourcegraph Model Provider (Cody Gateway)](/model-provider), are managed via your site configuration. -For most administrators, relying on these models alone ensures access to high-quality models without needing to manage specific configurations. +For most administrators, relying on these models alone ensures access to high-quality models without needing to manage specific configurations. See [Supported LLMs](/cody/capabilities/supported-models) for the full list of available models. The use of these models is controlled through the `"modelConfiguration.sourcegraph"` field in the site config. @@ -190,7 +190,7 @@ Sourcegraph natively supports several types of LLM API providers. The current se | **Provider type** | **Description** | | -------------------- | ---------------------------------------------------------------------------------------------------------- | -| `"sourcegraph"` | [Cody Gateway](/cody/core-concepts/cody-gateway), offering access to various models from multiple services | +| `"sourcegraph"` | [Sourcegraph Model Provider (Cody Gateway)](/model-provider), offering access to various models from multiple services | | `"openaicompatible"` | Any OpenAI-compatible API implementation | | `"awsBedrock"` | [Amazon Bedrock](https://docs.aws.amazon.com/bedrock/) | | `"azureOpenAI"` | [Microsoft Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service/) | diff --git a/docs/cody/faq.mdx b/docs/cody/faq.mdx index ef3259aa1..32044c51a 100644 --- a/docs/cody/faq.mdx +++ b/docs/cody/faq.mdx @@ -106,13 +106,13 @@ Sourcegraph does not use models hosted by DeepSeek (the company), and does not s ### What is the default `sourcegraph` provider for completions? -The default provider for completions, specified as `"provider": "sourcegraph"` refers to the [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway). The Cody Gateway facilitates access to completions for Sourcegraph enterprise instances by leveraging third-party services such as Anthropic and OpenAI. +The default provider for completions, specified as `"provider": "sourcegraph"` refers to the [Sourcegraph Model Provider (Cody Gateway)](/model-provider). The Sourcegraph Model Provider facilitates access to completions for Sourcegraph enterprise instances by leveraging third-party services such as Anthropic and OpenAI. ### What third-party cloud services does Cody depend on? Cody relies on one primary third-party dependency, i.e., Anthropic's Claude API. Users can use this with the OpenAI API configuration. -It's worth noting that these dependencies remain consistent when utilizing the [default `sourcegraph` provider, Cody Gateway](/cody/core-concepts/cody-gateway), which uses the same third-party providers. +It's worth noting that these dependencies remain consistent when utilizing the [default `sourcegraph` provider, Sourcegraph Model Provider (Cody Gateway)](/model-provider), which uses the same third-party providers. ### What is the retention policy for Anthropic and OpenAI? diff --git a/docs/model-provider/index.mdx b/docs/model-provider/index.mdx new file mode 100644 index 000000000..97195729e --- /dev/null +++ b/docs/model-provider/index.mdx @@ -0,0 +1,45 @@ +# Sourcegraph Model Provider + +

Learn how the default Sourcegraph LLM model provider enables AI features for Sourcegraph Enterprise customers.

+ +The Sourcegraph Model Provider is the default and recommended way to configure AI features like [Deep Search](/deep-search) and [Cody](/cody). Through this service, we provide zero-configuration access to state-of-the-art models from various LLM providers, including [Anthropic](https://www.anthropic.com/) and [OpenAI](https://openai.com/), with enterprise-grade [privacy and security](#privacy-and-security). + +The Sourcegraph Model Provider is also referred to as "Cody Gateway". + +## Using the Sourcegraph Model Provider + +If you are a [Sourcegraph Cloud](/cloud/) customer, the Sourcegraph Model Provider is automatically configured by default. Other customers can verify their Enterprise subscription has access by confirming with their account manager. + +To enable inference provided by the Sourcegraph Model Provider on your Sourcegraph Enterprise instance, all you need to do is ensure your license key and your model provider is set to `"sourcegraph"` in your [site configuration](/admin/config/site_config): + +```jsonc +{ + "licenseKey": "<...>", + // Optional: Once the license key is added, default configuration and + // authentication are automatically applied. + "modelConfiguration": { + "sourcegraph": {} + } +} +``` + +This feature is backed by a service hosted at `cody-gateway.sourcegraph.com`. To use the Sourcegraph Model Provider, your Sourcegraph instance must be allowed to connect to the service at this domain. + +After setting up model configuration, you may need to take additional steps to enable [Deep Search](/deep-search) or [Cody](/cody). + +## Rate limits and quotas + +Rate limits and quotas are tied to your Sourcegraph Enterprise license for Sourcegraph Enterprise instances. All successful LLM requests will count toward your rate limits. Unsuccessful requests are not counted as usage. + +In addition to the above, we may throttle concurrent requests per Sourcegraph Enterprise subscription to prevent excessive burst consumption. + +You can reach out for more details about if Sourcegraph Model Provider access available to you and how you can gain access to higher rate limits, quotas, and/or model options. + +## Privacy and security + +Sourcegraph's [Enterprise AI Terms of Use](https://sourcegraph.com/terms/ai-terms) apply to all usage of the Sourcegraph Model Provider: + +- Input and output ownership: You own all inputs (queries) and outputs (generated code/text) from AI features +- Zero retention by LLM partners: Partner LLMs do not retain any input or output data beyond the time needed to generate responses. Your enterprise code is not used to train LLM models unless you explicitly enable finetuning features. +- Data collection: Customer content (inputs, outputs, context) is collected solely to provide the service, not for product improvement. Only rate limit consumption and high-level diagnostic data (error codes, numeric parameters) are tracked +- Security: All data is processed according to Sourcegraph's [Security Exhibit](https://sourcegraph.com/terms/security-exhibit) diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 5cb2125f8..a3e0d132a 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -177,7 +177,7 @@ export const navigation: NavigationItem[] = [ href: '/cody/enterprise/model-configuration' }, { - title: 'modelConfiguration examples', + title: 'Model Configuration examples', href: '/cody/enterprise/model-config-examples' } ] @@ -242,8 +242,8 @@ export const navigation: NavigationItem[] = [ href: '/cody/prompts-guide' }, { - title: 'Cody Gateway', - href: '/cody/core-concepts/cody-gateway' + title: 'Sourcegraph Model Provider', + href: '/model-provider' }, { title: 'Enterprise Architecture', @@ -468,7 +468,11 @@ export const navigation: NavigationItem[] = [ ] }, { - title: 'Enterprise self-hosted', + title: 'Sourcegraph Cloud', + href: '/cloud' + }, + { + title: 'Enterprise Self-Hosted', href: '/admin/self-hosted', sections: [ { title: 'Deploy', href: '/admin/deploy' }, @@ -490,8 +494,8 @@ export const navigation: NavigationItem[] = [ ] }, { - title: 'Sourcegraph Cloud', - href: '/cloud' + title: 'Sourcegraph Model Provider', + href: '/model-provider' }, { title: 'Integrations', diff --git a/src/data/redirects.ts b/src/data/redirects.ts index 890d1a02c..e21bbd675 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -6933,6 +6933,16 @@ const redirectsData = [ destination: '/admin/service_accounts', permanent: true }, + { + source: '/cody/core-concepts/cody-gateway', + destination: '/model-provider', + permanent: true + }, + { + source: '/cody/core-concepts/enterprise-architecture', + destination: '/admin/architecture#cody', + permanent: true + }, ]; const updatedRedirectsData = redirectsData.map(redirect => {