diff --git a/public/llms.txt b/public/llms.txt index 0415bf063..d585c8459 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -13,6 +13,9 @@ Currently supported versions of Sourcegraph: | **Release** | **General Availability Date** | **Supported** | **Release Notes** | **Install** | |--------------|-------------------------------|---------------|--------------------------------------------------------------------|------------------------------------------------------| +| 6.5 Patch 2 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v652654) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.5 Patch 1 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v651211) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.5 Patch 0 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v650) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.4 Patch 3 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v643889) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.4 Patch 2 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v642622) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.4 Patch 1 | June 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v641203) | [Install](https://sourcegraph.com/docs/admin/deploy) | @@ -98,6 +101,8 @@ These versions fall outside the release lifecycle and are not supported anymore: + - [6.5](https://6.5.sourcegraph.com) + - [6.4](https://6.4.sourcegraph.com) - [6.3](https://6.3.sourcegraph.com) - [6.2](https://6.2.sourcegraph.com) - [6.1](https://6.1.sourcegraph.com) @@ -164,21 +169,14 @@ These versions fall outside the release lifecycle and are not supported anymore: Sourcegraph is a Code Intelligence platform that deeply understands your code, no matter how large or where it’s hosted, to power modern developer experiences. -- **Cody**: Use Cody our AI code assistant to read, write, and understand your entire codebase faster -- **Code search:** Search through all of your repositories across all branches and all code hosts -- **Code intelligence:** Navigate code, find references, see code owners, trace history, and more -- **Fix & refactor:** Roll out and track large-scale changes and migrations across repos at once +- **Code Search:** Search through all of your repositories across all branches and all code hosts +- **Code Intelligence:** Navigate code, find references, see code owners, trace history, and more +- **Fix and Refactor:** Roll out and track large-scale changes and migrations across repos at once +- **AI Assistant:** Use Cody our AI code assistant to read, write, and understand your entire codebase faster ## Quickstart - + -Users who had attempted to create an account but never verified their primary emails on Sourcegraph.com were not migrated. - - ### How to change, set or reset passwords? 1. Make sure to stay signed out on https://accounts.sourcegraph.com. @@ -373,7 +370,7 @@ While we always strive to respond to your issues as quickly as possible, our SLA The following policy applies to both our cloud-based (managed instance) and on-premise/self-hosted Sourcegraph customers: -## For enterprise plans +## For Sourcegraph Enterprise & Amp Enterprise Premium plans | Severity level | Description | Response time | Support availability | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -------------------- | @@ -385,7 +382,7 @@ The following policy applies to both our cloud-based (managed instance) and on-p >NOTE: Premium support with enhanced SLAs can be added to your Enterprise plans as an add-on. Our business hours, defined as Sunday 2 PM PST to Friday 5 PM PST, align with our 24x5 support coverage. -### For Enterprise Starter & Cody Pro plans +### All other paid plans | **Severity level** | **Description** | **Response time** | **Support availability** | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | -------------------- | @@ -499,44 +496,42 @@ Slack Support provides access to creating tickets directly from Slack, allowing

This page lists a detailed comparison of the features available in each plan.

-| **Features** | **Free** | **Enterprise Starter** | **Enterprise** | -| -------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| **AI** | | | | -| Autocomplete | Unlimited | Unlimited | Unlimited | -| Chat messages and prompts | 200/month | Increased limits | Unlimited | -| Code context and personalization | Local codebase | Remote codebase (GitHub only) | Remote, enterprise-scale codebases | -| Integrated search results | - | ✓ | ✓ | -| Prompt Library | ✓ | ✓ | ✓ | -| Bring your own LLM Key | - | - | Self-Hosted only | -| Auto-edit | - | Beta | Beta | -| Aentic chat experience | - | Experimental | Experimental | -| **Code Search** | | | | -| Code Search | - | ✓ | ✓ | -| Code Navigation | - | ✓ | ✓ | -| Code Insights | - | - | ✓ | -| Code Monitoring | - | - | ✓ | -| Batch Changes | - | - | ✓ | -| **Deployment** | | | | -| Cloud deployment | Multi-tenant | Multi-tenant | Single tenant | -| Self hosted option | - | - | ✓ | -| Private workspace | - | ✓ | ✓ | -| **Admin and Security** | | | | -| SSO/SAML | Basic (GH/GL/Google) | Basic (GH/GL/Google) | ✓ | -| Role-based access control | - | - | ✓ | -| Analytics | - | Basic | ✓ | -| Audit logs | - | - | ✓ | -| Guardrails | - | - | Beta | -| Indexed code | - | Private | Private | -| Context Filters | - | - | ✓ | -| **Compatibility** | | | | -| Code hosts | Local codebase | GitHub | All major codehosts | -| IDEs | VS Code, JetBrains IDEs, Visual Studio (Experimental) | VS Code, JetBrains IDEs, Visual Studio (Experimental) | VS Code, JetBrains IDEs, Visual Studio (Experimental) | -| Human languages | Many human languages, dependent on the LLM used | Many human languages, dependent on the LLM used | Many human languages, dependent on the LLM used | -| Programming languages | All popular programming languages | All popular programming languages | All popular programming languages | -| **Support** | | | | -| Support level | Community support | Community support | Enterprise support | -| Dedicated TA support | - | - | Add-on | -| Premium support | - | - | Add-on | +| **Features** | **Free** | **Enterprise Starter** | **Enterprise** | +| -------------------------------- | --------------------------------- | --------------------------------- | ----------------------------------------------------- | +| **AI** | | | | +| Autocomplete | N/A | N/A | Unlimited | +| Chat messages and prompts | N/A | N/A | Unlimited | +| Code context and personalization | N/A | N/A | Remote, enterprise-scale codebases | +| Prompt Library | N/A | N/A | ✓ | +| Bring your own LLM Key | N/A | N/A | Self-Hosted only | +| Auto-edit | N/A | N/A | ✓ | +| Aentic chat experience | N/A | N/A | ✓ | +| **Code Search** | | | | +| Code Search | Public Code | ✓ | ✓ | +| Code Navigation | - | ✓ | ✓ | +| Code Insights | - | - | ✓ | +| Code Monitoring | - | - | ✓ | +| Batch Changes | - | - | ✓ | +| **Deployment** | | | | +| Cloud deployment | Multi-tenant | Multi-tenant | Single tenant | +| Self hosted option | - | - | ✓ | +| Private workspace | - | ✓ | ✓ | +| **Admin and Security** | | | | +| SSO/SAML | Basic (GH/GL/Google) | Basic (GH/GL/Google) | ✓ | +| Role-based access control | - | - | ✓ | +| Analytics | - | Basic | ✓ | +| Audit logs | - | - | ✓ | +| Guardrails | - | - | Beta | +| Indexed code | - | Private | Private | +| Context Filters | - | - | ✓ | +| **Compatibility** | | | | +| Code hosts | Local codebase | GitHub | All major codehosts | +| IDEs | N/A | N/A | VS Code, JetBrains IDEs, Visual Studio (Experimental) | +| Programming languages | All popular programming languages | All popular programming languages | All popular programming languages | +| **Support** | | | | +| Support level | Community support | Community support | Enterprise support | +| Dedicated TA support | - | - | Add-on | +| Premium support | - | - | Add-on |
@@ -547,55 +542,33 @@ Slack Support provides access to creating tickets directly from Slack, allowing ## What's the difference between Free, Enterprise Starter, and Enterprise plans? -Free is best for individuals working on hobby projects. +Free is best for individuals working on hobby projects with public code search. -Enterprise Starter is for growing organizations who want Sourcegraph's AI & search experience hosted on our cloud. +Enterprise Starter is for growing organizations who want Sourcegraph's search experience hosted on our cloud. Enterprise is for organizations that want AI and search across the SDLC with enterprise-level security, scalability, and flexible deployment. -## How are autocompletions counted for the Cody Free plan? - -Cody autocompletions are counted based on the number of suggestions served to the user in their IDE as ghost text. This includes all suggestions on whether or not the user accepts them. - -## How does Sourcegraph's context and personalization work? - -Cody can retrieve codebase context to personalize responses in several ways. For Free and Pro users, context is retrieved from their local repositories. - -The Enterprise Starter and Enterprise plans use Sourcegraph's search backend to retrieve context. This method pulls context from a team's full codebase at any scale. - ## What forms of support are available for paid plans? Email and web portal support is available to both Enterprise Starter and Enterprise customers, and you can [read more about our SLAs](/sla). Premium support with enhanced SLAs is also available as an add-on for Enterprise customers. ## Can I upgrade or downgrade my plan? -Users can upgrade or downgrade between Free and Pro within their account settings anytime. For Pro users, upgrading to Enterprise Starter is also possible, but doing so currently does not cancel your subscription, and you must cancel it yourself. - To upgrade to Enterprise, please [contact our Sales team](https://sourcegraph.com/contact/request-info). ## What's the difference between "flexible LLM options" and "bring your own LLM key"? -Flexible LLM options: Users can select from multiple options to use for chat. +Flexible LLM options: Enterprise users with Cody enabled can select from multiple options to use for chat. Bring your own LLM key: Enterprise customers can optionally provide their own LLM API key for supported LLMs (including for LLM services such as Azure OpenAI and Amazon Bedrock). In this scenario, customers pay for their own LLM consumption, and we will provide a pricing discount with your plan. ## Does Sourcegraph use my code to improve the models used by other people? -For Enterprise and Enterprise Starter customers, Sourcegraph will not train on your company's data unless your instance admin enables fine-tuning, which would customize an existing model exclusively for your use. - -For Free and Pro users, Sourcegraph may use your data to fine-tune the model you are accessing unless you disable this feature. - -## Can Sourcegraph be run fully self-hosted? - -Sourcegraph requires cloud-based services to power its AI features. For customers looking for a fully self-hosted or air-gapped solution, please [contact us](https://sourcegraph.com/contact/request-info). - -## Is an annual contract required for any of the plans? - -Pro and Enterprise Starter plans are billed monthly and can be paid with a credit card. +For Enterprise customers, Sourcegraph will not train on your company's data unless your instance admin enables fine-tuning, which would customize an existing model exclusively for your use. ## How are active users counted and billed for Cody? -This only applies to Cody Enterprise contracts. Cody Pro and Enterprise Starter users pay for a seat every month, regardless of usage. +This only applies to Cody Enterprise contracts. ‍A billable user is one who is signed in to their Enterprise account and actively interacts with the product (e.g., they see suggested autocompletions, run commands or chat with Cody, start new discussions, clear chat history, or copy text from chats, change settings, and more). Simply having Cody installed is not enough to be considered a billable user. @@ -632,7 +605,7 @@ The Enterprise Starter plan is currently compatible with GitHub. Its limit for i ## What are the limits of the Enterprise starter plan? -The Enterprise Starter plan supports up to 50 developers and, alongside a limit of 100 repositories for search and context, also includes 5Gb of storage. Adding additional seats gives you 1GB of additional storage per seat, for a maximum total of 10GB. +The Enterprise Starter plan supports up to 50 developers and, alongside a limit of 100 repositories for search and context, also includes 5GB of storage. Adding additional seats gives you 1GB of additional storage per seat, for a maximum total of 10GB. ## Billing FAQs for Enterprise Starter @@ -684,21 +657,11 @@ We don't offer refunds, but if you have any queries regarding the Enterprise Sta

Learn about the Sourcegraph's Free plan and the features included.

-Sourcegraph's Free plan is designed for hobbyists, and light usage is aimed at users with personal projects and small-scale applications. It offers an AI editor assistant with a generous set of features for individual users, like autocompletion and multiple LLM choices for chat. - -## Features - -The Free plan includes the following features: - -| **AI features** | **Compatibility** | **Deployment** | **Admin/Security** | **Support** | -| ----------------------------------------------------------------------------- | --------------------------------------------------- | ------------------ | ------------------------------------------ | ---------------------- | -| Reasonable use autocomplete limits | VS Code, JetBrains IDEs, and Visual Studio | Multi-tenant Cloud | SSO/SAML with basic GitHub, GitLab, Google | Community support only | -| Reasonable use chat messages and prompts per month | All popular coding languages | - | - | - | -| Multiple LLM selection (Claude 3.5 Sonnet, Gemini 1.5 Pro and Flash) | Natural language search | - | - | - | +Sourcegraph's Free plan is designed for hobbyists, and light usage is aimed at users with personal projects and small-scale applications. ## Pricing and billing cycle -There is no billing cycle, as it's free to use and supports one user per account. If you exceed your daily limits, you will have to wait until the end of the month to use the feature again. You can upgrade to our Enterprise Starter plan for more advanced features and usage limits. +There is no billing cycle, as it's free to use and supports one user per account. You can upgrade to our Enterprise Starter plan for more advanced features. ## Free vs. Enterprise Starter comparison @@ -706,12 +669,11 @@ The Enterprise Starter plan provides extended usage limits and advanced features | **Feature** | **Free** | **Enterprise Starter** | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Description** | - AI editor assistant for hobbyists or light usage | - AI and search for growing organizations hosted on our cloud | +| **Description** | - Public Code Search for hobbyists or light usage | - Code Search for growing organizations hosted on our cloud | | **Price** | - $0/month
- 1 user | - $19/user/month
- Up to 50 devs | -| **AI features** | - Autocompletions
- 200 chat messages and prompts per month
- Multiple LLM choices for chat | - Code autocomplete and chat
- More powerful LLMs for chat (GPT-4o, Claude 3 Opus)
- Integrated search results | | **Code Search features** | N/A | - Code Search
- Symbol Search | | **Deployment types** | - Multi-tenant Coud | - Multi-tenant Cloud
- Private Workspace
- Privately indexed code (100 repos) | -| **Compatibility** | - VS Code, JetBrains IDEs, and Visual Studio
- All popular coding languages
Natural language search
- All major code hosts | - VS Code, JetBrains IDEs, and Visual Studio
- All popular coding languages
Natural language search
- Code hosted on GitHub | +| **Compatibility** | - All popular coding languages
Natural language search
- All major code hosts | - All popular coding languages
Natural language search
- Code hosted on GitHub | | **Support** | - Community support only | - 9x5 Support | ## Moving to Enterprise Starter plan @@ -727,7 +689,7 @@ Click the **Create workspace** button to navigate to the payment page. Here, you

Learn about the Sourcegraph's Enterprise plan and the features included.

-Sourcegraph offers multiple Enterprise plan options, including Enterprise Dedicated Cloud (default) and Enterprise Self Hosted (on-request) for organizations and enterprises that need AI and search with enterprise-level security, scalability, and flexibility. +Sourcegraph offers multiple Enterprise plan options, including Enterprise Dedicated Cloud (default) and Enterprise Self Hosted (on-request) for organizations and enterprises that need search with enterprise-level security, scalability, and flexibility. ## Features breakdown @@ -735,9 +697,9 @@ Here's a detailed breakdown of features included in the different Enterprise pla | **Feature** | **Enterprise Dedicated Cloud** | **Enterprise Self Hosted** | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Description** | - AI and search with enterprise-level security, scalability, and flexibility | - AI and search with enterprise-level security, scalability, and flexibility | +| **Description** | - Search with enterprise-level security, scalability, and flexibility | - Search with enterprise-level security, scalability, and flexibility | | **Price** | - $59/user/month
- 25+ devs | - $59/user/month
- Contact Sales | -| **AI features** | - Everything in Enterprise Starter | - Everything in Enterprise Starter
- Bring your own LLM key | +| **AI features** | - Cody AI Assistant | - Cody AI Assistant
- Bring your own LLM key | | **Code Search features** | - Everything in Enterprise Starter, plus:
- Batch Changes
- Code Insights
- Code Navigation | - Everything in Enterprise Starter, plus:
- Batch Changes
- Code Insights
- Code Navigation | | **Deployment types** | - Single-tenant Coud | - Self- Hosted | | **Compatibility** | - Everything in Enterprise Starter, plus:
- Enterprise admin and security features
- All major code hosts
- Guardrails
- Context Filters | - Everything in Enterprise Starter, plus:
- Enterprise admin and security features
- All major code hosts
- Guardrails
- Context Filters | @@ -750,11 +712,11 @@ Here's a detailed breakdown of features included in the different Enterprise pla

Learn about the Enterprise Starter plan tailored for individuals and teams wanting private code indexing and search to leverage the Sourcegraph platform better.

-The Enterprise Starter plan offers a multi-tenant Sourcegraph instance designed for individuals and teams. It provides the core features of a traditional Sourcegraph instance but with a simplified management experience. This plan provides a fully managed version of Sourcegraph (AI + code search with integrated search results, with privately indexed code) through a self-serve flow. +The Enterprise Starter plan offers a multi-tenant Sourcegraph instance designed for individuals and teams. It provides the core features of a traditional Sourcegraph instance but with a simplified management experience. This plan provides a fully managed version of Sourcegraph through a self-serve flow. ## Team seats -The Enterprise Starter plan is priced at **$19 per month per seat**. You can add or remove team members at any time. Existing Cody Pro users can also sign up for the Enterprise Starter by paying $19 per seat. However, their Cody Pro subscription will neither be upgraded nor canceled. Instead, they will have two live subscriptions. +The Enterprise Starter plan is priced at **$19 per month per seat**. You can add or remove team members at any time. ## Enterprise Starter team roles @@ -773,14 +735,13 @@ Please also see [FAQs](faqs.mdx) for more FAQs, including how to downgrade Enter ## Features supported -The Enterprise Starter plan supports a variety of AI and search-based features like: +The Enterprise Starter plan supports a variety of search-based features like: -| **AI features** | **Code Search** | **Management** | **Support** | -| -------------------------------------- | ------------------------------ | --------------------------------------------------------- | ------------------------- | -| Code autocompletions and chat messages | Indexed Code Search | Simplified admin experience with UI-based repo-management | Support with limited SLAs | -| Powerful LLM models for chat | Indexed Symbol Search | User management | - | -| Integrated search results | Searched based code-navigation | GitHub code host integration | - | -| Cody integration | - | - | - | +| **Code Search** | **Management** | **Support** | +| ------------------------------ | --------------------------------------------------------- | ------------------------- | +| Indexed Code Search | Simplified admin experience with UI‑based repo‑management | Support with limited SLAs | +| Indexed Symbol Search | User management | - | +| Searched‑based code‑navigation | GitHub code host integration | - | ## Limits @@ -3455,6 +3416,41 @@ Please report any other issues and feature requests [here](https://help.sourcegr + +# Sourcegraph Enterprise Portal + +Sourcegraph Enterprise Portal is a tool for viewing your enterprise subscription and managing user access to Sourcegraph operated services. + + + + + +## Accessing Sourcegraph Enterprise Portal + +A [Sourcegraph Account](/sourcegraph-accounts) is required to access Sourcegraph Enterprise Portal. To manage a subscription a user must be added as a **Subscription admin** for the subscription. + +![Sourcegraph Enterprise Portal subscription](https://storage.googleapis.com/sourcegraph-assets/Docs/enterprise-portal-manage.png) + + +## Subscription admin management + +A subscription admin is a user with full access to the subscription in Enterprise Portal. Subscription admins can grant and revoke admin access to other users. + +![Sourcegraph Enterprise Portal admin management](https://storage.googleapis.com/sourcegraph-assets/Docs/enterprise-portal-admins.png) + +Users can be invited individually or in bulk. If there is no [Sourcegraph Account](/sourcegraph-accounts) associated with an invited user's email address an account will be created for them. Newly created users are sent an email with instructions to reset their password to access Enterprise Portal. + + +## Services + +### Sourcegraph Analytics access + +Subscription admins can view [Sourcegraph Analytics](/analytics) for the subscription. + +![Sourcegraph Enterprise Portal analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/enterprise-portal-analytics.png) + + + # Indexing the OSS universe @@ -3487,163 +3483,72 @@ To use Sourcegraph on your own (private) code, [use Sourcegraph Cloud](/cloud/) - -# Cody Pricing Plans - -

Learn about the different plans available for Cody.

- -Cody provides three subscription plans: **Free**, **Pro**, and **Enterprise**. Each plan is aimed to cater to a diverse range of users, from individual projects to large-scale enterprises. Cody Free includes basic features, while the Pro and Enterprise plans offer additional advanced features and resources to meet varying user requirements. - - - - -The free plan is designed for individuals to get started with Cody. It comes with a set of features to enhance your coding experience. It includes **unlimited autocompletion suggestions** per month, covering both whole and multi-line suggestions. You also get **200 chats/prompts** per month with access to creating custom prompts. - -The free plan provides access to local context to enhance Cody's understanding of your code and ability to provide accurate suggestions. Local context uses keyword search to search the local repository (the one currently open in your IDE). - -Cody Free uses the DeepSeek-Coder-V2 model for autocomplete. It uses the Claude 3.5 Sonnet (New) model for chat and prompts, and users have several other model options they can switch to. See [Supported LLMs](https://sourcegraph.com/docs/cody/capabilities/supported-models) for more information. - -### Billing cycle - -There is no billing cycle for Cody Free, as it is free to use. If you complete your monthly chat/prompts limit, you'll be prompted to upgrade to the Pro plan. Otherwise, you'll have to wait approximately 30 days for the limits to reset. - -The reset date is based on your sign-up date. For example, if you sign up on December 15th, your limit will reset on January 15th. - -### Upgrading from Free to Pro - -![upgrade-cody-pro](https://storage.googleapis.com/sourcegraph-assets/Docs/upgrade-cody-pro.png) - -To upgrade from Cody Free to Pro: - -- Log in to your [Cody dashboard](https://sourcegraph.com/cody/manage) -- Click the **Upgrade** button in the top right corner -- It takes you to the [Subscription plans](https://sourcegraph.com/cody/subscription) page -- Under the Pro tier, click **Get Pro** -- Enter your card details for billing -- Click confirm and upgrade to Cody Pro for **$9 per month** - -Once your Pro subscription is confirmed, click **My subscription** to manage and view your activation details, or click **Dashboard** for the overall view. - - - - - -Cody Pro, designed for individuals or small teams at **$9 per user per month**, offers an enhanced coding experience beyond the free plan. It provides unlimited autocompletion suggestions plus increased limits for chat and prompts. It also uses local repository context to enhance Cody's understanding and accuracy. - -Cody Pro uses DeepSeek-Coder-V2 by default for autocomplete. Pro accounts also default to the Claude 3.5 Sonnet (New) model for chat and prompts, but users can switch to other LLM model choices. You can refer to the [supported LLM models](/cody/capabilities/supported-models) docs for more information. - -Support for Cody Pro is available through our Support team via support@sourcegraph.com, ensuring prompt assistance and guidance. - -### Downgrading from Pro to Free - -To revert back to Cody Free from Pro: - -- Go to your Sourcegraph dashboard **Cody > Dashboard** -- Next, **Manage subscription** that takes you to **Cody > Subscription** -- Clicks **Cancel** on the Pro tier to cancel your Pro subscription -- This automatically downgrades you to Cody Free once after your billing cycle ends - -### Upgrading from Pro to Enterprise - -To upgrade from Cody Pro to Cody Enterprise, you should [Contact Sales](https://sourcegraph.com/contact/request-info) and connect with one of our account teams. They will help you set up your account and start with Cody Enterprise. - -## Billing FAQs for Cody Pro - -### What is Cody's pricing plan? - -You can get this info from our [pricing page](https://sourcegraph.com/pricing?product=cody). - -### When are payments taken? - -We charge payments at the beginning of each billing cycle, and they get automatically renewed once you've added your credit card details. - -### What is a billing cycle? - -The billing cycle refers to the start date you start your Cody Pro plan. Your Cody Pro plan will automatically renew at each billing date. You can view your current and previous billing cycles from the **My subscription** tab. - -### What payment methods are available? - -We currently only support payments through a credit card. - -### What happens when I cannot pay or don't want to renew the Pro plan? - -If you do not want to renew Cody Pro, you can cancel your Cody Pro subscription at any time by going to the [accounts page](https://accounts.sourcegraph.com/cody/subscription). If you cancel the Pro plan, your Cody Pro will continue until the end of the billing cycle. Once the billing cycle ends, your plan will not renew, and your card will not be charged. This automatically downgrades your plan from Cody Pro to Cody Free. - -If you change your mind after canceling your plan please contact our Support team at support@sourcegraph.com and we can help you get re-subscribed. - -### Are there any refunds for the Pro subscription? + +# Deep Search -We don't offer refunds, but if you have any queries regarding the Cody Pro plan, please write to support@sourcegraph.com, and we'll help resolve the issue. +

Learn more about Sourcegraph's agentic Code Search tool Deep Search.

-### How do I access previous invoices? + New in version 6.5. Deep Search is currently in research preview for Enterprise and Enterprise Starter customers. It's not supported for BYOK users. Because Deep Search is in research preview, it might change significantly as we improve and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. -You can access your invoices via the [Cody Dashboard](https://sourcegraph.com/cody/manage) and clicking "Manage Subscription". Note that invoices are not emailed every month. +Deep Search is an agentic code search tool that understands natural language questions about your codebase. When a question is submitted, Deep Search performs an in-depth search and returns a detailed answer. The conversation can be continued with follow-up questions to dive deeper into relevant code. -## Enterprise Starter +Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. The tools are functionalities available in Sourcegraph. They include multiple modes of Sourcegraph's Code Search and Code Navigation features. All processing happens within your Sourcegraph instance. Only external calls are made to the configured LLM. -Cody Pro users can also switch to the Enterprise Starter plan for **$19 per user per month**. This plan includes all the features of Cody Pro plus a multi-tenant Sourcegraph instance with core features like a fully managed version of Sourcegraph (AI + code search + intent detection with integrated search results, with privately indexed code) through a self-serve flow. +The core of Deep Search is an agentic loop. The AI agent can intelligently use tools to explore the codebase. In each loop iteration, the agent gradually refines its understanding of the question and codebase, searching until it is confident in its answer. -Read more about the [Enterprise Starter plan](/pricing/enterprise-starter). +Every Deep Search response includes a detailed list of sources contributing to the answer. These sources show exactly which searches were performed and which files were read. The list of sources is extremely useful for understanding where the answer came from and for further explorations of the codebase. -
+The answer is formatted in Markdown and can include links to relevant files, directories, or repositories. If prompted to do so, Deep Search can also generate diagrams as part of its answer. - - -Cody Enterprise is designed for enterprises prioritizing security and administrative controls. We offer either seat-based or token based pricing models, depending on what makes most sense for your organization. You get Claude Haiku 3.5 and Claude Sonnet 3.5 as the default LLM models without extra cost. You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. +## Best practices -Security features include SAML/SSO for enhanced authentication and guardrails to enforce coding standards. Cody Enterprise supports advanced Code Graph context and multi-code host context for a deeper understanding of codebases, especially in complex projects. With 24/5 enhanced support, Cody Enterprise ensures timely assistance. +- Give the agent a starting point for the search: use @-mentions to mention relevant repositories, files, directories, or symbol names. The more specific you are, the faster the search will be. +- Provide reasonably scoped questions. The agent will perform much better if it does not have to read the entire codebase at once. +- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. Ask a follow-up question and mention the missing source if something is missing. -## Billing FAQs for Cody Enterprise +For use cases where you're looking for exhaustive answers (for example, "Find all files with the `.XYZ` file extension in `foo' repo that contain the word`bar`), Code Search still excels, while Deep Search will only utilize a sample of the results. Deep Search will perform a Code Search query as a source, which you can use to continue an exhaustive search within the Code Search product. -### How are active users calculated for Cody? +### Examples of prompts -### Billable active users +- Find examples of logger usage and show examples of the different types of logging we use. +- I want to know when the indexing queue functionality was last changed in `@zoekt`. Show me the last few commit diffs touching this code and explain the changes. +- Look at the GraphQL APIs available in `@sourcegraph/sourcegraph`. Are any of them unused? The client code is in the `@cody` repository. +- Which tools do we use in our build processes defined in `BUILD.bazel` files? +- Generate a request flow diagram for `src/backend`. Mark the auth and rate limit points. -This only applies to Enterprise Cody users. Cody Pro users pay for a seat every month, regardless of usage. +## Conversation sharing -A billable active Cody user is signed in to their Enterprise Sourcegraph account and actively interacts with Cody (for example, they see suggested autocompletions, run commands, or chat with Cody, they start new discussions, clear chat history, or copy text from chats. They change Cody's settings and more). +Conversation sharing is disabled by default - see below for instructions on enabling it. -Having Cody installed and signing in is not enough to be considered a billable user. +Starting from Sourcegraph version 6.5, you can share Deep Search conversations with other users in your Sourcegraph instance. To share a conversation, click the "Share" button in the top left, then copy the link. Once you share a conversation, any user on your instance can view it with the link. You can also reset the share link and generate a new one, invalidating the previous link. -Specific categories of user actions that qualify as active Cody usage for billing include, but are not limited to: +We do not enforce [repository permissions](/admin/permissions) for viewing shared Deep Search conversations. This means that a user can view a conversation shared with them, regardless of which repositories they can access. We plan to revisit this in the future. -- Signing in to Cody in an editor -- Seeing suggested autocompletions and/or accepting/rejecting them -- Running commands or chatting with Cody -- Starting new chats, clearing chat history, copying text from chats or otherwise interacting with the Cody chat interface in the editor or on the web -- Adding or changing context in a Cody chat interface or changing models -- Interacting with Cody tutorials -- Changing Cody personal or team settings +## Enabling Deep Search -### Authenticated users +If Deep Search is disabled, ask your site administrator to enable the following setting in your site configuration: +```json +"experimentalFeatures": { + "deepSearch.enabled": true, +}, +``` -An authenticated Cody user is authenticated (or signed in) to Cody in their editor within a given time period. This includes all users who interact with Cody on the web. +For optimal performance, Deep Search is specialized only to use one model (Claude Sonnet 4). -Authenticated users are a superset of [billable users](#billable-active-users) defined above. They include users who are signed in but do not actively engage with Cody. +### Enabling conversation sharing - +Conversation sharing is disabled by default. To enable conversation sharing, ask your site administrator to enable the following setting in your site configuration: -
- -## Plans Comparison +```json +"experimentalFeatures": { + "deepSearch.enabled": true, + "deepSearch.sharing.enabled": true, +}, +``` -The following table shows a high-level comparison of the three plans available on Cody. -| **Features** | **Free** | **Pro** | **Enterprise Starter** | **Enterprise** | -| --------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| **Autocompletion suggestions** | Unlimited | Unlimited | Unlimited | Unlimited | -| **Chat Executions** | 200 per month | Increased limits | Increased limits | Unlimited | -| **Keyword Context (local code)** | Supported | Supported | Supported | Supported | -| **Developer Limitations** | 1 developer | 1 developer | Scalable, per-seat pricing | Scalable, consumption-based pricing | -| **LLM Support** | [View latest](/cody/capabilities/supported-models) | [View latest](/cody/capabilities/supported-models) | [View latest](/cody/capabilities/supported-models) | [View latest](/cody/capabilities/supported-models) | -| **Code Editor Support** | VS Code, JetBrains IDEs, Visual Studio (Preview) | VS Code, JetBrains IDEs, Visual Studio (Preview) | VS Code, JetBrains IDEs, Visual Studio (Preview) | VS Code, JetBrains IDEs, Visual Studio (Preview) | -| **Single-Tenant and Self Hosted** | N/A | N/A | N/A | Yes | -| **SAML/SSO** | N/A | N/A | N/A | Yes | -| **Guardrails** | N/A | N/A | N/A | Yes | -| **Advanced Code Graph Context** | N/A | N/A | N/A | Included | -| **Multi-Code Host Context** | N/A | N/A | GitHub only | Included | -| **Discord Support** | Yes | Yes | Yes | Yes | -| **24/5 Enhanced Support** | N/A | N/A | Yes | Yes | +### Custom model configuration and BYOK (Bring Your Own Key) +Deep Search is only available to customers using Sourcegraph’s built-in model gateway. Customers who configure and access their own models via BYOK cannot use the Deep Search feature.
@@ -3652,7 +3557,7 @@ The following table shows a high-level comparison of the three plans available o

Learn about common reasons for errors that you might run into when using Cody and how to troubleshoot them.

-If you encounter errors or bugs while using Cody, try applying these troubleshooting methods to understand and configure the issue better. If the problem persists, you can report Cody bugs using the [issue tracker](https://github.com/sourcegraph/cody/issues), by using the [Support Forum](https://community.sourcegraph.com/), or by asking in the [Discord](https://discord.gg/s2qDtYGnAE) server. +If you encounter errors or bugs while using Cody, try applying these troubleshooting methods to understand and configure the issue better. If the problem persists, you can report by using the [Support Forum](https://community.sourcegraph.com/), or by asking in the [Discord](https://discord.gg/s2qDtYGnAE) server. ## VS Code extension @@ -3732,13 +3637,7 @@ To troubleshoot further: ### Rate limits -Cody Free provides **unlimited autocomplete suggestions** and **200 chat invocations** per user per month. - -On Cody Pro and Enterprise plans, usage limits are increased, and controlled by **Fair Usage**. This means that some users occasionally experience a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact us through our [community forum](https://community.sourcegraph.com), Discord, or email support@sourcegraph.com. - -#### 429 errors - -A 429 status code means you are on a free account and hit your usage limit/quota for the day. It can also mean you were sending too many requests in a short period of time. If you have Cody Pro and you are seeing 429 errors, you can contact us at [support@sourcegraph.com](mailto:support@sourcegraph.com) to resolve this. +On Enterprise plans, usage limits are increased, and controlled by **Fair Usage**. This means that some users occasionally experience a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact us through our [community forum](https://community.sourcegraph.com), Discord, or email support@sourcegraph.com. ### Error logging in VS Code on Linux and Windows @@ -3760,7 +3659,7 @@ On Windows, If you encounter this error: -``` +```bash Request Failed: Request to https://sourcegraph.com/.api/completions/stream?api-version=1&client-name=vscode&client-version=1.34.3 failed with 403 Forbidden ``` @@ -3772,7 +3671,7 @@ Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essenti The `contextFilters` setting in Cody is used to control which files are included or excluded when Cody searches for relevant context while answering questions or providing code assistance. Sometimes, you can see the following error: -``` +```bash Edit failed to run: file is ignored (due to cody.contextFilters Enterprise configuration setting) ``` @@ -3782,13 +3681,6 @@ If the error occurs with a file that's not been excluded, the workaround is to u This should clear the error. -### VS Code Pro License Issues - -If VS Code prompts you to upgrade to Pro despite already having a Pro license, this usually happens because you're logged into a free Cody/Sourcegraph account rather than your Pro account. To fix this: - -- Check which account you're currently logged into -- If needed, log out and sign in with your PRO account credentials - ### Error exceeding `localStorage` quota When using Cody chat, you may come across this error: @@ -3812,6 +3704,7 @@ You can get performance traces from the Cody VS Code extension in production wit ``` Note that you may need to quit VSCode first, then run that command to re-launch it. It will open all of your windows and tabs again. + - After VS Code is started, head over to Chrome and go to `chrome://inspect`, which takes you to the following: ![](https://gist.github.com/assets/458591/0a17881b-5449-48d5-a53e-5556f4f2dedd) @@ -3951,30 +3844,6 @@ $filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList); If you would like to add a forked repository as Cody context, you may need to add `"search.includeForks": true` to the [global settings](/admin/config/settings#editing-global-settings-for-site-admins) for your instance. -{/* ## Eclipse extension - -### See a white screen the first time you open Cody chat - -This can happen if Eclipse prompts you to set up a password for secure storage and Cody timeouts while waiting. Simply close and re-open the Cody chat. - -### "No password provided" in the error log - -If you see this error in the error log, it happens because the default OS password integration has been corrupted. Go to **Preferences > General > Security > Secure Storage** and ensure your OS integration is checked. - -Then click **Clear Passwords** at the top, and then click **Change Password**. If you see a dialog saying **An error occurred while decrypting stored values... Do you want to cancel password change?** Click **No**. - -This will reset the secure storage master password for OS integration. You will be asked if you want to provide additional information for password recovery, which is optional. Click **Apply and Close** and then restart Eclipse. - -### General Tips - -You can open the Cody Log view using the same steps as above, but instead, select **Cody Log**. - -![cody-logs](https://storage.googleapis.com/sourcegraph-assets/Docs/eclipse-cody-log-1124.png) - -This will include more information about what Cody is doing, including any errors. There is a copy button at the top right of the log view that you can use to copy the log to your clipboard and send it to us. Be careful not to include any sensitive information, as the log communication is verbose and may contain tokens. - -Additionally, Eclipse's built-in Error Log can be used to view any uncaught exceptions and their stack traces. You can open the Error Log using the **Window > Show View > Error Log** menu. */} - ## OpenAI o1 ### Context Deadline Exceeded Error @@ -4008,7 +3877,7 @@ Symptoms: Solutions: - Break down complex requests into smaller steps -- Consider using Sonnet 3.5 for tasks requiring longer outputs +- Consider using Sonnet 4 for tasks requiring longer outputs Limits: @@ -4027,7 +3896,6 @@ Solutions: - Restart IDE/VS Code - Sign out and sign back in -- Check Pro subscription status - Contact support if issues persist ### Response Format Errors @@ -4064,14 +3932,14 @@ Solutions: Before you start, you'll need the following: - [Cody extension installed](/cody/clients/install-vscode) in your VS Code editor -- Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account +- A Sourcegraph Enterprise account with Cody enabled - A project open in VS Code ## Getting started with Cody -After installing the extension and connecting to a Sourcegraph instance, you can leverage Cody to use the best LLM and context to understand, write, and fix code. Click the **Cody** icon from the VS Code side activity bar to open the Cody chat panel. +After installing the extension and connecting to your Sourcegraph Enterprise instance, you can leverage Cody to use the best LLM and context to understand, write, and fix code. Click the **Cody** icon from the VS Code side activity bar to open the Cody chat panel. -By default, the chat input will have the context of your entire codebase, and Claude 3.5 Sonnet (New) is selected as the default chat model. Based on your [Cody tier](https://sourcegraph.com/pricing?product=cody), you can change the LLM model and context based on your use case to optimize speed, accuracy, or cost. +By default, the chat input will have the context of your entire codebase, and Claude 3.5 Sonnet is selected as the default chat model. You can change the LLM model and context based on your use case to optimize speed, accuracy, or cost. To help you automate your key tasks in your development workflow, you get **[Prompts](/cody/capabilities/commands)**. If you are a part of an organization on Sourcegraph.com or a self-hosted Sourcegraph instance, you can view these pre-built Prompts created by your teammates. Alternatively, you can create your own Prompts via the **Prompt Library** from your Sourcegraph instance. @@ -4107,9 +3975,9 @@ Cody automatically predicts the function body in gray-dimmed text. Press `Tab` t ## Use Cody to refactor code -You can refactor your code with inline edits. All you need to do is highlight the code, hit the edit hotkey (`Opt + K`), and describe a change. Cody will generate a diff for the change in seconds. +You can refactor your code with inline edits. All you need to do is highlight the code, hit the edit hotkey (`Opt+K`), and describe a change. Cody will generate a diff for the change in seconds. -Let's use the same `bubbleSort()` function from the previous section. Now, refactor the function to sort dates in descending order. Highlight the function and press `Opt + K`. +Let's use the same `bubbleSort()` function from the previous section. Now, refactor the function to sort dates in descending order. Highlight the function and press `Opt+K`. ![cody-refactor](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-refactor-code-1124.png) @@ -4226,9 +4094,9 @@ Cody leverages the `@-mention` syntax to source context via files, symbols, web You can learn more about context [here](/cody/core-concepts/context). ### Indexing your repositories for context -@-mention local and current repositories are only available if you have your repository indexed. Enterprise and Enterprise Starter users can request their admins to add their local project for indexing to get access to @-mention context. +@-mention local and current repositories are only available if you have your repository indexed. Enterprise and Enterprise Starter users can request their admins to add their local project for indexing to get access to @-mention context. -Repository indexing is only available to supported [Code Hosts](https://sourcegraph.com/docs/admin/code_hosts), please reach out to your admins if you require assistance with indexing. +Repository indexing is only available to supported [Code Hosts](https://sourcegraph.com/docs/admin/code_hosts), please reach out to your admins if you require assistance with indexing. ## Selecting the right LLM @@ -4269,7 +4137,7 @@ Create a function that takes the total amount and loyalty points as input and re While preparing your codebase for Cody, you learned about the importance of context chips. In addition to this default context, you can provide additional and more specific context to help Cody better understand your codebase. -You can continue to `@-mention` files, symbols, and other context sources (as supported by your Cody tier) to make your search more specific and granular. You should approach this as if explaining the situation to a new team member. You should: +You can continue to `@-mention` files, symbols, and other context sources to make your search more specific and granular. You should approach this as if explaining the situation to a new team member. You should: - Reference important files and symbols - Provide examples from other similar functions @@ -4445,9 +4313,9 @@ You can share all these prompt examples with your team members to help them get # Cody - Supported on all [Sourcegraph plans](https://about.sourcegraph.com/pricing). + Supported on [Sourcegraph Enterprise](https://about.sourcegraph.com/pricing). - Available on VS Code, JetBrains, Visual Studio, and the Web. + Available on VS Code, JetBrains, Visual Studio, and the Web app. @@ -4465,12 +4333,12 @@ Cody connects seamlessly with codehosts like [GitHub](https://github.com/login?c ## Getting started -You can start using Cody with one of the following options: +You can start using Cody with the following options: - - - + + + @@ -4483,7 +4351,7 @@ Cody's main features include: | **Feature** | **Description** | | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **[Chat](/cody/capabilities/chat)** | Chat directly with AI to ask questions about your code, generate code, and edit code. Cody has the context of your open file and repository by default, and you can use `@` to add context on specific files, symbols, remote repositories, or other non-code artifacts. | -| **[Autocomplete](/cody/capabilities/autocomplete)** | Cody predicts what you're trying to write before you type it. It makes single-line and multi-line suggestions as you type, using the context of the code around your cursor to make accurate suggestions. | +| **[Auto-edit](/cody/capabilities/auto-edit)** | Suggests code changes by analyzing cursor movements and typing. After you've made at least one character edit in your codebase, it begins proposing contextual modifications based on your cursor position and recent changes. | | **[Prompts](/cody/capabilities/commands)** | Automate key tasks in your workflow with premade and customizable prompts. Any common query or task can be built into a prompt to save and share with your team. | | **[Context](/cody/core-concepts/context)** | Cody provides the best LLM models and context to power chat. It uses the powerful Sourcegraph's advanced Search API to pull context from both local and remote codebases. | | **[Debug code](/cody/capabilities/debug-code)** | Cody is optimized to identify and fix errors in your code. Its debugging capability and autocomplete suggestions can significantly accelerate your debugging process, increasing developer productivity. | @@ -4519,9 +4387,7 @@ If you have any questions regarding Cody, you can always [ask our community](htt ### Does Cody train on my code? -For Enterprise customers, Sourcegraph will not train on your company’s data. For Free and Pro tier users, Sourcegraph will not train on your data without your permission. - -Our third-party Language Model (LLM) providers do not train on your specific codebase. Cody operates by following a specific process to generate answers to your queries: +For Enterprise customers, Sourcegraph will not train on your company’s data. Our third-party Language Model (LLM) providers do not train on your specific codebase. Cody operates by following a specific process to generate answers to your queries: - **User query**: A user asks a question - **Code retrieval**: Sourcegraph, our underlying code intelligence platform, performs a search and code intelligence operation to retrieve code snippets relevant to the user's question. During this process, strict permissions are enforced to ensure that only code that the user has read permission for is retrieved @@ -4537,10 +4403,6 @@ Yes, Cody is compatible with self-hosted Sourcegraph instances. However, there a - Cody operates by sending code snippets (up to 28 KB per request) to a third-party cloud service. By default, this service is Anthropic but can also be OpenAI - To use Cody effectively, your self-hosted Sourcegraph instance must have internet access for these interactions with external services -### Is Cody licensed for private code, and does it allow GPL-licensed code? - -There are no checks or exclusions for Cody PLG (VS Code, JetBrains) for private and GPL-licensed code. We are subject to whatever the LLMs are trained on. However, Cody can be used with [StarCoder for autocomplete](/cody/clients/enable-cody-enterprise#use-starcoder-for-autocomplete) which is trained only on permissively licensed code. - ### Is there a public facing Cody API? Currently, there is no public-facing Cody API available. @@ -4589,7 +4451,7 @@ Cody Chat is optimized for coding related use cases and can be used primarily fo ### What happened to the Cody App? -We’ve deprecated the Cody App to streamline the experience for our Cody Free and Cody Pro users.The Cody App is no longer available for download. +We’ve deprecated the Cody App to streamline the experience. The Cody App is no longer available for download. ## Embeddings @@ -4604,9 +4466,9 @@ Cody leverages **Sourcegraph Search** as a primary context provider, which comes We leverage multiple retrieval mechanisms to give Cody the right context and will be constantly iterating to improve Cody's quality. The most important aspect is getting the files from the codebase, not the specific algorithm used to find those files. -### Why are embeddings no longer supported on Cody PLG and Enterprise? +### Why are embeddings no longer supported on Enterprise? -Cody does not support embeddings on Cody PLG and Cody Enterprise because we have replaced them with Sourcegraph Search. There are two driving factors: +Cody does not support embeddings on Cody Enterprise because we have replaced them with Sourcegraph Search. There are two driving factors: - The need for a retrieval system that can scale across repos and to repos of greater size - A system that is secure and requires low maintenance on the part of users @@ -4639,7 +4501,7 @@ Please refer to this [terms and conditions](https://about.sourcegraph.com/terms/ ### Can I use my own API keys? -Yes, [you can use your own API keys](https://sourcegraph.com/docs/cody/clients/install-vscode#experimental-models). However, this is an experimental feature. Bring-your-own-API-key is fully supported in the Enterprise plan. +Yes, BYOK (Bring Your Own Key) is fully supported in the Enterprise plan. ### Can I use Cody with my Cloud IDE? @@ -4652,7 +4514,7 @@ Yes, Cody supports the following cloud development environments: Yes you can. In the CLI you can use the following command to get started. Please replace `$name_of_the_model` with the LLM model of your choice. -``` +```shell cody chat --model '$name_of_the_model' -m 'Hi Cody!' ``` @@ -4715,6 +4577,60 @@ Once you are signed in make sure to re-enable protection. - No streaming responses for o1 series - Limited context window +## Sunsetting Cody Free, Pro, and Enterprise Starter plans + +### What is the impact? + +Starting July 23, 2025, Cody will no longer be available for Free, Pro and Enterprise Starter plans. Existing users will continue to have access until this date. + +This change **will not impact Cody Enterprise customers**. They will continue to have access to Cody. We are fully committed and invested in Cody Enterprise and will continue to serve our customers. + +### What does this mean if you are a Cody Free, Pro, Enterprise Starter, or Enterprise user? + +Starting June 25, you cannot sign up for new Cody Free or Cody Pro accounts, and the new Enterprise Starter workspaces will not include Cody. + +If you're a Cody Free user: + +- You will have access to Cody Free until July 23, 2025. After this, you'll no longer be able to use Cody. +- Instead, you can sign up with Amp and receive **$10 in free credits** at [ampcode.com](http://ampcode.com/). + +If you're a Cody Pro user: + +- You will have access to Cody Pro until July 23, 2025. After this, you'll no longer be able to use Cody. +- You **will not be charged for Cody Pro** between now and July 23, 2025. +- Cody Pro customers can sign up with Amp today at [ampcode.com](http://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Cody Pro. + +If you're on Enterprise Starter: + +- Your workspaces will have Cody access until *July 23, 2025, after which Cody's access will be removed. +- Your Enterprise Starter subscription remains fully supported for Code Search, with upcoming improvements like [Deep Search](/code-search/types/deep-search). +- Enterprise Starter customers can sign up with Amp today at [ampcode.com](http://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Enterprise Starter. + +If you're an Enterprise user: + +- **This change will not impact you**. We're fully committed to serving you. +- You can continue to use Cody Enterprise as this remains fully supported and actively invested in. + +### Why is this change being made? + +AI is evolving rapidly, and so are developers' workflows. To stay focused and aligned with those needs, we're simplifying our product roadmap and offerings. + +**Cody Enterprise will actively be supported, developed, and maintained**. It will continue to offer AI-powered development workflows for secure, collaborative, and large-scale teams. + +But with AI now capable of handling more complex, agentic, and autonomous workflows, we've built [**Amp**](https://ampcode.com/) — our agentic, team-ready AI coding tool. + +### Is there any replacement for Cody Free and Pro? + +Yes, [**Amp**](https://ampcode.com/) is our new AI coding tool for agentic workflows and team collaboration. + +It runs in VS Code with compatible forks like Cursor, Windsurf, and VSCodium and as a CLI. It's also multiplayer — you can share threads and collaborate with your team. + +Amp is your way forward if you're using Cody Free or Pro. Sign up today for $10 in Amp credits if you're a Cody Free user and $40 in Amp credits if you're a Cody Pro user. + +### How can I learn more about Amp? + +We've built [Amp's Manual](https://ampcode.com/manual) to help you get started with Amp. In addition, if you need more help for this Cody > Amp transition please reach out to us in [Discord](https://discord.com/servers/sourcegraph-969688426372825169). + @@ -6154,63 +6070,6 @@ In the configuration above,
- - -```json -"modelConfiguration": { - "sourcegraph": null, - "providerOverrides": [ - { - "id": "google", - "displayName": "Google Gemini", - "serverSideConfig": { - "type": "google", - "accessToken": "token", - "endpoint": "https://us-east5-aiplatform.googleapis.com/v1/projects/project-name/locations/us-east5/publishers/anthropic/models" - } - } - ], - "modelOverrides": [ - { - "modelRef": "google::unknown::claude-3-5-sonnet", - "displayName": "Claude 3.5 Sonnet (via Google Vertex)", - "modelName": "claude-3-5-sonnet@20240620", - "contextWindow": { - "maxInputTokens": 45000, - "maxOutputTokens": 4000 - }, - "capabilities": ["chat"], - "category": "accuracy", - "status": "stable" - }, - { - "modelRef": "google::unknown::claude-3-haiku", - "displayName": "Claude 3 Haiku", - "modelName": "claude-3-haiku@20240307", - "capabilities": ["autocomplete", "chat"], - "category": "speed", - "status": "stable", - "contextWindow": { - "maxInputTokens": 7000, - "maxOutputTokens": 4000 - } - }, - ], - "defaultModels": { - "chat": "google::unknown::claude-3-5-sonnet", - "fastChat": "google::unknown::claude-3-5-sonnet", - "codeCompletion": "google::unknown::claude-3-haiku" - } -} -``` - -In the configuration above, - -- Set up a provider override for Google Anthropic, routing requests for this provider directly to the specified endpoint (bypassing Cody Gateway) -- Add two Anthropic models: - `"google::unknown::claude-3-5-sonnet"` with "chat" capabiity - used for "chat" and "fastChat" - `"google::unknown::claude-3-haiku"` with "autocomplete" capability - used for "codeCompletion" - - - ```json @@ -6278,6 +6137,93 @@ Provisioned throughput for Amazon Bedrock models can be configured using the `"a ](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html#:~:text=HttpPutResponseHopLimit) instance metadata option to a higher value (e.g., 2) to ensure that the metadata service can be accessed from the frontend container running in the EC2 instance. See [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-existing-instances.html) for instructions. +## AWS Bedrock: Latency optimization + +Optimization for latency with AWS Bedrock is available in Sourcegraph v6.5 and more. + +AWS Bedrock supports [Latency Optimized Inference](https://docs.aws.amazon.com/bedrock/latest/userguide/latency-optimized-inference.html) which can reduce autocomplete latency with models like Claude 3.5 Haiku by up to ~40%. + +To use Bedrock's latency optimized inference feature for a specific model with Cody, configure the `"latencyOptimization": "optimized"` setting under the `serverSideConfig` of any model in `modelOverrides`. For example: + +```json +"modelOverrides": [ + { + "modelRef": "aws-bedrock::v1::claude-3-5-haiku-latency-optimized", + "modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0", + "displayName": "Claude 3.5 Haiku (latency optimized)", + "capabilities": [ + "chat", + "autocomplete" + ], + "category": "speed", + "status": "stable", + "contextWindow": { + "maxInputTokens": 200000, + "maxOutputTokens": 4096 + }, + "serverSideConfig": { + "type": "awsBedrock", + "latencyOptimization": "optimized" + } + }, + { + "modelRef": "aws-bedrock::v1::claude-3-5-haiku", + "modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0", + "displayName": "Claude 3.5 Haiku", + "capabilities": [ + "chat", + "autocomplete" + ], + "category": "speed", + "status": "stable", + "contextWindow": { + "maxInputTokens": 200000, + "maxOutputTokens": 4096 + }, + "serverSideConfig": { + "type": "awsBedrock", + "latencyOptimization": "standard" + } + } +] +``` + +See also [Debugging: running a latency test](#debugging-running-a-latency-test). + +### Debugging: Running a latency test + +Debugging latency optimizated inference is supported in Sourcegraph v6.5 and more. + +Site administrators can test completions latency by sending a special debug command in any Cody chat window (in the web, in the editor, etc.): + +```shell +cody_debug:::{"latencytest": 100} +``` + +Cody will then perform `100` quick `Hello, please respond with a short message.` requests to the LLM model selected in the dropdown, and measure the time taken to get the first streaming event back (for example first token from the model.) It records all of these requests timing information, and then responds with a report indicating the latency between the Sourcegraph `frontend` container and the LLM API: + +```shell +Starting latency test with 10 requests... + +Individual timings: + +[... how long each request took ...] + +Summary: + +* Requests: 10/10 successful +* Average: 882ms +* Minimum: 435ms +* Maximum: 1.3s +``` + +This can be helpful to get a feel for the latency of particular models, or models with different configurations - such as when using the AWS Bedrock Latency Optimized Inference feature. + +Few important considerations: + +- Debug commands are only available to site administrators and have no effect when used by regular users. +- Sourcegraph's built-in Grafana monitoring also has a full `Completions` dashboard for monitoring LLM requests, performance, etc. + @@ -6295,7 +6241,7 @@ Site administrators can set the duration of access tokens for users connecting C ## Guardrails -Guardrails for public code is currently in Beta and is supported with VS Code, JetBrains IDEs extensions and Sourcegraph Web app. +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. 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. @@ -6307,6 +6253,12 @@ Guardrails don't differentiate between license types. It matches any code snippe You can `enforce` a Guardrails check to prevent any matching code from being shown to the user. To do so, site admins need to add `"attribution.mode": "enforced"` in the **Site configuration** setting. This will configure the settings for Cody IDE extensions VS Code (v1.82+) or JetBrains (v7.82+) accordingly and will enforce not to display code until attribution checks have finished. +### Known Limitations +1. Guardrails work through an exact string match across ten or more lines, which means extra comments or name changes may not trigger the check +2. The strings are compared against around **290,000** indexed open source repositories, consisting of all license types, including permissive and non-permissive licenses +3. Guardrails requires access to the Cody Gateway, which means it's not supported for any customers using BYOK (Bring Your Own Key) +4. Guardrails is only supported on the Sourcegraph Web app, and the IDE extensions in VS Code, JetBrains IDEs, for chat and autocomplete + ## Admin controls Admin controls are supported with VS Code and JetBrains IDE extension. @@ -6491,68 +6443,15 @@ For `endpoint`, you can either: For `accessToken`, you can either: -- Leave it empty and rely on instance role bindings or other AWS configurations in the `frontend` service -- Set it to `:` if directly configuring the credentials -- Set it to `::` if a session token is also required - -#### AWS Bedrock: Latency optimization - -Optimization for latency with AWS Bedrock is available in Sourcegraph v6.5 and more. - -AWS Bedrock supports [Latency Optimized Inference](https://docs.aws.amazon.com/bedrock/latest/userguide/latency-optimized-inference.html) which can reduce autocomplete latency with models like Claude 3.5 Haiku by up to ~40%. - -To use Bedrock's latency optimized inference feature for a specific model with Cody, configure the `"latencyOptimization": "optimized"` setting under the `serverSideConfig` of any model in `modelOverrides`. For example: - -```json -"modelOverrides": [ - { - "modelRef": "aws-bedrock::v1::claude-3-5-haiku-latency-optimized", - "modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0", - "displayName": "Claude 3.5 Haiku (latency optimized)", - "capabilities": [ - "chat", - "autocomplete" - ], - "category": "speed", - "status": "stable", - "contextWindow": { - "maxInputTokens": 200000, - "maxOutputTokens": 4096 - }, - "serverSideConfig": { - "type": "awsBedrock", - "latencyOptimization": "optimized" - } - }, - { - "modelRef": "aws-bedrock::v1::claude-3-5-haiku", - "modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0", - "displayName": "Claude 3.5 Haiku", - "capabilities": [ - "chat", - "autocomplete" - ], - "category": "speed", - "status": "stable", - "contextWindow": { - "maxInputTokens": 200000, - "maxOutputTokens": 4096 - }, - "serverSideConfig": { - "type": "awsBedrock", - "latencyOptimization": "standard" - } - } -] -``` - -See also [Debugging: running a latency test](#debugging-running-a-latency-test). +- Leave it empty and rely on instance role bindings or other AWS configurations in the `frontend` service +- Set it to `:` if directly configuring the credentials +- Set it to `::` if a session token is also required ### Example: Using GCP Vertex AI On [GCP Vertex](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude), we only support Anthropic Claude models. -- Enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) in the GCP console. Once Vertex has been enabled in your project, navigate to the [Vertex Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) to select and enable the Anthropic Claude model(s) that you wish to use with Cody. See [Supported LLM Models](/capabilities/supported-models) for an up-to-date list of Anthropic Claude models supported by Cody. +- Enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) in the GCP console. Once Vertex has been enabled in your project, navigate to the [Vertex Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) to select and enable the Anthropic Claude model(s) that you wish to use with Cody. See [Supported LLM Models](/cody/capabilities/supported-models) for an up-to-date list of Anthropic Claude models supported by Cody. It may take some time to enable Vertex and provision access to the models you plan to use @@ -6642,40 +6541,6 @@ To enable StarCoder, go to **Site admin > Site configuration** (`/site-admin/con Users of the Cody extensions will automatically pick up this change when connected to your Enterprise instance. -## Debugging: Running a latency test - -Debugging latency optimizated inference is supported in Sourcegraph v6.5 and more. - -Site administrators can test completions latency by sending a special debug command in any Cody chat window (in the web, in the editor, etc.): - -```shell -cody_debug:::{"latencytest": 100} -``` - -Cody will then perform `100` quick `Hello, please respond with a short message.` requests to the LLM model selected in the dropdown, and measure the time taken to get the first streaming event back (for example first token from the model.) It records all of these requests timing information, and then responds with a report indicating the latency between the Sourcegraph `frontend` container and the LLM API: - -```shell -Starting latency test with 10 requests... - -Individual timings: - -[... how long each request took ...] - -Summary: - -* Requests: 10/10 successful -* Average: 882ms -* Minimum: 435ms -* Maximum: 1.3s -``` - -This can be helpful to get a feel for the latency of particular models, or models with different configurations - such as when using the AWS Bedrock Latency Optimized Inference feature. - -Few important considerations: - -- Debug commands are only available to site administrators and have no effect when used by regular users. -- Sourcegraph's built-in Grafana monitoring also has a full `Completions` dashboard for monitoring LLM requests, performance, etc. - @@ -6692,46 +6557,6 @@ All other models are currently capped at **7,000 tokens** of shared context betw Here's a detailed breakdown of the token limits by model: - - -| **Model** | **Conversation Context** | **@-mention Context** | **Output** | -| ----------------------------- | ------------------------ | --------------------- | ---------- | -| GPT 4o mini | 7,000 | shared | 4,000 | -| GPT o3 mini medium | 7,000 | shared | 4,000 | -| Claude 3.5 Haiku | 7,000 | shared | 4,000 | -| Claude 3.5 Sonnet (New) | 15,000 | 30,000 | 4,000 | -| **Claude Sonnet 4** | **15,000** | **45,000** | **4,000** | -| Gemini 1.5 Pro | 7,000 | shared | 4,000 | -| Gemini 2.0 Flash | 7,000 | shared | 4,000 | -| Gemini 2.0 Flash-Lite Preview | 7,000 | shared | 4,000 | - - - - - -The Pro tier supports the token limits for the LLM models on Free tier, plus: - -| **Model** | **Conversation Context** | **@-mention Context** | **Output** | -| ------------------------------ | ------------------------ | --------------------- | ---------- | -| GPT 4o mini | 7,000 | shared | 4,000 | -| GPT o3 mini medium | 7,000 | shared | 4,000 | -| GPT 4 Turbo | 7,000 | shared | 4,000 | -| GPT 4o | 7,000 | shared | 4,000 | -| o1 | 7,000 | shared | 4,000 | -| Claude 3.5 Haiku | 7,000 | shared | 4,000 | -| Claude 3.5 Sonnet (New) | 15,000 | 30,000 | 4,000 | -| **Claude Sonnet 4 w/Thinking** | **15,000** | **45,000** | **4,000** | -| Claude 3.7 Sonnet | 15,000 | 30,000 | 4,000 | -| Gemini 1.5 Pro | 15,000 | 30,000 | 4,000 | -| Gemini 2.0 Flash | 7,000 | shared | 4,000 | -| Gemini 2.0 Flash-Lite Preview | 7,000 | shared | 4,000 | - - - - - -The Enterprise tier supports the token limits for the LLM models on Free and Pro tier, plus: - | **Model** | **Conversation Context** | **@-mention Context** | **Output** | | ------------------------------ | ------------------------ | --------------------- | ---------- | | GPT 4o mini | 7,000 | shared | 4,000 | @@ -6746,14 +6571,10 @@ The Enterprise tier supports the token limits for the LLM models on Free and Pro | **Claude Opus 4** | **15,000** | **45,000** | **4,000** | | **Claude Opus 4 w/Thinking** | **15,000** | **45,000** | **4,000** | | Claude 3.7 Sonnet | 15,000 | 30,000 | 4,000 | +| Gemini 1.5 Pro | 15,000 | 30,000 | 4,000 | | Gemini 2.0 Flash | 7,000 | shared | 4,000 | | Gemini 2.0 Flash-Lite Preview | 7,000 | shared | 4,000 | - - - -
- For Cody Enterprise, the token limits are the standard limits. Exact token limits may vary depending on your deployment. Please get in touch with your Sourcegraph representative. For more information on how Cody builds context, see our [docs here](/cody/core-concepts/context). ## What is a Context Window? @@ -6889,32 +6710,25 @@ All these methods collectively ensure Cody's ability to provide relevant and hig Cody uses @-mentions to retrieve context from your codebase. Inside the chat window, there is an `@` icon that you can click to select a context source. Alternatively, you can press `@` to open the context picker. -Based on your Cody tier, you can @-mention the following: +Enterprise users can @-mention the following context sources on: -| **Tier** | **Client** | **Files** | **Symbols** | **Web URLs** | **Remote Files/Directories** | **OpenCtx** | -| -------------- | ------------- | --------- | ----------- | ------------ | ---------------------------- | ----------- | -| **Free/Pro** | VS Code | ✅ | ✅ | ✅ | ❌ | ✅ | -| | JetBrains | ✅ | ❌ | ✅ | ❌ | ❌ | -| | Visual Studio | ✅ | ✅ | ✅ | ❌ | ❌ | -| | Cody Web | ✅ | ✅ | ✅ | ❌ | ❌ | -| **Enterprise** | VS Code | ✅ | ✅ | ✅ | ✅ | ✅ | -| | JetBrains | ✅ | ❌ | ✅ | ✅ | ❌ | -| | Visual Studio | ✅ | ✅ | ✅ | ✅ | ✅ | -| | Cody Web | ✅ | ✅ | ✅ | ✅ | ❌ | +| **Client** | **Files** | **Symbols** | **Web URLs** | **Remote Files/Directories** | **OpenCtx** | +| ------------- | --------- | ----------- | ------------ | ---------------------------- | ----------- | +| VS Code | ✅ | ✅ | ✅ | ✅ | ✅ | +| JetBrains | ✅ | ❌ | ✅ | ✅ | ❌ | +| Visual Studio | ✅ | ✅ | ✅ | ✅ | ✅ | +| Cody Web | ✅ | ✅ | ✅ | ✅ | ❌ | ## Repo-based context -Cody supports repo-based context. You can link single or multiple repositories based on your tier. Here's a detailed breakdown of the number of repositories supported by each client for Cody Free, Pro, and Enterprise users: +Cody supports repo-based context. You can link single or multiple repositories. Here's a detailed breakdown of the number of repositories supported by each client: -| **Tier** | **Client** | **Repositories** | -| -------------- | ------------- | ---------------- | -| **Free/Pro** | VS Code | 1 | -| | JetBrains | 1 | -| | Visual Studio | 1 | -| **Enterprise** | Cody Web | Multi | -| | VS Code | Multi | -| | JetBrains | Multi | -| | Visual Studio | Multi | +| **Client** | **Repositories** | +| ------------- | ---------------- | +| Cody Web | Multi | +| VS Code | Multi | +| JetBrains | Multi | +| Visual Studio | Multi | ## How does context work with Cody prompts? @@ -7024,13 +6838,13 @@ Alternately, you may need to set up a periodic CI job, specifically designed to The Cody extension by Sourcegraph enhances your coding experience in VS Code by providing intelligent code suggestions, context-aware autocomplete, and advanced code analysis. This guide will walk you through the steps to install and set up Cody within your VS Code environment. - + ## Prerequisites - You have the latest version of [VS Code](https://code.visualstudio.com/) installed -- You have a Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account +- A Sourcegraph Enterprise account with Cody enabled ## Install the VS Code extension @@ -7049,14 +6863,6 @@ Alternatively, you can also [download and install the extension from the VS Code After a successful installation, the Cody icon appears in the [Activity sidebar](https://code.visualstudio.com/api/ux-guidelines/activity-bar). -### Cody Free or Cody Pro Users - -Cody Free and Cody Pro users can sign in to their Sourcegraph.com accounts through GitHub, GitLab, or Google. - -![](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-new-ui-2025.jpg) - -### Sourcegraph Enterprise Cody Users - If you are using an older version of Cody, uninstall it and reload VS Code. It's always recommended to install the latest version before proceeding to the next steps. Sourcegraph Enterprise users should connect Cody to their Enterprise instance by clicking **Sign In to Your Enterprise Instance**. @@ -7143,7 +6949,7 @@ A chat history icon at the top of your chat input window allows you to navigate ### Changing LLM model for chat - You need to be a Cody Free or Pro user to have multi-model selection capability. You can view which LLMs you have access to on our [supported LLMs page](/cody/capabilities/supported-models). Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. +You can view which LLMs you have access to on our [supported LLMs page](/cody/capabilities/supported-models). Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. For Chat: @@ -7183,31 +6989,6 @@ At any point in time, you can edit these context chips or remove them completely When you have both a repository and files @-mentioned, Cody will search the repository for context while prioritizing the mentioned files. -### @-mention context providers with OpenCtx - -OpenCtx context providers are in Experimental stage for all Cody users. Enterprise users can also use this but with limited support. If you have feedback or questions, please visit our [support forum](https://community.sourcegraph.com/c/openctx/10). - -[OpenCtx](https://openctx.org/) is an open standard for bringing contextual info about code into your dev tools. Cody Free and Pro users can use OpenCtx providers to fetch and use context from the following sources: - -- [Webpages](https://openctx.org/docs/providers/web) (via URL) -- [Jira tickets](https://openctx.org/docs/providers/jira) -- [Linear issues](https://openctx.org/docs/providers/linear-issues) -- [Notion pages](https://openctx.org/docs/providers/notion) -- [Google Docs](https://openctx.org/docs/providers/google-docs) -- [Sourcegraph code search](https://openctx.org/docs/providers/sourcegraph-search) - -To try it out, add context providers to your VS Code settings. For example, to use the [DevDocs provider](https://openctx.org/docs/providers/devdocs), add the following to your `settings.json`: - -```json -"openctx.providers": { - "https://openctx.org/npm/@openctx/provider-devdocs": { - "urls": ["https://devdocs.io/go/", "https://devdocs.io/angular~16/"] - } -}, -``` - -You don't need the OpenCtx VS Code extension to use context fetching with OpenCtx. We recommend uninstalling the extension before using this feature in Cody. - ### Rerun prompts with different context If Cody's answer isn't helpful, you can try asking again with different context: @@ -7217,19 +6998,13 @@ If Cody's answer isn't helpful, you can try asking again with different context: ![re-run-with-context](https://storage.googleapis.com/sourcegraph-assets/Docs/re-run-with-context-2025.png) -## Context fetching mechanism - -VS Code users on the Free or Pro plan use [local context](/cody/core-concepts/context#context-sources). +## Context fetching mechanism and sources Enterprise users can use the full power of the Sourcegraph search engine as Cody's primary context provider. Read more about [Context fetching mechanism](/cody/core-concepts/context/#context-fetching-mechanism) in detail. -## Context sources - -You can @-mention files, symbols, and web pages in Cody. Cody Enterprise also supports @-mentioning repositories to search for context in a broader scope. Cody's experimental [OpenCtx](https://openctx.org) support adds even more context sources, including Jira, Linear, Google Docs, Notion, and more. - -Cody Free and Pro offer single-repo context, and Cody Enterprise supports multi-repo context. +You can @-mention files, symbols, and web pages in Cody. It also supports @-mentioning multi-repo context to search context in a broader scope. ### Cody Context Filters @@ -7276,10 +7051,6 @@ Cody provides a set of powerful keyboard shortcuts to streamline your workflow a * `Cmd+.` (macOS) or `Ctrl+.` (Windows/Linux): Opens the Quick Fix menu, which includes options for Cody to edit or generate code based on your current context. -## Updating the extension - -VS Code will typically notify you when updates are available for installed extensions. Follow the prompts to update the Cody AI extension to the latest version. - ## Authenticating Cody with VS Code forks Cody also works with Cursor, Gitpod, IDX, and other similar VS Code forks. To access VS Code forks like Cursor, select **Sign in with URL and access token** and generate an access token. Next, copy and paste into the allocated field, using `https://sourcegraph.com` as the URL. @@ -7288,9 +7059,7 @@ Cody also works with Cursor, Gitpod, IDX, and other similar VS Code forks. To ac Claude 3.5 Sonnet is the default LLM model for inline edits and prompts. If you've used a different or older LLM model for inline edits before, remember to manually change your model to Claude 3.5 Sonnet. Default model changes only affect new users. -Users on Cody **Free** and **Pro** can choose from a list of [supported LLM models](/cody/capabilities/supported-models) for chat. - -![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-0225.jpg) +Here's a list of [supported LLM models](/cody/capabilities/supported-models) for chat. Enterprise users get Claude 3.5 Sonnet as the default LLM models without extra cost. Moreover, Enterprise users can use Claude 3.5 models through Cody Gateway, Anthropic BYOK, Amazon Bedrock (limited availability), and GCP Vertex. @@ -7300,89 +7069,6 @@ You also get additional capabilities like BYOLLM (Bring Your Own LLM), supportin Read more about all the supported LLM models [here](/cody/capabilities/supported-models) -## Experimental models - -Support for the following models is currently in the Experimental stage, and available for Cody Free and Pro plans. - -The following experimental model providers can be configured in Cody's extension settings JSON: - -- Google (requires [Google AI Studio API key](https://aistudio.google.com/app/apikey)) -- Groq (requires [GroqCloud API key](https://console.groq.com/docs/api-keys)) -- OpenAI & OpenAI-Compatible API (requires [OpenAI API key](https://platform.openai.com/account/api-keys)) -- Ollama (remote) - -Once configured, and VS Code has been restarted, you can select the configured model from the dropdown both for chat and for edits. - -Example VS Code user settings JSON configuration: - -```json -{ - "cody.dev.models": [ - { - "provider": "google", - "model": "gemini-2.0-flash-exp", - "inputTokens": 1048576, - "outputTokens": 8192, - "apiKey": "", - "options": { - "temperature": 0.0 - } - }, - { - "provider": "groq", - "model": "llama2-70b-4096", - "inputTokens": 4000, - "outputTokens": 4000, - "apiKey": "", - "options": { - "temperature": 0.0 - } - }, - { - "provider": "openai", - "model": "some-model-id", - "inputTokens": 32000, - "outputTokens": 4000, - "apiKey": "", - "options": { - "temperature": 0.0 - }, - "apiEndpoint": "https://host.domain/path" - }, - { - "provider": "ollama", - "model": "some-model-id", - "apiEndpoint": "https://host.domain/path" - } - ] -} -``` - -### Provider configuration options - -- `"provider"`: `"google"`, `"groq"`, `"ollama"` or `"openai"` - - The LLM provider type. -- `"model"`: `string` - - The ID of the model, e.g. `"gemini-2.0-flash-exp"` -- `"inputTokens"`: `number` - optional - - The context window size of the model's input. Default: 7000. -- `"outputTokens"`: `number` - optional - - The context window size of the model's output. Default: 4000. -- `"apiKey"`: `string` - optional - - The API key for the endpoint. Required if the provider is `"google"`, `"groq"`, `"ollama"` or `"openai"`. -- `"apiEndpoint"`: `string` - optional - - The endpoint URL, if you don't want to use the provider’s default endpoint. -- `"options"` : `object` - optional - - Additional parameters like `temperature`, `topK`, `topP` based on provider documentation. - -### Debugging experimental models - -To debug problems with the experimental models, use the VS Code output panel which can be opened using the following steps: - -- Open the Cody Sidebar -- Next to "Settings and Support" click the "..." icon -- Click "Open Output Channel" - ## Add/remove account To add/remove an account you can do the following: @@ -7398,18 +7084,18 @@ To add/remove an account you can do the following:

Learn how to use Cody and its features with the Visual Studio editor.

-Cody for Visual Studio is currently in the Experimental stage and currently supports chat and autocomplete. +Cody for Visual Studio is currently in the Experimental stage. Cody extension for Visual Studio enhances your coding experience by providing intelligent and contextually aware answers to your questions. This guide will walk you through installing and setting Cody within your Visual Studio editor. - + ## Prerequisites - You have the latest version of [Visual Studio](https://visualstudio.microsoft.com/) installed -- You have a Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account +- A Sourcegraph Enterprise account with Cody enabled ## Install the Visual Studio extension @@ -7419,15 +7105,13 @@ Cody extension for Visual Studio enhances your coding experience by providing in ## Connect the extension to Sourcegraph -Cody for Visual Studio is available for all Cody plans, including Cody Free, Pro, and Enterprise. - After a successful installation, go to **Tools** from the main toolbar at the top and click the **Cody Chat** from the drop-down. This opens the dialog box to connect to your Sourcegraph instance. -Cody Free or Pro users can sign in to their Sourcegraph.com accounts through GitHub, GitLab, or Google. Meanwhile, Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token. +Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token. Complete these steps, and you'll be ready to start using Cody in Visual Studio. -![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-setup-102024-2.png) +![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-setup-0725.png) ## Chat @@ -7439,7 +7123,7 @@ The chat input field has a default `@-mention` [context chips](#context-retrieva ## LLM selection -Cody offers a variety of large language models (LLMs) to power your chat experience. Cody Free users can access the latest base models from Anthropic, OpenAI, Google. At the same time, Cody Pro and Enterprise users can access more extended models. +Cody offers a variety of large language models (LLMs) to power your chat experience.You can access the latest base models from Anthropic, OpenAI, Google. You can read more about it in our [Supported LLM models docs](/cody/capabilities/supported-models). @@ -7481,8 +7165,6 @@ Cody for Visual Studio supports single and multi-line autocompletions. The autoc -Advanced features like [auto-edit](/cody/capabilities/auto-edit) are not yet supported. To disable the autocomplete feature, you can do it from your Cody settings section. -
@@ -7609,13 +7291,13 @@ The `sg.nvim` extension also supports pre-built reusable prompts for Cody called The Cody plugin by Sourcegraph enhances your coding experience in your IDE by providing intelligent code suggestions, context-aware completions, and advanced code analysis. This guide will walk you through the steps to install and set up Cody within your JetBrains environment. - + ## Prerequisites - You have the latest version of JetBrains IDEs installed -- You have a Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account +- A Sourcegraph Enterprise account with Cody enabled - Cody is compatible with the following JetBrains IDEs: - [Android Studio](https://developer.android.com/studio) - [AppCode](https://www.jetbrains.com/objc/) @@ -7645,14 +7327,6 @@ Alternatively, you can also [download and install the plugin from the JetBrains After a successful installation, the Cody icon appears in the Tool Windows Bar. -### Cody Free or Cody Pro Users - -Cody Free and Pro users can sign in to their Sourcegraph.com accounts using SSO through GitHub, GitLab, or Google. - -![cody-for-intellij-login](https://storage.googleapis.com/sourcegraph-assets/Docs/sign-in-cody-jb-2025.jpg) - -### Sourcegraph Enterprise Cody Users - Sourcegraph Enterprise users should connect Cody to their Enterprise instance by clicking **Sign in with an Enterprise Instance**. To connect the plugin with your Enterprise instance, @@ -7698,13 +7372,9 @@ Since your first message to Cody anchors the conversation, you can return to the Users must be on JetBrains v2023.2 and Cody plugin v7.0.0 or above to get the new and improved chat UI. -### Chat History - -A chat history icon at the top of your chat input window allows you to navigate between chats (and search chats) without opening the Cody sidebar. - ### Changing LLM model for chat - You need to be a Cody Free or Pro user to have multi-model selection capability. You can view which LLMs you can access on our [supported LLMs page](/cody/capabilities/supported-models). Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. +You can view which LLMs you can access on our [supported LLMs page](/cody/capabilities/supported-models). Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. For Chat: @@ -7719,7 +7389,7 @@ For Edit: - Select the default model available - See the selection of models and click the model you desire. This model will now be the default model for any new edits -### Selecting Context with @-mentions +### Selecting context with @-mentions Cody's chat allows you to add files as context in your messages. @@ -7753,17 +7423,13 @@ If Cody's answer isn't helpful, you can try asking again with a different contex ![jb-rerun-context](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-rerun-context-2025.png) -## Context fetching mechanism - -JetBrains users on the Free or Pro plan use [local context](/cody/core-concepts/context#context-sources). +## Context fetching mechanism and sources Enterprise users can leverage the full power of the Sourcegraph search engine as Cody's primary context provider. Read more about [Context fetching mechanisms](/cody/core-concepts/context/#context-fetching-mechanism) in detail. -## Context sources -You can @-mention files and web pages in Cody. Cody Enterprise also supports @-mentioning repositories to search for context in a broader scope. -Cody Free and Pro offer single-repo context, and Cody Enterprise supports multi-repo context. +You can @-mention files and web pages in Cody. Cody Enterprise also supports @-mentioning multi-repo context to search in a broader scope. ### Cody Context Filters @@ -7775,28 +7441,6 @@ For repos mentioned in the `exclude` field, Cody prompts are disabled, and you c [Read more about Cody Context Filters here →](/cody/capabilities/ignore-context) -## Autocomplete - -Cody provides multi-line autocomplete as you type. Autocomplete suggestions appear as inlay suggestions and are enabled by default in your JetBrains IDE. This setting lists the programming languages supported and enabled by default. - -To manually configure the Autocomplete feature, - -- Go to the **Cody Settings...** from the Cody icon in the sidebar -- Next, click the **Sourcegraph & Cody** dropdown and select **Cody** -- The **Autocomplete** settings will appear with the list of **Enabled Languages** - -Autocomplete suggestions use the same color as inline parameter hints according to your configured editor theme. However, you can optionally enable the **Custom color for completions** checkbox to customize the color of your choice. - -In addition, you can use the following keyboard shortcuts to interact with Cody's autocomplete suggestions: - -- `Tab` to accept a suggestion -- `Alt + [` (Windows) or `Opt + [` (macOS) to cycle suggestions -- `Alt + \` (Windows) or `Opt + \` (macOS) to manually trigger autocomplete if no suggestions have been returned - - - ## Prompts Cody allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. @@ -7830,28 +7474,11 @@ Cody with JetBrains can also propose fixes and updates to errors in your code. T All you need to do is select and highlight the code line with the error and click the lightbulb icon. Then select **Ask Cody to Fix**. You can then view the diff and accept or undo the suggested change. -## Updating the plugin - -JetBrains IDEs will typically notify you when updates are available for installed plugins. Follow the prompts to update the Cody AI plugin to the latest version. - -## Change the update channel for stable or nightly releases - -Our nightly release channel gets updated much more frequently, which might help verify bug fixes that will be included in the next stable release. -To update your update channel, you can do the following: - -1. Open your JetBrains IDE settings by selecting **IDE Name | Settings** on macOS or **File | Settings** on Windows and Linux from the main menu. -1. Get to the Cody Settings by navigating to `Tools -> Sourcegraph & Cody` -1. Under the update channel, select `Stable` or `Nightly` - ## Supported LLM models -Cody Free and Pro users can choose from a list of supported LLM models for chat. - -![llm-selection-cody](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-llm-select-2025.png) - Enterprise users who have [model configuration](/Cody/clients/model-configuration#model-configuration) configured can also select from the available models for their instance. On instances with the ["completions" configuration](/Cody/clients/model-configuration#completions-configuration), a site admin determines the LLM, which cannot be changed within the editor. -Read and learn more about the [supported LLMs](/cody/capabilities/supported-models) and [token limits](/cody/core-concepts/token-limits) on Cody Free, Pro and Enterprise. +Read and learn more about the [supported LLMs](/cody/capabilities/supported-models) and [token limits](/cody/core-concepts/token-limits). ## Add/remove account @@ -7868,93 +7495,20 @@ Alternatively, you can also manage multiple accounts in Cody Settings: 1. Under authentication, see the accounts that are currently logged in 1. To remove, select your account and hit `-`. To add click `+` and choose the appropriate login method -## Find Cody features - -You can find and discover all Cody features and actions using the **Search Everywhere** option in JetBrains IDEs. Press `Shift` twice to open the `Search Everywhere` window. Then, type in the `Cody:` prefix to get a list of all supported Cody actions. - -![search-everywhere](https://storage.googleapis.com/sourcegraph-assets/Docs/search-everywhere-cody.png) - - - - -# Installing Cody in Eclipse - -

Learn how to use Cody and its features with the Eclipse editor.

- -Cody for Eclipse is currently in the Experimental stage and supports only chat. It is compatible with Eclipse version 2024-03 (4.31.0) and runs on Windows 11. The support is also limited feel free to contact us for any questions or feedback. - -Cody extension for Eclipse enhances your coding experience by providing intelligent and contextually aware answers to your questions. This guide will walk you through installing and setting Cody within your Eclipse editor. - - - - - -## Prerequisites - -- You have the correct version of [Eclipse](https://www.eclipse.org/downloads/packages/release/2024-03/r) IDE installed -- You have a Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account - -## Install the Eclipse extension - -- Inside Eclipse, go to **Help > Install New Software** -- Next, add the site URL `https://sourcegraph.github.io/eclipse` -- After adding this URL, you should see the **Cody** category in the list of available plugins - -![add-eclispe-extension](https://storage.googleapis.com/sourcegraph-assets/Docs/add-eclipse-url-1124.png) - -- Click **Next** and follow the installation instructions -- After you have completed the installation and restarted Eclipse, you should see the **Cody** view in the **Window > Show View > Other** menu - -![eclipse-cody-view](https://storage.googleapis.com/sourcegraph-assets/Docs/eclipse-cody-view-1124.png) - -## Connect the extension to Sourcegraph - -Cody for Eclipse is available for all Cody plans, including Cody Free, Pro, and Enterprise. - -After a successful installation, open the **Cody** view. You should see a button to sign into your Sourcegraph account. - -![eclipse-cody-sign-in](https://storage.googleapis.com/sourcegraph-assets/Docs/eclispe-signin-sourcegraph-1124-2.png) - -Cody Free or Pro users can sign in to their Sourcegraph.com accounts. Meanwhile, Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token. - -Complete these steps, and you'll be ready to use Cody chat in Eclipse. - -## Chat - -Cody in Eclipse allows you to ask questions about your code and get contextually aware answers. The chat window is available in a unified interface next to your code. All your previous and existing chats are stored for later use and can be accessed via the **History** icon from the top menu. You can download them to share or use later in a `.json` file or delete them. - -The chat input field has a default `@-mention` [context chips](#context-retrieval). These are automatically populated with the names of the files you have open in your editor. There is also a drop-down for [LLM selection](#llm-selection) and a button to run pre-built [prompts](#prompts). - -![cody-eclipse-chat](https://storage.googleapis.com/sourcegraph-assets/Docs/eclipse-cody-chat-1124.png) - -## LLM selection - -Cody offers a variety of large language models (LLMs) to power your chat experience. Cody Free users can access the latest base models from Anthropic, OpenAI, Google. At the same time, Cody Pro and Enterprise users can access more extended models. - -You can read more about it in our [Supported LLM models docs](/cody/capabilities/supported-models). - -## Selecting Context with @-mentions - -Cody's chat allows you to [add files and symbols as context](/cody/core-concepts/context) in your messages. - -- Type `@-file` and then a filename to include a file as a context -- Type `@#` and then a symbol name to include the symbol's definition as context. Functions, methods, classes, types, etc., are all symbols - -### Context retrieval - -When you start a new Cody chat, the chat input window opens with a default `@-mention` context chips for all the context it intends to use. This context is based on your current repository and current file (or a file selection if you have code highlighted). - -At any point in time, you can edit these context chips or remove them completely if you do not want to use these as context. Any chat without a context chip will instruct Cody to use no codebase context. However, you can always provide an alternate `@-mention` file or symbols to let Cody use it as a new context source. +## Change the update channel for stable or nightly releases -When you have both a repository and files @-mentioned, Cody will search the repository for context while prioritizing the mentioned files. +Our nightly release channel gets updated much more frequently, which might help verify bug fixes that will be included in the next stable release. +To update your update channel, you can do the following: -## Prompts +1. Open your JetBrains IDE settings by selecting **IDE Name | Settings** on macOS or **File | Settings** on Windows and Linux from the main menu. +1. Get to the Cody Settings by navigating to `Tools -> Sourcegraph & Cody` +1. Under the update channel, select `Stable` or `Nightly` -Cody offers a variety of [pre-built prompts](/cody/capabilities/commands) to help you get the most out of your chat experience. You can access these prompts from the chat input field. +## Find Cody features -## Feedback +You can find and discover all Cody features and actions using the **Search Everywhere** option in JetBrains IDEs. Press `Shift` twice to open the `Search Everywhere` window. Then, type in the `Cody:` prefix to get a list of all supported Cody actions. -While Cody for Eclipse is currently in the experimental stage, we are open to feedback [in our forum](https://community.sourcegraph.com/c/cody/eclipse/13). +![search-everywhere](https://storage.googleapis.com/sourcegraph-assets/Docs/search-everywhere-cody.png)
@@ -8177,9 +7731,9 @@ git diff | cody chat -m 'Write a commit message for this diff' -

There are multiple ways to use Cody: you can install its extension in your favorite IDEs, access it via the Sourcegraph web app, or use it through the Cody CLI.

- - - + + + @@ -8194,26 +7748,29 @@ git diff | cody chat -m 'Write a commit message for this diff' - ## Chat -| **Feature** | **VS Code** | **JetBrains** | **Visual Studio** | **Web** | **CLI** | -| ---------------------------------------- | ----------- | ------------- | ----------------- | -------------------- | ------- | -| Chat | ✅ | ✅ | ✅ | ✅ | ✅ | -| Chat history | ✅ | ✅ | ✅ | ✅ | ❌ | -| Clear chat history | ✅ | ✅ | ✅ | ✅ | ❌ | -| Edit sent messages | ✅ | ✅ | ✅ | ✅ | ❌ | -| SmartApply/Execute | ✅ | ❌ | ❌ | ❌ | ❌ | -| Show context files | ✅ | ✅ | ✅ | ✅ | ❌ | -| @-file | ✅ | ✅ | ✅ | ✅ | ❌ | -| @-symbol | ✅ | ❌ | ✅ | ✅ | ❌ | -| LLM Selection | ✅ | ✅ | ✅ | ✅ | ❌ | -| Agentic Context Fetching | ✅ | ✅ | ✅ | ✅ | ✅ | -| **Context Selection** | | | | | | -| Single-repo context | ✅ | ✅ | ✅ | ✅ | ❌ | -| Multi-repo context | ❌ | ❌ | ❌ | ✅ (public code only) | ❌ | -| Local context | ✅ | ✅ | ✅ | ❌ | ✅ | -| OpenCtx context providers (experimental) | ✅ | ❌ | ❌ | ❌ | ❌ | -| **Prompts** | | | | | | -| Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ | -| Promoted Prompts | ✅ | ❌ | ❌ | ✅ | ❌ | +| **Feature** | **VS Code** | **JetBrains** | **Visual Studio** | **Web** | **CLI** | +| ------------------------------------ | ----------- | ------------- | ----------------- | ------- | ------- | +| Chat | ✅ | ✅ | ✅ | ✅ | ✅ | +| Chat history | ✅ | ✅ | ✅ | ✅ | ❌ | +| Clear chat history | ✅ | ✅ | ✅ | ✅ | ❌ | +| Edit sent messages | ✅ | ✅ | ✅ | ✅ | ❌ | +| SmartApply/Execute | ✅ | ❌ | ❌ | ❌ | ❌ | +| Show context files | ✅ | ✅ | ✅ | ✅ | ❌ | +| @-file | ✅ | ✅ | ✅ | ✅ | ❌ | +| @-symbol | ✅ | ❌ | ✅ | ✅ | ❌ | +| @-directories | ✅ | ✅ | ✅ | ✅ | ❌ | +| LLM Selection | ✅ | ✅ | ✅ | ✅ | ❌ | +| Admin LLM Selection | ✅ | ✅ | ✅ | ✅ | ❌ | +| Agentic Context Fetching | ✅ | ✅ | ✅ | ✅ | ✅ | +| **Context Selection** | | | | | | +| Single-repo context | ✅ | ✅ | ✅ | ✅ | ❌ | +| Multi-repo context | ✅ | ✅ | ✅ | ✅ | ❌ | +| Local context | ✅ | ✅ | ✅ | ❌ | ✅ | +| Guardrails | ✅ | ✅ | ❌ | ✅ | ❌ | +| Repo-based context filters | ✅ | ✅ | ✅ | ✅ | ✅ | +| **Prompts** | | | | | | +| Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ | +| Promoted Prompts | ✅ | ❌ | ❌ | ✅ | ❌ | ## Code Autocomplete and Auto-edit @@ -8223,24 +7780,7 @@ git diff | cody chat -m 'Write a commit message for this diff' - | Cycle through multiple completion suggestions | ✅ | ✅ | ✅ | | Accept suggestions word-by-word | ✅ | ❌ | ❌ | | Auto-edit suggestions via cursor movements and typing | ✅ | ✅ | ❌ | - -Few exceptions that apply to Cody Pro and Cody Enterprise users: - - - -- Multi-repo context is not supported in VS Code, JetBrains, or the Web UI for Cody Pro - - - - - -- Admin LLM selection is suported on VS Code, JetBrains, Visual Studio, and Web both for chat and code autocomplete -- Multi-repo context is supported on VS Code, JetBrains, Visual Studio, and Web -- [Guardrails](/cody/clients/enable-cody-enterprise#guardrails) are supported on VS Code, JetBrains, and Web -- [Repo-based Cody Context Filters](/cody/capabilities/ignore-context#cody-context-filters) are supported on all Cody clients. -- `@-mention` directories are supported on VS Code, JetBrains, Visual Studio, and Web - - +| Admin LLM selection | ✅ | ✅ | ✅ | @@ -8368,36 +7908,34 @@ There are two ways of configuring Cody for LLM providers: # Cody for Web -

Learn how to use Cody in the web interface with your Sourcegraph.com instance.

+

Learn how to use Cody in the web interface with your Sourcegraph.com Enterprise instance.

-In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), and [Visual Studio](/cody/clients/install-visual-studio ) IDEs, Cody is also available in the Sourcegraph web app. Community users can use Cody for free by logging into their accounts on Sourcegraph.com, and enterprise users can use Cody within their Sourcegraph instance. +In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), and [Visual Studio](/cody/clients/install-visual-studio ) IDEs, Cody is also available in the Sourcegraph web app. - + ## Initial setup -Create a [Sourcegraph.com account](https://sourcegraph.com/sign-up) by logging in through codehosts like GitHub and GitLab or via traditional Google sign-in. This takes you to Sourcegraph’s web interface. From here, there are two ways to access the Cody chat: +Log in to your Sourcegraph.com Enterprise instance through codehosts like GitHub and GitLab or via traditional Google sign-in. This takes you to Sourcegraph’s web interface. From here, there are two ways to access the Cody chat: -1. Run any search query via **Code Search** and click the **Cody** button on the left to open the chat window +1. Run any search query via **Code Search** and click the **Cody** button on the right to open the chat window 2. Directly click the **Chat** tab from the top header to open the chat interface ![cody-web](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-2025.png) -Enterprise users can also log in to their Sourcegraph.com Enterprise instance and use Cody in the web interface. - ## Chat interface -The Cody chat interface for the web is similar to the one you get with the IDE extensions. However, the chat experience is slightly different depending on whether you use Cody with your search query results or directly from the top header. +The Cody chat interface for the web is similar to the one you get with the IDE extensions. However, the chat experience is slightly different depending on whether you use Cody with your search query results or directly from the top Chat header. -The chat interface with your Code Search queries opens parallel to your query search results, similar to the chat window in the IDE extensions. However, when you click **Cody** from the top header in your Sourcegraph.com instance, the chat interface opens on a new page. +The chat interface with your Code Search queries opens parallel to your query search results, similar to the chat window in the IDE extensions. However, when you click **Chat** from the top header in your Sourcegraph.com Enterprise instance, the chat interface opens on a new page. The new and improved chat UI for Cody for the web is currently available to users on Sourcegraph versions >=5.5. To use this new chat interface, you should update your Sourcegraph instance to the latest version. ## Chat with Cody on the web interface -The feature set for the Cody chat is the same as the IDE extensions. Your previous chats can be viewed from the **History** tab. Claude 3.5 Sonnet (New) is selected as the default chat model. You can change this LLM model based on your use case to optimize speed, accuracy, or cost. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). +The feature set for the Cody chat is the same as the IDE extensions. Your previous chats can be viewed from the **History** tab. Claude 3.5 Sonnet is selected as the default chat model. You can change this LLM model based on your use case to optimize speed, accuracy, or cost. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). To help you automate your key tasks in your development workflow, you get **[Prompts](/cody/capabilities/commands)**. If you are a part of an organization on Sourcegraph.com or a self-hosted Sourcegraph instance, you can view these pre-built Prompts created by your teammates. On the contrary, you can create your Prompts via the **Prompt Library** from your Sourcegraph instance. @@ -8441,30 +7979,30 @@ Cody supports a variety of cutting-edge large language models for use in chat an Newer versions of Sourcegraph Enterprise, starting from v5.6, it will be even easier to add support for new models and providers, see [Model Configuration](/cody/enterprise/model-configuration) for more information. -| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | | -| :------------ | :-------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :----------- | :------------- | --- | --- | --- | --- | -| OpenAI | [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo#:~:text=TRAINING%20DATA-,gpt%2D4%2D0125%2Dpreview,-New%20GPT%2D4) | - | ✅ | ✅ | | | | | -| OpenAI | [GPT-4o](https://platform.openai.com/docs/models#gpt-4o) | - | ✅ | ✅ | | | | | -| OpenAI | [GPT-4o-mini](https://platform.openai.com/docs/models#gpt-4o-mini) | ✅ | ✅ | ✅ | | | | | -| OpenAI | [o3-mini-medium](https://openai.com/index/openai-o3-mini/) (experimental) | ✅ | ✅ | ✅ | | | | | -| OpenAI | [o3-mini-high](https://openai.com/index/openai-o3-mini/) (experimental) | - | - | ✅ | | | | | -| OpenAI | [o3](https://platform.openai.com/docs/models#o3) | - | ✅ | ✅ | | | | | -| OpenAI | [o4-mini](https://platform.openai.com/docs/models/o4-mini) | ✅ | ✅ | ✅ | | | | | -| OpenAI | [GPT-4.1](https://platform.openai.com/docs/models/gpt-4.1) | - | ✅ | ✅ | | | | | -| OpenAI | [GPT-4.1-mini](https://platform.openai.com/docs/models/gpt-4o-mini) | ✅ | ✅ | ✅ | | | | | -| OpenAI | [GPT-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) | ✅ | ✅ | ✅ | | | | | -| Anthropic | [Claude 3.5 Haiku](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | ✅ | ✅ | | | | | -| Anthropic | [Claude 3.5 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | ✅ | ✅ | | | | | -| Anthropic | [Claude 3.7 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - | ✅ | ✅ | | | | | -| Anthropic | [Claude Sonnet 4](https://docs.anthropic.com/en/docs/about-claude/models/overview) | ✅ | ✅ | ✅ | | | | | -| Anthropic | [Claude Sonnet 4 w/Thinking](https://docs.anthropic.com/en/docs/about-claude/models/overview) | - | ✅ | ✅ | | | | | -| Anthropic | [Claude Opus 4](https://docs.anthropic.com/en/docs/about-claude/models/overview) | - | - | ✅ | | | | | -| Anthropic | [Claude Opus 4 w/Thinking](https://docs.anthropic.com/en/docs/about-claude/models/overview) | - | - | ✅ | | | | | -| Google | [Gemini 1.5 Pro](https://deepmind.google/technologies/gemini/pro/) | ✅ | ✅ | ✅ (beta) | | | | | -| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | ✅ | ✅ | ✅ | | | | | -| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | ✅ | ✅ | ✅ | | | | | -| Google | [Gemini 2.5 Pro Preview](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-pro) | - | ✅ | ✅ | | | | | -| Google | [Gemini 2.5 Flash Preview](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash) (experimental) | ✅ | ✅ | ✅ | | | | | +| **Provider** | **Model** | **Status** | +| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | +| OpenAI | [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo#:~:text=TRAINING%20DATA-,gpt%2D4%2D0125%2Dpreview,-New%20GPT%2D4) | ✅ | +| OpenAI | [GPT-4o](https://platform.openai.com/docs/models#gpt-4o) | ✅ | +| OpenAI | [GPT-4o-mini](https://platform.openai.com/docs/models#gpt-4o-mini) | ✅ | +| OpenAI | [o3-mini-medium](https://openai.com/index/openai-o3-mini/) | ✅ (experimental) | +| OpenAI | [o3-mini-high](https://openai.com/index/openai-o3-mini/) | ✅ (experimental) | +| OpenAI | [o3](https://platform.openai.com/docs/models#o3) | ✅ | +| OpenAI | [o4-mini](https://platform.openai.com/docs/models/o4-mini) | ✅ | +| OpenAI | [GPT-4.1](https://platform.openai.com/docs/models/gpt-4.1) | ✅ | +| OpenAI | [GPT-4.1-mini](https://platform.openai.com/docs/models/gpt-4o-mini) | ✅ | +| OpenAI | [GPT-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) | ✅ | +| Anthropic | [Claude 3.5 Haiku](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | +| Anthropic | [Claude 3.5 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | +| Anthropic | [Claude 3.7 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | +| Anthropic | [Claude Sonnet 4](https://docs.anthropic.com/en/docs/about-claude/models/overview) | ✅ | +| Anthropic | [Claude Sonnet 4 w/ Thinking](https://docs.anthropic.com/en/docs/about-claude/models/overview) | ✅ | +| Anthropic | [Claude Opus 4](https://docs.anthropic.com/en/docs/about-claude/models/overview) | ✅ | +| Anthropic | [Claude Opus 4 w/ Thinking](https://docs.anthropic.com/en/docs/about-claude/models/overview) | ✅ | +| Google | [Gemini 1.5 Pro](https://deepmind.google/technologies/gemini/pro/) | ✅ (beta) | +| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | ✅ | +| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | ✅ | +| Google | [Gemini 2.5 Pro Preview](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-pro) | ✅ | +| Google | [Gemini 2.5 Flash Preview](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash) | ✅ (experimental) | To use Claude 3 Sonnet models with Cody Enterprise, make sure you've upgraded your Sourcegraph instance to the latest version. @@ -8484,129 +8022,28 @@ See [Model Configuration: Reasoning models](/cody/enterprise/model-configuration Cody uses a set of models for autocomplete which are suited for the low latency use case. -| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | | -| :----------- | :---------------------------------------------------------------------------------------- | :------- | :------ | :------------- | --- | --- | --- | --- | -| Fireworks.ai | [DeepSeek-Coder-V2](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct) | ✅ | ✅ | ✅ | | | | | -| Anthropic | [claude Instant](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - | - | ✅ | | | | | -| | | | | | | | | | +| **Provider** | **Model** | **Status** | +| :----------- | :---------------------------------------------------------------------------------------- | :------------- | +| Fireworks.ai | [DeepSeek-Coder-V2](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct) | ✅ | +| Anthropic | [claude Instant](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | ✅ | + -The default autocomplete model for Cody Free, Pro and Enterprise users is DeepSeek-Coder-V2. +The default autocomplete model for Enterprise users is DeepSeek-Coder-V2. The DeepSeek model used by Sourcegraph is hosted by Fireworks.ai, and is hosted as a single-tenant service in a US-based data center. For more information see our [Cody FAQ](https://sourcegraph.com/docs/cody/faq#is-any-of-my-data-sent-to-deepseek). ## Smart Apply -| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | | | | -| :----------- | :------------- | :------- | :------ | :------------- | --- | --- | --- | --- | --- | --- | -| Fireworks.ai | Qwen 2.5 Coder | ✅ | ✅ | ✅ | | | | | | | - -Fireworks.ai is the default model for cody-gateway, but if you wish to switch to Claude models, Site admins can do it following these steps- - -Go to "Site admin" - -Click on the "Feature flags" - -Search for cody-smart-apply-instant-mode-enabled feature flag - -Turn off/delete the "cody-smart-apply-instant-mode-enabled" feature flag - -
- - -# Chat Query Types - -

This page lists all the query types that will return search results with the Sourcegraph chat.

- -Query types are only supported on Enterprise Starter and Enterprise plans. - -## Symbol Search - -Symbol Search is a query type or workflow that helps developers understand how specific symbols (like functions, variables, or hooks) are used across a codebase by combining search results with contextual analysis through chat. - -It enables developers to explore and understand symbol usage patterns through a two-step process. First, developers search for a specific symbol (like `useCallback`) using Sourcegraph Chat, which returns relevant code snippets from across the codebase. - -These search results are automatically preserved as context for follow-up chat interactions. Developers can refine their understanding by selecting specific search results and asking natural language questions about the symbol's usage patterns. The chat will analyze the selected code context and provide a comprehensive summary of how the symbol is implemented and used throughout the codebase. - -### Try it - -1. Query for `= useCallback` -2. Select a subset of the search results which include usage for `useCallback` -3. Follow up and ask Sourcegraph chat `Summarize how useCallback is used` - -### Example - - - -## File Search - -Search is a query type or workflow that enables users to locate specific files across repositories and perform targeted analysis on the selected files through natural language follow-up queries. +| **Provider** | **Model** | **Status** | +| :----------- | :------------- | :--------- | +| Fireworks.ai | Qwen 2.5 Coder | ✅ | -File Search simplifies finding and analyzing specific file types across your codebase. Unlike traditional code search, this workflow allows you to identify relevant files (for example, all `package.json` files), select the specific files you want to analyze, and then ask follow-up questions about the selected files. +Fireworks.ai is the default model for cody-gateway, but if you wish to switch to Claude models, Site admins can do it following these steps: -This two-step approach is particularly powerful when analyzing patterns or extracting information from similar files spread across multiple repositories. For instance, you could identify all configuration files, select the ones from relevant services, and then analyze their contents for inconsistencies or gather specific information through natural language queries. - -### Try it - -1. Type `package.json` -2. Check the checkbox next to the results you want to analyze -3. Follow up with `List all the dependencies used across these package.json files` - -### Example - - - -## String Literal Search - -String literal search is a query type or workflow that allows you to find exact text matches by enclosing your search term in quotes. This ensures precise matching instead of keyword-based results. - -When you enclose the text in quotes like `" authInfo: async provider =>"",` Sourcegraph performs an exact match search rather than keyword matching. After finding relevant files, you can select specific ones to analyze and ask follow-up questions about their contents - creating an interactive workflow combining precise search and contextual code analysis. - -### Try it - -1. Start a new chat with `"authInfo: async provider =>"` -2. Select a subset of the search results which include usage for the string -3. Follow up with `Summarize the contents` - -### Example - - - -## Error Lookups - -Error Lookups is a conversational workflow for Sourcegraph chat that helps developers understand error messages by providing plain-English explanations of when and why specific errors occur in their codebase and external service calls. - -Developers can use Error Lookups to understand error messages occurring in their codebase. When encountering an error, especially from external services or dependencies, developers can use chat to: - -1. Search for specific error messages across their codebase -2. Select relevant files where the error is thrown or handled -3. Request a natural language explanation of the error's context, triggers, and implications - -The workflow combines Sourcegraph's code search capabilities with AI-powered analysis to provide developers with a clear, contextual understanding of error scenarios. Instead of having to dig through docs or source code manually, developers can quickly grasp the following: - -* The specific conditions that trigger the error -* The underlying reasons for the error occurrence -* Common scenarios where this error might appear -* Potential approaches to handling or preventing the error - -This approach helps developers make more informed decisions about error handling and debugging, reducing the time spent deciphering cryptic error messages or searching through external docs. - -### Try it - -* Query for `"unsupported platform"` -* Select the file(s) where the error is thrown -* Follow up with "Explain when and why this error is thrown" - -### Demo - - +- Go to **Site admin** +- Click on the **Feature flags** +- Search for `cody-smart-apply-instant-mode-enabled` feature flag +- Turn off/delete the **cody-smart-apply-instant-mode-enabled** feature flag
@@ -8757,18 +8194,18 @@ Please get in touch with the Cody support team if you need further assistance wi

Learn how prompts can automate and accelerate your workflow with Cody.

-Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the top navigation bar in the Sourcegraph.com instance. +Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the top navigation bar in your Sourcegraph Enterprise instance. To run Prompts and access Prompt Library, you must have the following: -- Free account on Sourcegraph.com or Sourcegraph Enterprise instance with Cody enabled +- A Sourcegraph Enterprise account with Cody enabled - Cody extension installed in your IDE (VS Code, JetBrains, Visual Studio) ## Prompt Library The **Prompt Library** allows you to create, edit, share, and save prompts you’ve created or shared within your organization. You can also search for prompts, filter the list to find a specific prompt by the owner, and sort by name or updated recently. -Go to **Tools > Prompt Library** from the top navigation bar in the Sourcegraph.com instance. Alternatively, you can access the **Prompt Library** from the **Cody** extension in your IDE, which directs you to the Prompt Library page. +Go to **Prompts** from the top navigation bar in your Sourcegraph Enterprise instance. Alternatively, you can access the **Prompt Library** from the **Cody** extension in your IDE, which directs you to the Prompt Library page. Here, you can view all prompts (shared with you in an organization or created by you) and some core (built-in) prompts to help you get started. @@ -8787,7 +8224,7 @@ You can run these prompts by clicking the **play** icon next to the prompt name, ## Create prompts -Click the **New prompt** button from the **Prompt Library** page. +Click the **Create new prompt** button from the **Prompt Library** page. - Select the **Owner** and **Prompt Name** - Write a prompt description @@ -8901,16 +8338,7 @@ Once migrated, you can run it like any other prompt. However, you **cannot** edi MCP is the recommended method for adding external context in Cody due to its broad community adoption and extensive tool support. [Read the docs](/cody/capabilities/agentic-context-fetching#mcp-support) to learn more about configuring MCP. -[OpenCtx](https://openctx.org/) is an open standard for bringing contextual info about code into your dev tools. OpenCtx context providers are in the Experimental stage for all Cody users. Enterprise users can use this, but with limited support. Cody Free and Pro users can use OpenCtx providers to fetch and use context from the following sources: - -- [Webpages (via URL)](https://openctx.org/docs/providers/web) (enabled in Cody by default) -- [Jira tickets](https://openctx.org/docs/providers/jira) -- [Linear issues](https://openctx.org/docs/providers/linear-issues) -- [Notion pages](https://openctx.org/docs/providers/notion) -- [Google Docs](https://openctx.org/docs/providers/google-docs) -- [Slack](https://openctx.org/docs/providers/slack) -- [Storybook](https://openctx.org/docs/providers/storybook) -- [Sourcegraph code search](https://openctx.org/docs/providers/sourcegraph-search) +[OpenCtx](https://openctx.org/) is an open standard for bringing contextual info about code into your dev tools. OpenCtx context providers are in the Experimental stage for Enterprise users with limited support. ## Enable OpenCtx context providers @@ -9002,11 +8430,11 @@ You still have the option to switch to your Sourcegraph account whenever you wan - + - + @@ -9019,9 +8447,7 @@ You still have the option to switch to your Sourcegraph account whenever you wan # Manage Cody Context -

You can control and manage what context from your codebase is used by Cody. You can do this by using Cody Context Filters.

- -Cody Context Filters is available only for Enterprise users on all supported [clients](/cody/clients). +

You can control and manage what context from your codebase is used by Cody. You can do this by using Cody Context Filters. It is supported on all Cody [clients](/cody/clients).

## Context Filters @@ -9157,7 +8583,7 @@ Depending on the client type, here's a breakdown of versions supported and the b

Learn how Cody helps you identify errors in your code and provides code fixes.

-Cody is optimized to identify and fix errors in your code. Its debugging capability and autocomplete suggestions can significantly accelerate your debugging process, increasing developer productivity. All Cody IDE extensions (VS Code, JetBrains) support code debugging and fixes capabilities. +Cody is optimized to identify and fix errors in your code. Its debugging capability and autocomplete suggestions can significantly accelerate your debugging process, increasing developer productivity. Cody IDE extensions (VS Code, JetBrains) support code debugging and fixes capabilities. ## Use chat for code fixes @@ -9188,8 +8614,6 @@ You can detect code smells by the **find-code-smells** prompt from the Prompts d ## Code Actions -Code Actions are available only in Cody VS Code extension. - When you make a mistake while writing code, Cody's **Code Actions** come into play and a red warning triggers. Along with this, you get a lightbulb icon. If you click on this lightbulb icon, there is an **Ask Cody to fix** option. - Click the lightbulb icon in the project file @@ -9203,10 +8627,8 @@ When you make a mistake while writing code, Cody's **Code Actions** come into pl # Chat -

Chat with the AI assistant in your code editor or via the Sourcegraph web app to get intelligent suggestions, code autocompletions, and contextually aware answers.

+

Chat with Cody in your code editor or via the Sourcegraph web app to get intelligent suggestions, code autocompletions, and contextually aware answers.

- - You can **chat** with Cody to ask questions about your code, generate code, and edit code. By default, Cody has the context of your open file and entire repository, and you can use `@` to add context for specific files, symbols, remote repositories, or other non-code artifacts. You can do it from the **chat** panel of the supported editor extensions ([VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), [Visual Studio](/cody/clients/install-visual-studio)) or in the [web](/cody/clients/cody-with-sourcegraph) app. @@ -9215,8 +8637,8 @@ You can do it from the **chat** panel of the supported editor extensions ([VS Co To use Cody's chat, you'll need the following: -- [Sourcegraph Enterprise Starter](https://sourcegraph.com/pricing) or [Enterprise account](https://sourcegraph.com/pricing) -- A supported editor extension [VS Code](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai), [JetBrains](https://plugins.jetbrains.com/plugin/9682-cody-ai-coding-assistant-with-autocomplete--chat) installed or use via Web app +- A Sourcegraph Enterprise account with Cody enabled +- A supported editor extension installed or use via the Sourcegraph Web app ## How does chat work? @@ -9246,29 +8668,12 @@ When you have both a repository and files @-mentioned, Cody will search the repo You can add new custom context by adding `@-mention` context chips to the chat. At any point, you can use `@-mention` a repository, file, line range, or symbol, to ask questions about your codebase. Cody will use this new context to generate contextually relevant code. -## OpenCtx context providers - -OpenCtx context providers are in the Experimental stage for all Cody VS Code users. Enterprise users can also use this but with limited support. If you have feedback or questions, please visit our [support forum](https://community.sourcegraph.com/c/openctx/10). - -[OpenCtx](https://openctx.org/) is an open standard for bringing contextual info about code into your dev tools. Cody Free and Pro users can use OpenCtx providers to fetch and use context from the following sources: - -- [Webpages](https://openctx.org/docs/providers/web) (via URL) -- [Jira tickets](https://openctx.org/docs/providers/jira) -- [Linear issues](https://openctx.org/docs/providers/linear-issues) -- [Notion pages](https://openctx.org/docs/providers/notion) -- [Google Docs](https://openctx.org/docs/providers/google-docs) -- [Sourcegraph code search](https://openctx.org/docs/providers/sourcegraph-search) - -You can use `@-mention` web URLs to pull live information like docs. You can connect Cody to OpenCtx to `@-mention` non-code artifacts like Google Docs, Notion pages, Jira tickets, and Linear issues. - ## LLM selection -Cody allows you to select the LLM you want to use for your chat, which is optimized for speed versus accuracy. Cody Free and Pro users can select multiple models. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. +Cody allows you to select the LLM you want to use for your chat, which is optimized for speed versus accuracy. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). -![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-free-pro-2025.png) - ## Smart Apply and Execute code suggestions Cody lets you dynamically insert code from chat into your files with **Smart Apply**. Whenever Cody provides a code suggestion, you can click the **Apply** button. Cody will then analyze your open code file, find where that relevant code should live, and add a diff. For chat messages where Cody provides multiple code suggestions, you can apply each in sequence to go from chat suggestions to written code. @@ -9279,9 +8684,9 @@ Smart Apply also supports the executing of commands in the terminal. When you as ### Model used for Smart Apply -To ensure low latency, Cody uses a more targeted Qwen 2.5 Coder model for Smart Apply. This model improves the responsiveness of the Smart Apply feature in both VS Code and JetBrains while preserving edit quality. Users on Cody Free, Pro, Enterprise Starter, and Enterprise plans get this default Qwen 2.5 Coder model for Smart Apply suggestions. +To ensure low latency, Cody uses a more targeted Qwen 2.5 Coder model for Smart Apply. This model improves the responsiveness of the Smart Apply feature in both VS Code and JetBrains while preserving edit quality. -Enterprise users not using Cody Gateway get a Claude Sonnet-based model for Smart Apply. +Enterprise users on Cody Gateway get this default Qwen 2.5 Coder model for Smart Apply suggestions. Enterprise users not using Cody Gateway get a Claude Sonnet-based model for Smart Apply. ## Chat history @@ -9306,74 +8711,6 @@ If Cody's answer isn't helpful, you can try asking again with a different contex - **Public knowledge only**: Cody will not use your own code files as context; it’ll only use knowledge trained into the base model. - **Current file only**: Re-run the prompt again using the current file as context. - **Add context**: Provides @-mention context options to improve the response by explicitly including files, symbols, remote repositories, or even web pages (by URL). - - - -The enhanced chat experience input can be accessed from the chat panel of the supported editor extensions (VS Code and JetBrains) and the web app. It combines light code search, AI-powered chat, and agentic capabilities into a unified developer interface. It's designed to accelerate the entire developer workflow by providing a more intuitive and powerful way to interact with code. - -## Prerequisites - -To use Cody's chat, you'll need the following: - -- [Sourcegraph Enterprise Starter](https://sourcegraph.com/pricing) or [Enterprise account](https://sourcegraph.com/pricing) -- A supported editor extension [VS Code](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai), [JetBrains](https://plugins.jetbrains.com/plugin/9682-cody-ai-coding-assistant-with-autocomplete--chat) installed or use via Web app - -## Key features - -The enhanced chat experience includes everything in the Free plan, plus the following: - -## Smart search integration - -The smart search integration enhances Sourcegraph's chat experience by providing lightweight code search capabilities directly within the chat interface. This feature simplifies developer workflows by offering quick access to code search without leaving the chat environment. - -The integration delivers personalized search results ranked by your contribution history, with frequently accessed repositories appearing higher in results. Users can view code snippets with relevant context and open files directly in their editor. - -Search results automatically become available as context for follow-up queries, with flexible controls for selecting which results to include. While optimized for keyword-style queries and searching across a few repositories, this integration complements rather than replaces the full [Code Search](/code-search) product, which remains the recommended tool for comprehensive enterprise-wide code search. - -## Context-aware responses - -Search results generated through smart search integration can be automatically used as context for follow-up queries. Here's what happens with each scenario: - -### Search responses - -* Search results can be used directly as context for follow-up queries -* Users can select which search results to include as context using checkboxes -* By default, all search results are added as context -* A context chip shows the number of search results being used (e.g., "10 code search results") -* Users can remove the context chip if they don't want to use it for follow-ups - -### Chat responses - -Executing terminal commands for additional context is an experimental feature. - -* Performs background searches for context -* Retrieves full context from files, symbols, remote repos, and web pages -* Can execute terminal commands (with permission) for additional context -* Creates personal notes usable across chat sessions -* Pulls in [OpenCtx](/cody/capabilities/openctx) providers for additional context - -## How does chat work? - -The following is a general walkthrough of the chat experience: - -1. The user enters a query in the chat interface -2. By default a user gets a chat response for the query -3. To get integrated search results, toggle to **Run as search** from the drop-down selector or alternatively use `Cmd+Opt+Enter` (macOS) -4. For search: - - Displays ranked results with code snippets - - Shows personalized repository ordering - - Provides checkboxes to select context for follow-ups -5. For chat: - - Delivers AI-powered responses - - Can incorporate previous search results as context -6. Users can: - - Switch between search and chat modes - - Click on results to open files in their editor - - Ask follow-up questions using selected context - - Use `@` to add context for specific files, symbols, remote repositories, or other non-code artifacts - - -
@@ -9384,7 +8721,7 @@ The following is a general walkthrough of the chat experience: Cody predicts what you're trying to write before you even type it. It offers single-line and multi-line suggestions based on the provided code context, ensuring accurate autocomplete suggestions. Cody autocomplete supports a [wide range of programming languages](/cody/faq#what-programming-languages-does-cody-support) because it uses LLMs trained on broad data. -Code autocompletions are optimized for both server-side and client-side performance, ensuring seamless integration into your coding workflow. The **default** autocomplete model for Cody Free, Pro, and Enterprise users is **[DeepSeek V2](https://huggingface.co/deepseek-ai/DeepSeek-V2)**, which significantly helps boost both the responsiveness and accuracy of autocomplete. +Code autocompletions are optimized for both server-side and client-side performance, ensuring seamless integration into your coding workflow. The **default** autocomplete model for Cody Enterprise users is **[DeepSeek V2](https://huggingface.co/deepseek-ai/DeepSeek-V2)**, which significantly helps boost both the responsiveness and accuracy of autocomplete. ## Cody's autocomplete capabilities @@ -9398,10 +8735,10 @@ The autocompletion model is designed to enhance speed, accuracy, and the overall First, you'll need the following setup: -- A Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise instance +- A Sourcegraph Enterprise account with Cody enabled - A supported editor extension (VS Code, JetBrains, Visual Studio) -The autocomplete feature is enabled by default on all IDE extensions, i.e., VS Code and JetBrains. Generally, there's a checkbox in the extension settings that confirms whether the autocomplete feature is enabled or not. In addition, some autocomplete settings are optionally and explicitly supported by some IDEs. For example, JetBrains IDEs have settings that allow you to customize colors and styles of the autocomplete suggestions. +The autocomplete feature is available on all IDE extensions, i.e., VS Code, JetBrains and Visual Studio. Generally, there's a checkbox in the extension settings that confirms whether the autocomplete feature is enabled or not. In addition, some autocomplete settings are optionally and explicitly supported by some IDEs. For example, JetBrains IDEs have settings that allow you to customize colors and styles of the autocomplete suggestions. When you start typing, Cody will automatically provide suggestions and context-aware completions based on your coding patterns and the code context. These autocomplete suggestions appear as grayed text. Press the `Enter` or `Tab` to accept the suggestion. @@ -9417,8 +8754,8 @@ By default, a fully configured Sourcegraph instance picks a default LLM to gener - Go to the **Site admin** of your Sourcegraph instance - Navigate to **Configuration > Site configuration** -- Here, edit the `completionModel` option inside the `completions` -- Click the **Save** button to save the changes +- Here, edit the `modelConfiguration` [section](/cody/enterprise/model-configuration) to include the autocomplete model you want to use +- Click **Save** to save the changes Cody supports and uses a set of models for autocomplete. Learn more about these [here](/cody/capabilities/supported-models#autocomplete). It's also recommended to read the [Enabling Cody on Sourcegraph Enterprise](/cody/clients/enable-cody-enterprise) docs. @@ -9433,7 +8770,7 @@ Cody uses a set of models for autocomplete. Learn more about these [here](/cody/

Auto-edit suggests code changes by analyzing cursor movements and typing. After you've made at least one character edit in your codebase, it begins proposing contextual modifications based on your cursor position and recent changes.

-Auto-edit is currently supported with Sourcegraph v6.0+ for Pro, Enterprise Starter, and Enterprise accounts on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. +Auto-edit is currently supported with Sourcegraph v6.0+ for Enterprise accounts on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. ## Capabilities of auto-edit @@ -9472,29 +8809,24 @@ The auto-edit feature can help you with various repetitive tasks in your code: - **Parameter refactoring**: Assists in adding, removing, or reorganizing function parameters. When you unpack a function to handle more cases, auto-edit helps restructure the parameter list and suggests corresponding changes at call sites. - **Type system modifications**: Auto-edit identifies and suggests consistent changes across your codebase when updating type definitions or interfaces. This includes updating variable declarations, function parameters, and return types to maintain type consistency. -Auto-edit is supported by both Cody VS Code and JetBrains plugins. +Auto-edit is supported by Cody VS Code, JetBrains, and Visual Studio plugins. -Auto-edit for VS Code is currently in Beta. It's available for Pro, Enterprise Starter, and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. +Auto-edit is available for Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. ## Enabling auto-edit in VS Code -Auto-edit is enabled by default for Cody Pro Enterprise Starter and Enterprise users. You can opt out and switch back to autocomplete by selecting it from the suggestion mode in the Cody VS Code extension settings. +Auto-edit is enabled by default for Cody Enterprise users. You can opt out and switch back to autocomplete by selecting it from the suggestion mode in the Cody VS Code extension settings. Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings. -### Auto-edit access for Enterprise customers +### Configure auto-edit access -Auto-edit is available for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps: +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: -1. Site administrators must: - - Ensure the feature flag `cody-autoedit-experiment-enabled-flag` is enabled (enabled by default) - - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below) -2. Once enabled, auto-edit will become the default suggestion mode for all users -3. Users can optionally switch back to autocomplete from the Cody extension settings -4. Site admins can opt out of auto-edits using the `cody-autoedit-experiment-enabled-flag` feature flag +- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) The following example demonstrates how to add Fireworks as an allowed LLM provider: @@ -9524,11 +8856,13 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid -Auto-edit for JetBrains IDEs is Experimental and supports JetBrains versions 7.84.0+. It's available for Pro, Enterprise Starter, and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. +JetBrains IDEs support auto-edit for versions 7.84.0+. It's available for Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. ## Enabling auto-edit in JetBrains -You can opt-in the auto-edit feature from the JetBrains Cody plugin settings. +Auto-edit is enabled by default for Cody Enterprise users. You can opt out and switch back to autocomplete by selecting it from the suggestion mode in the Cody JetBrains extension settings. + +Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings. - Click the three-dot menu on the top right of the Cody plugin window and select **Open Cody Settings Editor** - This will open the `cody_settings.json` file in your editor @@ -9536,16 +8870,58 @@ You can opt-in the auto-edit feature from the JetBrains Cody plugin settings. ![JetBrains-Cody-Settings-Editor](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-cody-settings.png) -### Auto-edit access for Enterprise customers +### 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: + +- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) + +The following example demonstrates how to add Fireworks as an allowed LLM provider: + +```json + +"cody.enabled": true, +"modelConfiguration": { + "sourcegraph": { + "modelFilters": { + // Only allow "beta" and "stable" models. + // Not "experimental" or "deprecated". + "statusFilter": ["beta", "stable"], + + // Allow any models provided by Anthropic, OpenAI, Google and Fireworks. + "allow": [ + "anthropic::*", // Anthropic models + "openai::*", // OpenAI models + "google::*", // Google Gemini models + "fireworks::*", // Open source models hosted by Sourcegraph + ], + } + } +} +``` + + + + + +Visual Studio supports auto-edit for versions 17.6 and above. It's available for Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag. + +## Enabling auto-edit in Visual Studio + +Auto-edit is enabled by default for Cody Enterprise users. Two settings must be enabled by default in the Visual Studio Cody extension settings to make the auto-edit feature work. + +1. Automatically trigger completions +2. Enable Cody Auto-edit -Auto-edit is available for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps: +You can opt out and switch back to autocomplete by deselecting it from the Cody Visual Studio extension settings. -1. Site administrators must: - - Ensure the feature flag `cody-autoedit-experiment-enabled-flag` is enabled from the settings editor - - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below) -2. Once enabled, auto-edit will become the default suggestion mode for all users -3. Users can optionally switch back to autocomplete from the Cody extension settings -4. Site admins can opt out of auto-edits using the `cody-autoedit-experiment-enabled-flag` feature flag +![Visual-Studio-Cody-Settings-Editor](https://storage.googleapis.com/sourcegraph-assets/Docs/visual-studio-auto-edit-settings.png) + +### 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: + +- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) The following example demonstrates how to add Fireworks as an allowed LLM provider: @@ -9574,6 +8950,12 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid +Self-hosted customers get autocomplete as default. They cannot opt-in for auto-edit until they allow gateway access to Cody. + +## Disable auto-edit + +To turn-off the auto-edit feature, set the feature flag `cody-autoedit-experiment-enabled-flag` as `disabled` in your site configuration. Doing so will switch back to autocomplete as your default suggestion mode. +
@@ -9633,7 +9015,7 @@ Agentic context fetching can be helpful to assist you with a wide range of tasks ## Enable agentic context fetching -Agentic context fetching is enabled by default for all Cody users. It uses LLM reflection and basic tool use steps to gather and refine context before sending it in the final model query. The review step in agentic context fetching experience defaults to Gemini 2.5 Flash and falls back to Claude Haiku or GPT 4.1 mini if Flash is unavailable. +Agentic context fetching is enabled by default. It uses LLM reflection and basic tool use steps to gather and refine context before sending it in the final model query. The review step in agentic context fetching experience defaults to Gemini 2.5 Flash and falls back to Claude Haiku or GPT 4.1 mini if Flash is unavailable. You can disable agentic context in your extension settings using `cody.agenticContext`. @@ -9777,7 +9159,6 @@ by Sourcegraph, and contains all the information available about the cause of th ## Prerequisites -- You must not have have the setting `experimentalFeatures.codeMonitoringWebHooks` disabled in your user, org, or global settings. - You must have a service running that can accept the POST request triggered by the webhook notification ## Creating a webhook receiver @@ -10146,6 +9527,74 @@ Code Insights is based on our universal code search, making it precise and confi + +# Inventory Stats + +

Learn about your project's inventory stats type of Code Insights.

+ +An inventory stats code insight lets you track code inventory metrics such as file counts, lines of code, and language usage trends in your repositories. Sourcegraph Code Search Enterprise users can track these metrics across all repositories in their organization. + +To create an inventory stats code insight: + +- Navigate to the Code Insights tab from the Sourcegraph instance +- Click on the **Create insight** button +- Select **Inventory Stats** as the type of insight +- Choose your list of target repositories on which you want to perform an insight +- Next, pick the inventory metrics you want to track, like lines of code, file size, and file count +- Finally, add a **title** and **granularity** of the insight +- And click **Create code insight** once you are done + +While configuring these fields, you can also see a live preview of the insight on the right side of the page. + +After you have created the insight, you can view it on the **Code Insights** tab. + +![inventory-stats](https://storage.googleapis.com/sourcegraph-assets/Docs/inventory-stats-insights-0625.png) + +Now, you can perform all the actions you can on other Code Insights, such as editing, filtering, sharing, and deleting. + +## Inventory environment variables + +Inventory environment variables have been moved into site configuration. This impacts any self-hosted customer using these environment variables. Cloud customers are not impacted by this change. + +If you are a self-hosted Sourcegraph Enterprise user, we have moved the inventory environment variables into the **inventory** section of the **Site configuration** settings in your **Site admin** page. + +Here's a list oI the Inventory environment variables and their new site configuration settings, with default values: + +- `USE_ENHANCED_LANGUAGE_DETECTION` ==> `"disableEnhancedLanguageDetection"` + - defaults to `false` +- `GET_INVENTORY_GIT_SERVER_CONCURRENCY` ==> `"gitServerConcurrency"` + - defaults to `4` +- `GET_INVENTORY_REDIS_CONCURRENCY` ==> `"redisConcurrency"` + - defaults to `20` +- `GET_INVENTORY_MAX_INV_IN_MEMORY` ==> `"maxInventoryInMemory"` + - defaults to `1000` +- `GET_INVENTORY_TIMEOUT` ==> `"timeoutInMinutes"` + - defaults to `5` + +Here's an example of the site configuration section: + +```json +"inventory" : { + "disableEnhancedLanguageDetection": false, + "gitServerConcurrency": 4, + "redisConcurrency": 20, + "maxInventoryInMemory": 1000, + "timeoutInMinutes": 5 +} +``` + +To accommodate default values in your Site configuration vs. environment variables, the positive `USE_ENHANCED_LANGUAGE_DETECTION` env var has been changed to the negative `disableEnhancedLanguageDetection`. + +There is a new environment variable for managing `worker` resources when processing Inventory insights: + +```json +INSIGHTS_INVENTORY_BATCH_SIZE +``` + +This environment variable controls the number of repositories to process in a single batch for inventory insights in the code insights worker. It affects memory usage while processing repos. Lower number is less memory used. It does not affect the speed of the process. + +
+ # Search results aggregations use cases and recipes @@ -10286,9 +9735,9 @@ You can only use Code Insights on a [Docker Compose](/admin/deploy/docker-compos ## Code hosts -Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/), except: +Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/). -* Perforce repositories making use of sub-repo permissions are not supported +If the repo has [sub-repo permissions](/admin/permissions/api#Setting-sub-repository-permissions-for-users) configured, an admin will need to set `experimentalSettings.subRepoPermissions.allowCodeInsights` to `true` in site config to allow Code Insights to query that repo. @@ -11624,9 +11073,24 @@ Code Insights does not yet support running over specific revisions. ## VCS limitations -Code Insights only supports git based repositories and does not support perforce repositories that have sub-repo permissions enabled. +Code Insights by default can **not** query repositories that have [sub-repo permissions](/admin/permissions/api#Setting-sub-repository-permissions-for-users) configured. Note that some repositories can sync sub-repo permissions from the code host - Perforce depots currently (6.4). - Perforce depots converted to git are also currently not supported for Code Insights. +The reason for that restriction is security concerns around exposing the code in those repositories to users who should not be able to access it. + +Code Insights exposes only aggregated analytics and counts of patterns, though, not the raw code, so the security concerns could be less for Code Insights. + +If desired, a Sourcegraph admin can enable Code Insights access to repositories that use sub-repo permissions in site config: + +```json +"experimentalFeatures": { + "subRepoPermissions": { + "enabled": true, + "allowCodeInsights": true + } +} +``` + +`allowCodeInsights` is `false` by default, preserving historical behavior. ## Feature parity limitations @@ -12744,13 +12208,13 @@ The extracted `ctags` symbols are also used for the symbol sidebar, which catego Here is the query path for symbol searches: -- **Zoekt**: if [indexed search](/admin/search#indexed-search) is enabled and the search is for the tip commit of an indexed branch, then Zoekt will service the query and it should respond quickly. Zoekt indexes the default branch (usually `master` or `main`) and can be configured for [multi-branch indexing](/code-search/features#multi-branch-indexing-experimental). The high commit frequency of monorepos reduces the likelihood that Zoekt will be able to respond to symbol searches. Zoekt **eagerly** indexes by listening to repository updates, whereas the symbols service **lazily** indexes the commit being searched. -- **Symbols service with Rockskip enabled**: if [Rockskip](/code-search/code-navigation/rockskip) is enabled, it'll search for symbols stored in Postgres. After initial indexing, queries should be resolved quickly. -- **Symbols service with an index for the commit**: if the symbols service has already indexed this commit (i.e. someone has visited the commit before) then the query should be resolved quickly. Indexes are deleted in LRU fashion to remain under the configured maximum disk usage which [defaults to 100GB](/code-search/code-navigation/search_based_code_navigation#what-configuration-settings-can-i-apply). -- **Symbols service with an index for a different commit**: if the symbols service has already indexed a **different** commit in the same repository, then it will make a copy of the previous index on disk then run [ctags](https://github.com/universal-ctags/ctags#readme) on the files that changed between the two commits and update the symbols in the new index. This process takes roughly 20 seconds on a monorepo with 40M LOC and 400K files. -- **Symbols service without any indexes (cold start)**: if the symbols service has never seen this repository before, then it needs to run ctags on all symbols and construct the index from scratch. This process takes roughly 20 minutes on a monorepo with 40M LOC and 400K files. +- **Zoekt**: if [indexed search](/admin/search#indexed-search) is enabled and the search is for the tip commit of an indexed branch, then Zoekt will service the query and it should respond quickly. Zoekt indexes the default branch (usually `master` or `main`) and can be configured for [multi-branch indexing](/code-search/features#multi-branch-indexing-experimental). The high commit frequency of monorepos reduces the likelihood that Zoekt will be able to respond to symbol searches. Zoekt **eagerly** indexes by listening to repository updates, whereas the searcher service **lazily** indexes the commit being searched. +- **Searcher service with Rockskip enabled**: if [Rockskip](/code-search/code-navigation/rockskip) is enabled, it'll search for symbols stored in Postgres. After initial indexing, queries should be resolved quickly. +- **Searcher service with an index for the commit**: if the searcher service has already indexed this commit (i.e. someone has visited the commit before) then the query should be resolved quickly. Indexes are deleted in LRU fashion to remain under the configured maximum disk usage which [defaults to 100GB](/code-search/code-navigation/search_based_code_navigation#what-configuration-settings-can-i-apply). +- **Searcher service with an index for a different commit**: if the searcher service has already indexed a **different** commit in the same repository, then it will make a copy of the previous index on disk then run [ctags](https://github.com/universal-ctags/ctags#readme) on the files that changed between the two commits and update the symbols in the new index. This process takes roughly 20 seconds on a monorepo with 40M LOC and 400K files. +- **Searcher service without any indexes (cold start)**: if the searcher service has never seen this repository before, then it needs to run ctags on all symbols and construct the index from scratch. This process takes roughly 20 minutes on a monorepo with 40M LOC and 400K files. -Once the symbols service has built an index for a commit, here's the query performance: +Once the searcher service has built an index for a commit, here's the query performance: - Exact matches `^foo$` are optimized to use an index - Prefix matches `^foo` are optimized to use an index @@ -13021,105 +12485,6 @@ Use the **Searching everywhere** or **Searching in this repo** filter to determi - -# Deep Search - -

Learn more about Sourcegraph's agentic Code Search tool Deep Search.

- - New in version 6.4. Deep Search is currently in research preview for Enterprise customers with access to Cody and Code Search. Because Deep Search is in research preview, it might change significantly in the future as we make improvements and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. - -Deep Search is an agentic code search tool. It receives a natural language question about a codebase, performs an in-depth search, and returns a detailed answer. The user can also ask follow-up questions to improve the answer further. - -Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. These tools include multiple modes of Sourcegraph's Code Search and Code Navigation tools. Using tools in an agentic loop enables Deep Search to iteratively refine its understanding of the question and codebase, searching until it is confident in its answer. - -Deep Search displays a list of sources used to generate the answer. The sources are the various types of searches it performs and the files it reads. The answer is formatted in markdown. If prompted to do so, Deep Search can also generate diagrams as part of its answer. - -## Best practices - -- Give the agent a starting point for the search: Mention relevant repositories, files, directories, or symbol names. The more specific you are, the faster the search will be. -- Provide reasonably scoped questions. The agent will perform much better if it does not have to read the entire codebase at once. -- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. If something is missing, ask a follow-up question and mention the missing source. - -### Examples of prompts - -- Find examples of logger usage and show examples of the different types of logging we use. -- I want to know when the indexing queue functionality was last changed in `sourcegraph/zoekt`. Show me the last few commit diffs touching this code and explain the changes. -- Look at the GraphQL APIs available in `sourcegraph/sourcegraph`. Are any of them unused? The client code is in `sourcegraph/cody`. -- Which tools do we use in our build processes defined in `BUILD.bazel` files? -- Generate a request flow diagram for `src/backend`. Mark the auth and rate limit points. - -## Enabling Deep Search - -Deep Search can only be used on Sourcegraph instances with Code Search and Cody licenses. - -Deep Search is disabled by default. To enable it, ask your site administrator to set `experimentalFeatures.deepSearch.enabled = "true"` in your site configuration. - -For optimal performance, Deep Search is specialized to only use one model. Currently, Deep Search only supports Claude Sonnet 4. - -### Configuring Deep Search on Amazon Bedrock or GCP Vertex - -Include configuration for Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides) in your site configuration. For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration). - -Examples for Sonnet 4 configuration inside `modelOverrides`: - -Amazon Bedrock: -```json -{ - "modelRef": "aws-bedrock::v1::claude-sonnet-4", - "modelName": "us.anthropic.claude-sonnet-4-20250514-v1:0", - "displayName": "Claude Sonnet 4 (AWS Bedrock)", - "capabilities": [ - "chat", - "tools", - ], - "category": "balanced", - "status": "stable", - "contextWindow": { - "maxInputTokens": 200000, - "maxOutputTokens": 32000, - } -}, -``` - -GCP Vertex: -```json -{ - "modelRef": "google-anthropic::v2::claude-sonnet-4", - "modelName": "claude-sonnet-4@20250514", - "displayName": "Claude Sonnet 4 (GCP Vertex)", - "capabilities": [ - "chat", - "tools", - ], - "category": "balanced", - "status": "stable", - "contextWindow": { - "maxInputTokens": 200000, - "maxOutputTokens": 32000, - } -}, -``` - -Then, configure Deep Search to use this model in `experimentalFeatures`: - -Amazon Bedrock: -```json -"experimentalFeatures": { - "deepSearch.enabled": true, - "deepSearch.model": "aws-bedrock::v1::claude-sonnet-4" -}, -``` - -GCP Vertex: -```json -"experimentalFeatures": { - "deepSearch.enabled": true, - "deepSearch.model": "google-anthropic::v2::claude-sonnet-4" -}, -``` - -
- # Search Query Language Reference @@ -14545,15 +13910,15 @@ Search-based Code Navigation also filters results by file extension and by impor ## What configuration settings can I apply? -The symbols container recognizes these environment variables: +The searcher container recognizes these environment variables: -| **Env Vars** | **Deafult** | **Details** | +| **Env Vars** | **Default** | **Details** | | ---------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------- | | `CTAGS_COMMAND` | `universal-ctags` | Ctags command (should point to universal-ctags executable compiled with JSON and seccomp support) | | `CTAGS_PATTERN_LENGTH_LIMIT` | `250` | The maximum length of the patterns output by ctags | | `LOG_CTAGS_ERRORS` | `false` | Log ctags errors | | `SANITY_CHECK` | `false` | Check that go-sqlite3 works then exit 0 if it's ok or 1 if not | -| `SYMBOLS_CACHE_DIR` | `/tmp/symbols-cache` | Directory in which to store cached symbols | +| `CACHE_DIR` | `/tmp/symbols-cache` | Directory in which to store cached symbols | | `SYMBOLS_CACHE_SIZE_MB` | `100000` | Maximum size of the disk cache (in megabytes) | | `CTAGS_PROCESSES` | `strconv.Itoa(runtime.GOMAXPROCS(0))` | Number of concurrent parser processes to run | | `REQUEST_BUFFER_SIZE` | `8192` | Maximum size of buffered parser request channel | @@ -14597,13 +13962,13 @@ You can always try Rockskip for a while and if it doesn't help then you can disa ## How do I enable Rockskip? -**Step 1:** Set environment variables on the `symbols` container: +**Step 1:** Set environment variables on the `searcher` container: For Docker Compose: ```yaml services: - symbols-0: + searcher-0: environment: # Enables Rockskip - USE_ROCKSKIP=true @@ -14615,7 +13980,7 @@ For Helm: ```yaml # overrides.yaml -symbols: +searcher: env: # Enables Rockskip USE_ROCKSKIP: @@ -14628,12 +13993,12 @@ symbols: For Kubernetes: ```yaml -# base/symbols/symbols.Deployment.yaml +# base/searcher/searcher.Deployment.yaml spec: template: spec: containers: - - name: symbols + - name: searcher env: # Enables Rockskip - name: USE_ROCKSKIP @@ -14645,8 +14010,8 @@ spec: For all deployments, make sure that: -- The `symbols` service has access to the codeintel DB -- The `symbols` service has the environment variables set +- The `searcher` service has access to the codeintel DB +- The `searcher` service has the environment variables set - The `codeintel-db` has a few extra GB of RAM **Step 2:** Kick off indexing @@ -14677,21 +14042,21 @@ Rockskip heavily relies on gitserver for data. Rockskip issues very long-running The easiest way to check the status of a single repository is to open the symbols sidebar and wait 5s for an error message to appear with the estimated time remaining. -For more info, the symbols container responds to GET requests on the `localhost:3184/status` endpoint with the following info: +For more info, the searcher container responds to GET requests on the `localhost:3184/status` endpoint with the following info: - Repository count - Size of the symbols table in Postgres - Most recently searched repositories - List of in-flight indexing and search requests -For Kubernetes, find the symbols pod and `exec` a `curl` command in it: +For Kubernetes, find the searcher pod and `exec` a `curl` command in it: ``` yaml -$ kubectl get pods | grep symbols -symbols-5ff7c67b57-mr5h4 +$ kubectl get pods | grep searcher +searcher-5ff7c67b57-mr5h4 -$ kubectl exec -ti symbols-5ff7c67b57-mr5h4 -- curl localhost:3184/status -This is the symbols service status page. +$ kubectl exec -ti searcher-5ff7c67b57-mr5h4 -- curl localhost:3184/status +This is the searcher service status page. Number of repositories: 1 Size of symbols table: 3253 MB @@ -14706,7 +14071,7 @@ progress 9.53% (indexed 49151 of 515574 commits), 36h55m18.227079912s remaining Tasks (14006.77s total, current AppendHop+): AppendHop+ 44.76% 49152x, InsertSymbol 18.67% 1997101x, AppendHop- 12.94% 49151x, UpdateSymbolHops 7.78% 825380x, parse 4.01% 369401x, GetCommitByHash 2.73% 515574x, get hops 2.39% 49152x, ArchiveEach 2.26% 98302x, GetSymbol 1.83% 325351x, CommitTx 1.26% 49151x, DeleteRedundant 0.79% 49151x, InsertCommit 0.30% 49152x, Log 0.28% 1x, RevList 0.00% 1x, iLock 0.00% 1x, idle 0.00% 1x, holding iLock ``` -In this example you can see there's 1 repository and the symbols service has indexed 9% of all commits with an ETA of 36H from now. There's also a breakdown of tasks that are part of Rockskip's internal workings mostly for Sourcegraph engineers, so you can ignore that. +In this example you can see there's 1 repository and the searcher service has indexed 9% of all commits with an ETA of 36H from now. There's also a breakdown of tasks that are part of Rockskip's internal workings mostly for Sourcegraph engineers, so you can ignore that. ## When is indexing triggered? @@ -17110,12 +16475,71 @@ For disaster recovery plan of Sourcegraph Cloud, please reach out to your accoun + +# LogPush for Amazon S3 (AWS) + +## Overview + +Our services will periodically push audit logs to customer-managed AWS S3 bucket. Authentication and authorization are securely handled by AWS Security Token Service with an explicit trust relationship between Sourcegraph-owned GCP identity (GCP Service Account) and the customer-managed AWS S3 bucket. + +## Steps + +To enable this feature, please contact your assigned Customer Engineer (CE) or support team to obtain the specific instruction. Below is a high level overview of the steps. + +- Sourcegraph provides below information to customer: + - GCP identity (GCP Service Account) + - a unique file to prove bucket ownership +- Customer to perform the following: + - creates a S3 bucket + - configures the trust relationship with AWS IAM + - uploads the ownership file to prove bucket ownership +- Customer to inform Sourcegraph of the S3 bucket ARN and the AWS IAM role ARN + +Once completed, Sourcegraph will complete the LogPush configuration and start sending logs to the customer-managed S3 bucket. + +## FAQ + +### How does the authentication work? + +Sourcegraph will provide instructions on how to configure the trust relationship between the Sourcegraph-owned GCP identity (GCP Service Account) and the customer-managed AWS S3 bucket. We will also provide the example configuration in Terraform. At a high level: + +- Customer creates a AWS IAM role: + - with a policy to permit such role to access the S3 bucket + - with a policy to permit the Sourcegraph-owned GSA to assume such role +- Sourcegraph assumes the provisioned AWS IAM role to access the bucket + + + + +# LogPush for Google Cloud Storage (GCS) + +## Overview + +Our services will periodically push audit logs to customer-managed GCS bucket. Authentication and authorization are securely handled by GCP IAM service. + +## Steps + +To enable this feature, please contact your assigned Customer Engineer (CE) or support team to obtain the specific instruction. Below is a high level overview of the steps. + +- Sourcegraph provides below information to customer: + - email of a Sourcegraph-owned GCP Service Account (GSA) + - a unique file to prove bucket ownership +- Customer to perform the following: + - creates a GCS bucket + - grants the Sourcegraph-owned GSA sufficient IAM roles to access the bucket + - uploads the ownership file to prove bucket ownership +- Customer to inform Sourcegraph of the bucket name + +Once completed, Sourcegraph will complete the LogPush configuration and start sending logs to the customer-managed GCS bucket. + + + # Sourcegraph Cloud Sourcegraph Cloud is a single-tenant cloud solution. Cloud instances are private, dedicated instances provisioned and managed by Sourcegraph. Sourcegraph Cloud was formerly known as managed instances. -Sourcegraph provisions each instance in an isolated and secure cloud environment. Access is restricted to only your organization through your SSO provider of choice. Enterprise VPN is available upon request. +Sourcegraph provisions each instance in an isolated and secure cloud environment. Access is restricted to only your organization through your SSO provider of choice. Additionally, we can restrict access to your Sourcegraph Cloud instance to authorized IP addresses upon request, e.g., exit gateway of corporate vpn. ## Start a Sourcegraph Cloud trial @@ -17267,8 +16691,7 @@ To learn more about how the Sourcegraph team operates managed SMTP internally, r ### Audit Logs -Our Cloud instances provide [audit logs](/admin/audit_log#cloud) to help you monitor and investigate actions taken by users and the system. These logs are available to download by request and are also sent to a [centralized logging service](https://about.sourcegraph.com/security#logging) for 30 day retention. Should you wish to -extend this period, please be aware that additional charges will apply. +Our Cloud instances provide [audit logs](/admin/audit_log#cloud) to help you monitor and investigate actions taken by users and the system. These logs are available to download by request and are also sent to a [centralized logging service](https://about.sourcegraph.com/security#logging) for 30 day retention. Should you wish to extend this period, please be aware that additional charges will apply. To request an extension, please contact your assigned Customer Engineer (CE) or send an email to Sourcegraph Support at support@sourcegraph.com. #### Download audit logs @@ -17277,12 +16700,12 @@ For requesting audit logs, please contact your our support team. #### Deliver audit logs to customer-managed destination (LogPush) -Sourcegraph LogPush is an optional add-on to deliver audit logs to a customer provided destination. To enable this feature, please contact your assigned Customer Engineer (CE) or support team. +Sourcegraph LogPush is an optional add-on to deliver audit logs to a customer provided destination. To enable this feature, please contact your assigned Customer Engineer (CE) or support team to obtain the setup instructions for your destination. Supported destinations: -- Google Cloud Storage (GCS) -- Amazon S3 (AWS) +- [Google Cloud Storage (GCS)](./logpush_gcs) +- [Amazon Web Services S3 (AWS)](./logpush_s3) ## Requirements @@ -17843,6 +17266,46 @@ Other tips: + +# src prompts + +

`src prompts` is a tool that manages prompt library prompts and tags in a Sourcegraph instance.

+ +## Usage + +``` +'src prompts' is a tool that manages prompt library prompts and tags in a Sourcegraph instance. + +Usage: + + src prompts command [command options] + +The commands are: + + list lists prompts + get get a prompt by ID + create create a prompt + update update a prompt + delete delete a prompt + export export prompts to a JSON file + import import prompts from a JSON file + tags manage prompt tags (use "src prompts tags [command] -h" for more info) + +Use "src prompts [command] -h" for more information about a command. +``` + +## Sub-commands + +* [list](prompts/list) +* [get](prompts/get) +* [create](prompts/create) +* [update](prompts/update) +* [delete](prompts/delete) +* [export](prompts/export) +* [import](prompts/import) +* [tags](prompts/tags) +
+ # `src lsif` @@ -17927,6 +17390,7 @@ Most commands require that the user first [authenticate](quickstart#connect-to-s * [`login`](references/login) * [`lsif`](references/lsif) * [`orgs`](references/orgs) +* [`prompts`](references/prompts) * [`repos`](references/repos) * [`scout`](references/scout) * [`search`](references/search) @@ -19150,6 +18614,655 @@ Examples: + +# src prompts update + +Update an existing prompt in your Sourcegraph instance. + +## Usage + +```bash +src prompts update [flags] +``` + +## Examples + +```bash +# Update a prompt's basic information +src prompts update \ + -name="updated-prompt-name" \ + -description="Updated description" \ + -content="Updated prompt content" \ + UHJvbXB0OjE= + +# Update a prompt with new tags +src prompts update \ + -name="prompt-with-new-tags" \ + -description="Updated description" \ + -content="Updated content" \ + -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" \ + UHJvbXB0OjE= + +# Update prompt to draft status +src prompts update \ + -name="draft-prompt" \ + -description="Now a draft" \ + -content="Work in progress content" \ + -draft \ + UHJvbXB0OjE= + +# Update prompt settings +src prompts update \ + -name="auto-submit-prompt" \ + -description="Auto-submit enabled" \ + -content="This prompt auto-submits" \ + -auto-submit \ + -recommended \ + -mode="EDIT" \ + UHJvbXB0OjE= +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-name` | The updated prompt name | +| `-description` | Updated description of the prompt | +| `-content` | The updated prompt template text content | +| `-tags` | Comma-separated list of tag IDs (replaces existing tags) | +| `-draft` | Whether the prompt is a draft | +| `-auto-submit` | Whether the prompt should be automatically executed in one click | +| `-mode` | Mode to execute prompt: CHAT, EDIT, or INSERT (default: "CHAT") | +| `-recommended` | Whether the prompt is recommended | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags + +`src prompts tags` is a tool that manages prompt tags in a Sourcegraph instance. + +## Usage + +``` +'src prompts tags' is a tool that manages prompt tags in a Sourcegraph instance. + +Usage: + + src prompts tags command [command options] + +The commands are: + + list lists prompt tags + get get a prompt tag by name + create create a prompt tag + update update a prompt tag + delete delete a prompt tag + +Use "src prompts tags [command] -h" for more information about a command. +``` + +## Available Commands + +- [`src prompts tags list`](./tags/list) - lists prompt tags +- [`src prompts tags get`](./tags/get) - get a prompt tag by name +- [`src prompts tags create`](./tags/create) - create a prompt tag +- [`src prompts tags update`](./tags/update) - update a prompt tag +- [`src prompts tags delete`](./tags/delete) - delete a prompt tag + + + +# src prompts list + +List all prompts in your Sourcegraph instance. + +## Usage + +```bash +src prompts list [flags] +``` + +## Examples + +```bash +# List all prompts +src prompts list + +# Search prompts by name, description, or content +src prompts list -query="error handling" + +# Filter prompts by tag IDs +src prompts list -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" + +# List prompts for a specific owner +src prompts list -owner="VXNlcjox" + +# List only recommended prompts +src prompts list -recommended-only + +# List built-in prompts only +src prompts list -builtin-only + +# Include built-in prompts with user prompts +src prompts list -include-builtin + +# Exclude draft prompts +src prompts list -include-drafts=false + +# List prompts owned by viewer or their organizations +src prompts list -affiliated + +# Paginate through results +src prompts list -limit=10 -after="cursor" + +# Select specific columns to display +src prompts list -c id,name,description,visibility + +# Output results as JSON +src prompts list -json + +# Complex filtering example +src prompts list -query="Go" -recommended-only -include-drafts=false -json +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-query` | Search prompts by name, description, or content | +| `-owner` | Filter by prompt owner (a namespace, either a user or organization) | +| `-tags` | Comma-separated list of tag IDs to filter by | +| `-affiliated` | Filter to only prompts owned by the viewer or viewer's organizations | +| `-recommended-only` | Whether to include only recommended prompts | +| `-builtin-only` | Whether to include only builtin prompts | +| `-include-builtin` | Whether to include builtin prompts | +| `-include-drafts` | Whether to include draft prompts (default: true) | +| `-limit` | Maximum number of prompts to list (default: 100) | +| `-after` | Cursor for pagination (from previous page's endCursor) | +| `-c` | Comma-separated list of columns to display. Available: id,name,description,draft,visibility,mode,tags (default: "id,name,visibility,tags") | +| `-json` | Output results as JSON for programmatic access | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + +# src prompts import + +Import prompts from a JSON file. + +## Usage + +```bash +src prompts import [flags] +``` + +## Examples + +```bash +# Import prompts from a file (uses current user as owner) +src prompts import -i prompts.json + +# Import prompts with a specific owner +src prompts import -i prompts.json -owner="VXNlcjox" + +# Perform a dry run without creating any prompts +src prompts import -i prompts.json -dry-run + +# Skip existing prompts with the same name +src prompts import -i prompts.json -skip-existing + +# Combine flags for validation and skipping +src prompts import -i prompts.json -dry-run -skip-existing +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-i` | Input file path (required) | +| `-owner` | The ID of the owner for all imported prompts (defaults to current user) | +| `-dry-run` | Validate without importing | +| `-skip-existing` | Skip prompts that already exist (based on name) | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts get + +Get details about a specific prompt by ID. + +## Usage + +```bash +src prompts get +``` + +## Examples + +```bash +# Get prompt by ID +src prompts get UHJvbXB0OjE= +``` + +## Flags + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts export + +Export prompts to a JSON file. + +## Usage + +```bash +src prompts export [flags] +``` + +## Examples + +```bash +# Export all prompts to stdout +src prompts export + +# Export all prompts to a file +src prompts export -o prompts-backup.json + +# Export with pretty formatting +src prompts export -o prompts-backup.json -format=pretty + +# Export prompts with specific tags +src prompts export -o go-prompts.json -tags="go,golang" + +# Export prompts with multiple tag filters +src prompts export -o filtered-prompts.json -tags="python,data-science,ml" +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-o` | Output file path (defaults to stdout if not specified) | +| `-tags` | Comma-separated list of tag names to filter by | +| `-format` | JSON format: 'pretty' or 'compact' (default: 'compact') | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts delete + +Delete a prompt from your Sourcegraph instance. + +## Usage + +```bash +src prompts delete +``` + +## Examples + +```bash +# Delete a prompt by ID +src prompts delete UHJvbXB0OjE= + +# The command will confirm successful deletion +src prompts delete UHJvbXB0OjE= +# Output: Prompt deleted successfully. +``` + +## Flags + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + +# src prompts create + +Create a new prompt in your Sourcegraph instance. + +## Usage + +```bash +src prompts create [flags] +``` + +## Examples + +```bash +# Create a basic prompt (uses current user as owner) +src prompts create \ + -name="go-error-handling" \ + -description="Best practices for Go error handling" \ + -content="Write a Go function that properly handles errors..." + +# Create a prompt with tags +src prompts create \ + -name="python-optimization" \ + -description="Python performance optimization tips" \ + -content="Optimize this Python code for better performance..." \ + -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" + +# Create a draft prompt +src prompts create \ + -name="draft-prompt" \ + -description="Work in progress prompt" \ + -content="This prompt is still being developed..." \ + -draft + +# Create a recommended prompt with auto-submit +src prompts create \ + -name="recommended-prompt" \ + -description="A recommended prompt for common use" \ + -content="This is a recommended prompt..." \ + -recommended \ + -auto-submit + +# Create a secret prompt for INSERT mode +src prompts create \ + -name="secret-insert-prompt" \ + -description="Secret prompt for code insertion" \ + -content="Insert code here..." \ + -visibility="SECRET" \ + -mode="INSERT" + +# Create a prompt with explicit owner (optional) +src prompts create \ + -name="team-shared-prompt" \ + -description="A prompt shared with a specific owner" \ + -content="This prompt has an explicit owner..." \ + -owner="VXNlcjox" +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-name` | The prompt name (required) | +| `-description` | Description of the prompt (required) | +| `-content` | The prompt template text content (required) | +| `-owner` | The ID of the owner (user or organization) (optional, defaults to current user) | +| `-tags` | Comma-separated list of tag IDs | +| `-draft` | Whether the prompt is a draft (default: false) | +| `-visibility` | Visibility of the prompt: PUBLIC or SECRET (default: "PUBLIC") | +| `-auto-submit` | Whether the prompt should be automatically executed in one click (default: false) | +| `-mode` | Mode to execute prompt: CHAT, EDIT, or INSERT (default: "CHAT") | +| `-recommended` | Whether the prompt is recommended (default: false) | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags update + +Update an existing tag in your Sourcegraph instance. + +## Usage + +```bash +src prompts tags update [flags] +``` + +## Examples + +```bash +# Update a tag's name +src prompts tags update -name="updated-tag-name" UHJvbXB0VGFnOjE= + +# Update to a different name +src prompts tags update -name="golang-updated" UHJvbXB0VGFnOjE= +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-name` | The new name for the tag | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags list + +List all tags in your Sourcegraph instance. + +## Usage + +```bash +src prompts tags list [flags] +``` + +## Examples + +```bash +# List all tags +src prompts tags list + +# Search for tags by name +src prompts tags list -query="go" + +# Paginate through results +src prompts tags list -limit=10 -after="cursor" + +# Select specific columns to display +src prompts tags list -c id,name + +# Output results as JSON +src prompts tags list -json + +# Combine search and pagination +src prompts tags list -query="python" -limit=5 +``` + +## Flags + +| Flag | Description | +|------|-------------| +| `-query` | Search prompt tags by name | +| `-limit` | Maximum number of tags to list (default: 100) | +| `-after` | Cursor for pagination (from previous page's endCursor) | +| `-c` | Comma-separated list of columns to display. Available: id,name (default: "id,name") | +| `-json` | Output results as JSON for programmatic access | + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags get + +Get details about a specific tag by name. + +## Usage + +```bash +src prompts tags get +``` + +## Examples + +```bash +# Get tag by name +src prompts tags get go + +# Get tag details for machine learning +src prompts tags get machine-learning +``` + +## Flags + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags delete + +Delete a tag from your Sourcegraph instance. + +## Usage + +```bash +src prompts tags delete +``` + +## Examples + +```bash +# Delete a tag by ID +src prompts tags delete UHJvbXB0VGFnOjE= + +# The command will confirm successful deletion +src prompts tags delete UHJvbXB0VGFnOjE= +# Output: Prompt tag deleted successfully. +``` + +## Flags + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + + + + +# src prompts tags create + +Create a new tag for prompts. + +## Usage + +```bash +src prompts tags create +``` + +## Examples + +```bash +# Create a new tag +src prompts tags create go + +# Create a tag with hyphen +src prompts tags create machine-learning + +# Create a tag for Python +src prompts tags create python +``` + +## Flags + +### API flags + +| Flag | Description | +|------|-------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) | + +## Notes + +If a tag with this name already exists, the command will return the existing tag's ID. + + + # `src orgs list` @@ -22373,9 +22486,10 @@ The batch change's **changesets** still need to be published, which means they e ## Publish a changeset -So far, nothing has been created on your code hosts. To do so, you must tell Sourcegraph to **publish a changeset**. +So far, nothing has been created on your code hosts. To do so, you can tell Sourcegraph to either **publish** or **push** a changeset. -Publishing causes commits, branches, and pull/merge requests to be written to your code host. +- **[Publishing](/batch-changes/publishing-changesets)** a changeset results in the creation of a merge request on your code host (e.g. a Pull Request on GitHub). +- **[Pushing](/batch-changes/push-only-changesets)** a changeset (available on GitHub and GitLab only) results in pushing your code changes to a new branch on your code host without also creating a merge request. You are able to see any CI feedback set to trigger upon code-pushes in the Batch Changs UI. ### Configure code host credentials @@ -22427,6 +22541,40 @@ Feel free to customize your batch spec and experiment with making other changes. + +# Pushing code to a code host + +

Learn how to push code changes to a code host without making a merge request.

+ +Pushed-only changesets work on GitHub and GitLab only. They do not yet work with forked repositories. + +After you've [created a batch change](/batch-changes/create-a-batch-change), you will be redirected to a page displaying a list of the changesets the Batch Change created. From this page, you can apply any bulk operation to more than one changesets. + + To push code to a new branch on a code host without also creating a merge request, simply select **Push to code host only** from the dropdown menu: + +![push-only-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-dropdown-0625.png) + +## Few important considerations + +- With pushed-only changesets, you are still able see CI feedback, as long as it triggers on code pushes +- The `review` status of a pushed-only changeset is always "N/A" +- The `status` of a pushed-only changeset is always "Open" +- To publish a pushed-only changeset, simply select the changeset in the Batch Changes UI and select **Publish** + +![push-only-changesets-executed](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-executed-0625.png) + +## Requirements + +To push code to a new branch on a code host, you will need: + +- [Admin permissions for the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes) +- Write access to the changeset's repository on the code host +- [Credentials](/batch-changes/configuring-credentials) configured for the code host + +For more information, see [Code host interactions in Batch Changes](/batch-changes/permissions-in-batch-changes#code-host-interactions-in-batch-changes). + +
+ # Publishing changesets to the code host @@ -24209,6 +24357,7 @@ Below is a list of supported bulk operations for changesets and the conditions w | **Merge** | Merge the selected changesets on code hosts. Some changesets may be unmergeable due to their states, which does not impact the overall bulk operation. Failed merges are listed under the bulk operations tab. In the confirmation modal, you can opt for a squash merge strategy, available on GitHub, GitLab, and Bitbucket Cloud. For Bitbucket Server/Data Center, only regular merges are performed | | **Close** | Close the selected changesets on the code hosts | | **Publish** | Publishes the selected changesets, provided they don't have a [`published` field](/batch-changes/batch-spec-yaml-reference#changesettemplatepublished) in the batch spec. You can choose between draft and normal changesets in the confirmation modal | +| **Push-only** | Pushes code changes to a new branch on a code host without making a merge request. Available on GitHub and GitLab only. | | **Export** | Export selected changesets that you can use for later use | | **Re-execute** | Users can re-execute individual changeset creation logic for selected workspaces. This allows for creating new changesets for users who are using non-deterministic run steps (for example,LLMs) | | **Enable auto-merge for GitHub (experimental)** | Enable auto-merge on selected GitHub changesets. When enabled, changesets will be automatically merged once all required status checks pass and any blocking reviews are resolved. This feature is GitHub-specific and requires [appropriate setup](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) on the target repositories. Failed actions are listed under the bulk operations tab. | @@ -26707,26 +26856,41 @@ This metric only includes data from users on Cody versions 1.42+. Enterprise customers can use Sourcegraph Analytics to get a clear view of usage, engagement, performance, and impact. -## Sourcegraph Cloud Analytics -This solution is available to: +Our managed [Sourcegraph Analytics service](https://analytics.sourcegraph.com) for Cody and Code Search usage data is available for: + - [Sourcegraph Cloud](/cloud) customers -- Self-hosted customers that have fully enabled usage telemetry, and that are running a supported version of Sourcegraph (5.9+) +- Self-hosted customers that have fully enabled usage telemetry and are running a supported version of Sourcegraph (5.9+) +- [Sourcegraph workspaces](https://workspaces.sourcegraph.com) -[Sourcegraph Cloud](/cloud) customers can use our managed [cloud analytics service](https://analytics.sourcegraph.com) for Cody and Code Search usage data. -Self-hosted customers can also use this service, but they must: -- Upgrade to a supported version of Sourcegraph (5.9+) -- Have fully enabled usage telemetry -- [Enablement instructions](/analytics/cloud#enablement) +To get started, follow our [enablement instructions](#enablement-instructions). -For more details on setting up Sourcegraph Analytics, see our [enablement instructions](/analytics/cloud#enablement) +![sourcegraph-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png) -![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png) +## Enablement instructions -## Air-Gapped Analytics +### Self-hosted and Cloud -Air-Gapped analytics is an upcoming feature currently in development. If you would like to learn more, please get in touch with your Sourcegraph representative. +To enable Sourcegraph Analytics for self-hosted or Cloud instances: -Air-Gapped customers can view usage metrics in a locally deployed analytics service built on Grafana to see Sourcegraph usage data. +- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account. +- Contact your Sourcegraph Technical Advisor or point of contact (or email us at support@sourcegraph.com if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics. +- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics. +- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com). + +Air-gapped customers should refer to [Sourcegraph Air-Gapped Analytics](/analytics/air-gapped) instead. + +### Sourcegraph workspaces + +To access Sourcegraph workspaces: + +- Ensure you are an admin of your [Sourcegraph workspace](https://workspaces.sourcegraph.com). +- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com) with the same account you use for your workspace. + +## Data export and API + +Sourcegraph Analytics includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, Completion Acceptance Rate (CAR%), and more. The data is split by user, day, client/editor, and programming language. + +You can export data directly from the Sourcegraph Analytics web interface, or programmatically via the API. For API access and detailed instructions, see our [Analytics API documentation](/analytics/api). ## Metrics @@ -26871,25 +27035,10 @@ Each row in the CSV represents a user's activity for a specific combination of t - -# Sourcegraph Cloud Analytics - -The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry. - -![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/cloud-analytics.png) - -## Enablement instructions - -To enable Sourcegraph Analytics: - -- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account. -- Contact your Sourcegraph Technical Advisor or point of contact (or email us at support@sourcegraph.com if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics. -- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics. -- Sign in to [Sourcegraph Analytics](https://analytics.sourcegraph.com). - -## Data export + +# Sourcegraph Analytics API -Sourcegraph Analytics also includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, Completion Acceptance Rate (CAR%), and more. The data is split by user, day, client/editor, and programming language, perfect for automating retrieval and analyzing data in ways that make the most sense to your organization. +The Sourcegraph Analytics API is an API that provides programmatic access to your Sourcegraph Analytics data, including usage metrics, user activity, and performance data. ## Access tokens @@ -26994,7 +27143,7 @@ curl -X DELETE https://analytics.sourcegraph.com/api/service-access-tokens/$TOKE ## API reference -Sourcegraph Analytics API is a RESTful API that allows access to Sourcegraph Analytics data. To authenticate to the API, follow the instructions for [token creation](#token-creation). +To authenticate to the API, follow the instructions for [token creation](#token-creation). Export your access token as an environment variable: @@ -27738,7 +27887,7 @@ If you can get repository results when you explicitly include `repo:{your reposi - The repository is a fork repository (excluded from search results by default) and `fork:yes` is not specified in the search query. - The repository is an archived repository (excluded from search results by default) and `archived:yes` is not specified in the search query. -- There is an issue indexing the repository: check the logs of repo-updater and/or search-indexer. +- There is an issue indexing the repository: check the logs of worker and/or search-indexer. - The search index is unavailable for some reason: try the search query `repo: index:only`. If it returns no results, the repository has not been indexed. ### Sourcegraph is making unauthorized requests to the git server @@ -28431,8 +28580,6 @@ This is a table of Sourcegraph backend debug ports in the two deployment context | frontend | 6060 | 6063 | | gitserver | 6060 | 6068 | | searcher | 6060 | 6069 | -| symbols | 6060 | 6071 | -| repo-updater | 6060 | 6074 | | zoekt-indexserver | 6060 | 6072 | | zoekt-webserver | 6060 | 3070 | @@ -30066,11 +30213,11 @@ To reduce audit log volume: At its core, Sourcegraph maintains a persistent cache of all repositories that are connected to it. It is persistent because this data is critical for Sourcegraph to function. Still, it is ultimately a cache because the code host is the source of truth, and our cache is eventually consistent. - `gitserver` is the sharded service that stores repositories and makes them accessible to other Sourcegraph services -- `repo-updater` is the singleton service responsible for ensuring all repositories in gitserver are as up-to-date as possible while respecting code host rate limits. It is also responsible for syncing repository metadata from the code host that is stored in the repo table of our Postgres database +- `worker` is responsible for ensuring all repositories in gitserver are as up-to-date as possible while respecting code host rate limits. It is also responsible for syncing repository metadata from the code host that is stored in the repo table of our Postgres database ## Permission syncing -Repository permissions are mirrored from code hosts to Sourcegraph by default. This builds the foundation of Sourcegraph authorization for repositories to ensure users see consistent content on code hosts. Currently, the background permissions syncer resides in the repo-updater. +Repository permissions are mirrored from code hosts to Sourcegraph by default. This builds the foundation of Sourcegraph authorization for repositories to ensure users see consistent content on code hosts. Currently, the background permissions syncer resides in the `worker`. Learn more in the [Permission Syncing docs](/admin/permissions/syncing) @@ -30149,7 +30296,7 @@ You can learn more in the [Code Insights](/code_insights) docs. - Exhaustive search (with `count:all/count:999999` operator) - Historical search (= unindexed search, currently) - Commit search to find historical commits to search over -- Repository Syncing: The code insights backend has direct dependencies on `gitserver` and `repo-updater` +- Repository Syncing: The code insights backend has a direct dependency on `gitserver` - Permission syncing: The code insights backend depends on synced repository permissions for access control - Settings cascade: - Insights and dashboard configuration are stored in user, organization, and global settings. This will change in the future and is planned to be moved to the database @@ -30269,53 +30416,54 @@ The following diagram describes the data flow between the different components o # Analytics - Supported on [Enterprise](/pricing/enterprise) plans. + Supported on [Enterprise](/pricing/enterprise) plans. - Available via the Web app. + Available via the Web app. -The analytics section helps Sourcegraph administrators understand user engagement across the various Sourcegraph features, identify power users, and convey value to internal leaders. Introduced in version 3.42, the section includes analytics breakdowns for our most common features such as Batch Changes, Search Notebooks and search, while also providing basic user-level analytics. +The analytics section helps Sourcegraph administrators understand user engagement across the various Sourcegraph features, identify power users, and convey value to internal leaders. -## Data Visualizations +[Sourcegraph's managed Analytics](https://analytics.sourcegraph.com) for Cody and Code Search usage data is available for: -The goal of these pages is to help administrators answer any question they might have about how features are being used within their Sourcegraph instance. So far, we have introduced pages for Search, Batch Changes, Code Intel, Search, and Search Notebooks, as well as a general users page. +- [Sourcegraph Cloud](/cloud) customers +- Self-hosted customers that have fully enabled usage telemetry and are running a supported version of Sourcegraph (5.9+) +- [Sourcegraph workspaces](https://workspaces.sourcegraph.com) -Each page can visualize the past one week, the past one month, or the path three months of data. For graphs that show user data, the graph can toggle between total users or unique users. +Read and learn more about Analytics [here](/analytics). -These graphs pull directly from the event log table within the Sourcegraph instance they are running. There should not be an increase to the storage on disk of these tables due to these new features. Further, no data beyond published ping data is sent back to Sourcegraph. +## Data Visualizations -## Value Calculators +These pages aim to help administrators answer any questions they might have about how features are being used within their Sourcegraph instance. You can view feature-based stats for Search, Batch Changes, Code Insights, and Cody. There are also tabs to study analytics for Search, Completions, and Chats, as well as a general Users page. -Each page also includes a total time saved value which can be used to measure the value Sourcegraph is bringing to your organization. This metric is derived from the configurable calculators below the total time saved value. Each calculator multiplies event log data (ex: number of precise code intel events such as a go-to-definition) by a configurable number of minutes saved per event to arrive at a time saved by the feature. +Each page can visualize the past week, month, or three months of data. -We designed this to be configurable by you because we want to... -- help admins understand the value that is being seen by their organization today. -- be customizable so admins can explore what changes will best increase developer time saved. +These graphs pull directly from the event log table within their Sourcegraph instance. Due to these new features, the storage on disk of these tables should not increase. Further, no data beyond published ping data is sent back to Sourcegraph. -These calculators exist on the Search, Code Intel, Batch Changes, and Notebooks analytics pages. Each calculator looks different as they include metrics specifically designed for that part of the application. Please note that the calculator configuration does not save and will return to the default if you navigate away from the page. +## Value Calculators -If you have questions about how this works or about how to convey this value to leaders within your organization, please do not hesitate to reach out to your customer engineer. +Each page also includes a total time saved value, which can be used to measure the value Sourcegraph is bringing to your organization. This metric is derived from the configurable calculators below the total time saved value. Each calculator multiplies event log data (e.g., the number of precise code intel events, such as a go-to-definition) by a configurable number of minutes saved per event to arrive at a time saved by the feature. -## FAQ +This is designed to be configurable because we want to: -**Who has access to see these improved analytics? Where can I find it?** +- Help admins understand the value that is being seen by their organization today +- Be customizable so admins can explore what changes will best increase developer time saved -To see these new visualizations, you must be a site admin. You can find these under Site Admin section, under the Analytics section of the left-nav bar. +These calculators are on the individual Search, Completions, and Chats analytics pages. If you have questions about how this works or about how to convey this value to your org's stakeholders, please do not hesitate to contact your customer engineer. -**Do these improved analytics require sending data to Sourcegraph?** +## FAQs -No! The processing happens entirely within a your instance so no data is sent in or out of your instance. Further, these improved analytics leverage data already being captured within the event log table of your instance so there is no additional storage or processing required for this change. Basically, customers should notice no perceivable difference to their infrastructure. +### Who has access to see these improved analytics? Where can I find it? -**How often is the data updated?** +You must be a site admin for your Sourcegraph instance to see the Analytics. You can find these in the **Site Admin** section, under the **Instance Overview** section of the left nav bar. -The data is updated approximately every 24 hours. +### Do these improved analytics require sending data to Sourcegraph? -**How does this work with the existing usage stats page?** +No! The processing happens entirely within your instance, so no data is sent in or out of your instance. Further, these improved analytics leverage data already being captured within your instance's event log table, so there is no additional storage or processing required for this change. Customers should notice no perceivable difference in their infrastructure. -This new analytics experience has been redesigned from the ground up to provide the most value to administrators. In the future, we plan to deprecate the legacy usage stats page and statistics section once this functionality moved from experimental to generally available. +### How often is the data updated? -Note: The new analytics experience is experimental. For billing information, use [usage stats](/admin/usage_statistics). +The data is updated approximately every 24 hours. @@ -31542,6 +31690,10 @@ For upgrade procedures or general info about sourcegraph versioning see the link > > ***If the notes indicate a patch release exists, target the highest one.*** +## v6.3 patch 1 + +- Grafana's port 3370 is no longer open by default for unauthenticated access for Docker Compose and Pure Docker deployments. Admins can still access Grafana by logging in to their Sourcegraph instance, navigating to the Site Admin page, then clicking Monitoring from the left navigation menu. If customers require port 3370 to be open, see [[PR 1204](https://github.com/sourcegraph/deploy-sourcegraph-docker/pull/1204/files)] for insight on how to add this port to their `docker-compose.override.yaml` file. + ## v6.2.2553 ### Known issues @@ -33150,7 +33302,7 @@ You may also choose to disable automatic Git updates entirely and instead [confi - **Update Queue**: A priority queue of repositories to update. A worker continuously dequeues them and sends updates to gitserver. - **Sync jobs**: The current list of external service sync jobs, ordered by start date descending -Site admin: Go to **Site admin > Instrumentation (under Maintenance) > repo-updater > Repo Updater State** +Site admin: Go to **Site admin > Instrumentation (under Maintenance) > worker > Repo Updater State** @@ -33496,51 +33648,68 @@ With this setting, Sourcegraph will ignore any rules with a host other than `*`, ### `admin/code_hosts/perforce.schema.json` +{/* SCHEMA_SYNC_START: admin/code_hosts/perforce.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:36Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { // If non-null, enforces Perforce depot permissions. - "authorization": null, + "authorization": { + "ignoreRulesWithHost": false, + "subRepoPermissions": false + }, // Depots can have arbitrary paths, e.g. a path to depot root or a subdirectory. - "depots": null, // Other example values: // - [ // "//Sourcegraph/", // "//Engineering/Cloud/" // ] + "depots": null, // Configuration for the experimental p4-fusion client - "fusionClient": null, - - // Only import at most n changes when possible (git p4 clone --max-changes). - "maxChanges": 1000, + "fusionClient": { + "cacheLabels": false, + "enabled": false, + "fsyncEnable": false, + "includeBinaries": false, + "lookAhead": 2000, + "maxChanges": -1, + "networkThreads": 12, + "networkThreadsFetch": 12, + "noConvertLabels": false, + "printBatch": 100, + "refresh": 1000, + "retries": 10 + }, // Client specified as an option for p4 CLI (P4CLIENT, also enables '--use-client-spec') "p4.client": null, + // REQUIRED: // The ticket value for the user (P4PASSWD). You can get this by running `p4 login -p` or `p4 login -pa`. It should look like `6211C5E719EDE6925855039E8F5CC3D2`. "p4.passwd": null, + // REQUIRED: // The Perforce Server address to be used for p4 CLI (P4PORT). It's recommended to specify the protocol prefix (e.g. tcp: or ssl:) as part of the address. - "p4.port": null, // Other example values: // - "ssl:111.222.333.444:1666" // - "tcp:111.222.333.444:1666" + "p4.port": null, + // REQUIRED: // The user to be authenticated for p4 CLI (P4USER). - "p4.user": null, // Other example values: // - "admin" + "p4.user": null, // The pattern used to generate the corresponding Sourcegraph repository name for a Perforce depot. In the pattern, the variable "{depot}" is replaced with the Perforce depot's path. - // // For example, if your Perforce depot path is "//Sourcegraph/" and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of "perforce/{depot}" would mean that the Perforce depot is available on Sourcegraph at https://src.example.com/perforce/Sourcegraph. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this Perforce Server. If different Perforce Servers generate repository names that collide, Sourcegraph's behavior is undefined. "repositoryPathPattern": "{depot}" } ``` - +{/* SCHEMA_SYNC_END: admin/code_hosts/perforce.schema.json */} ## Known issues and limitations We are actively working to significantly improve Sourcegraph's Perforce support. Please [contact us](https://help.sourcegraph.com/hc/en-us/requests/new) to help us prioritize any specific improvements you'd like to see. @@ -33878,7 +34047,7 @@ This indicates the permission on your private key file is accessible by users ot If your repositories are not showing up, check the site admin **Repositories** page on Sourcegraph (and ensure you're logged in as an admin). If nothing informative is visible there, check for error messages related to communication with your code host's API in the logs from: -- [Docker Compose](/admin/deploy/docker-compose/) and [Kubernetes](/admin/deploy/kubernetes/): the logs from the `repo-updater` container/pod +- [Docker Compose](/admin/deploy/docker-compose/) and [Kubernetes](/admin/deploy/kubernetes/): the logs from the `worker` container/pod - [Single-container](/admin/deploy/docker-single-container/): the `sourcegraph/server` Docker container ### Repository not cloning or updating @@ -34508,7 +34677,7 @@ To enable the permissions API, add the following to the [site configuration](/ad The `bindID` value specifies how to uniquely identify users when setting permissions: - `username`: You can [set permissions](#setting-repository-permissions-for-users) for users by specifying their Sourcegraph usernames. Using usernames is **preferred**, as usernames are required to be unique for each user. -- `email`: You can [set permissions](#setting-repository-permissions-for-users) for users by specifying their email addresses (which must be verified emails associated with their Sourcegraph user account). This method can lead to unexpected results if there are multiple Sourcegraph user accounts with the same verified email address. +- `email`: You can [set permissions](#setting-repository-permissions-for-users) for users by specifying their email addresses (which must be verified primary emails associated with their Sourcegraph user account). This method can lead to unexpected results if there are multiple Sourcegraph user accounts with the same verified email address. Also, the email address is case-sensitive, so it should be exactly the same as set on the sourcegraph UI. After you enable the permissions API, you must [set permissions](#setting-repository-permissions-for-users) to allow users to view repositories (site admins bypass all permissions checks and can always view all repositories). @@ -34675,8 +34844,8 @@ environment. #### Scenario: no cloning, syncing, updating or deleting is happening Observed state: Sourcegraph instance does not react to any updates to code hosts and no cloning is happening. -The cause of this state could be repo-updater queries that are too large for the limits of the running Postgres DB. -One symptom is seeing a line like the one below in the repo-updater logs: +The cause of this state could be worker queries that are too large for the limits of the running Postgres DB. +One symptom is seeing a line like the one below in the worker logs: ```text t=2020-05-28T18:41:02+0000 lvl=eror msg=Syncer error="syncer.sync.store.upsert-repos: delete: driver: bad connection @@ -34685,10 +34854,10 @@ t=2020-05-28T18:41:02+0000 lvl=eror msg=Syncer error="syncer.sync.store.upsert-r or seeing the same error in the "Code host status panel" (Clicking the cloud icon). The fix is to increase the memory on Postgres DB which will increase certain Postgres-internal limits and will allow -the queries from repo-updater to go through. +the queries from worker to go through. -Another cause could be that the `repo-updater` is in a crash loop for some reason. If there are large numbers of repos -to be updated it could be from `Out of memory` errors. A fix here is to increase the memory for `repo-updater` instead. +Another cause could be that the `worker` is in a crash loop for some reason. If there are large numbers of repos +to be updated it could be from `Out of memory` errors. A fix here is to increase the memory for `worker` instead. ## General scenarios @@ -35677,7 +35846,7 @@ We also include the following non-OpenTelemetry fields: A Sourcegraph service's log level can be configured for a specific `InstrumentationScope` and it's children. For example you can keep your log level at error, but turn on debug logs for a specific component. This is only used to increase verbosity. IE it can't be used to mute a scope. -This is configured by the environment variable `SRC_LOG_SCOPE_LEVEL`. It has the format `SCOPE_0=LEVEL_0,SCOPE_1=LEVEL_1,...`. For example to turn on debug logs for `service.UpdateScheduler` and `repoPurgeWorker` you would set the following on the `repo-updater` service: +This is configured by the environment variable `SRC_LOG_SCOPE_LEVEL`. It has the format `SCOPE_0=LEVEL_0,SCOPE_1=LEVEL_1,...`. For example to turn on debug logs for `service.UpdateScheduler` and `repoPurgeWorker` you would set the following on the `worker` service: ``` SRC_LOG_SCOPE_LEVEL=service.UpdateScheduler=debug,repoPurgeWorker=debug @@ -82063,14 +82232,8 @@ License keys should not be shared across instances of Sourcegraph. If an additio ### What happens if our Sourcegraph license expires? -#### After Sourcegraph 5.3 - Sourcegraph will continue to function as normal, but all users will be signed out of Sourcegraph. Only site administrators will be able to sign into Sourcegraph so that they can enter a new license key. -#### Before Sourcegraph 5.3 - -Sourcegraph will revert to a free license, and any features that require an enterprise license will stop functioning. This could lead to data loss if some of these features were in use, so be sure to renew your license in advance! - ### How can we update our license key? Any current Site Admin can update your license key by going to Site Admin -> [Site configuration](/admin/config/site_config) @@ -82080,7 +82243,8 @@ These settings live in the JSON object, and you will need to navigate to the _li Update the value of this with your new license key and click Save to apply your changes. Example: -``` + +```bash "licenseKey": "", ``` @@ -82245,7 +82409,7 @@ External service updated, but we encountered a problem while validating the exte syncExternalService for service "GITHUB" with ID 15:context deadline exceeded ``` ## Troubleshooting Steps -You check logs from the Repo-Updater container and you should find the following below: +You check logs from the `worker` container and you should find the following below: ```status 401: Bad credentials``` ## Resolution @@ -83694,18 +83858,17 @@ The following bullets provide a general guidline to which service may require mo * `sourcegraph-frontend` CPU/memory resource allocations * `searcher` CPU/memory resource allocations (allocate enough memory to hold all non-binary files in your repositories) * `indexedSearch` CPU/memory resource allocations (for the `zoekt-indexserver` pod, allocate enough memory to hold all non-binary files in your largest repository; for the `zoekt-webserver` pod, allocate enough memory to hold ~2.7x the size of all non-binary files in your repositories) -* `symbols` CPU/memory resource allocations * `gitserver` CPU/memory resource allocations (allocate enough memory to hold your Git packed bare repositories) ## Symbols sidebar - Processing symbols ![Screen Shot 2021-11-15 at 12 35 07 AM](https://user-images.githubusercontent.com/13024338/141749036-95759cbe-abd5-4d78-91eb-618423d2f66c.png) -If you are regularly seeing the `Processing symbols is taking longer than expected. Try again in a while` warning in your sidebar, its likely that your symbols and/or gitserver services are underprovisioned and need more CPU/mem resources. +If you are regularly seeing the `Processing symbols is taking longer than expected. Try again in a while` warning in your sidebar, its likely that your searcher and/or gitserver services are underprovisioned and need more CPU/mem resources. -The symbols sidebar is dependent on the symbols and gitserver services. Upon opening the symbols sidebar, a search query is made to the GraphQL API to retrieve the symbols associated with the current git commit. You can read more about the [symbol search behavior and performance](/code-search/types/symbol#symbol-search-behavior-and-performance). +The symbols sidebar is dependent on the searcher and gitserver services. Upon opening the symbols sidebar, a search query is made to the GraphQL API to retrieve the symbols associated with the current git commit. You can read more about the [symbol search behavior and performance](/code-search/types/symbol#symbol-search-behavior-and-performance). -To address this concern, allocate more resources to the symbols service (to provide more processing power for indexing operations) and allocate more resources to the gitserver (to provide for the extra load associated with responding to fetch requests from symbols, and speed up sending the large repo). +To address this concern, allocate more resources to the searcher service (to provide more processing power for indexing operations) and allocate more resources to the gitserver (to provide for the extra load associated with responding to fetch requests from searcher, and speed up sending the large repo). Here's an example of a diff to improve symbols performance in a k8s deployment: @@ -87079,9 +87242,7 @@ Here is a list of components you can find in a typical Sourcegraph deployment: | [`frontend`](/admin/deploy/scale#frontend) | Serves the web application, extensions, and graphQL services. Almost every service has a link back to the frontend, from which it gathers configuration updates. | | [`gitserver`](/admin/deploy/scale#gitserver) | Mirrors repositories from their code host. All other Sourcegraph services talk to gitserver when they need data from git. | | [`precise-code-intel`](/admin/deploy/scale#precise-code-intel) | Converts LSIF upload file into Postgres data. The entire index must be read into memory to be correlated. | -| [`repo-updater`](/admin/deploy/scale#repo-updater) | Tracks the state of repositories. It is responsible for automatically scheduling updates using gitserver and for synchronizing metadata between code hosts and external services. | -| [`searcher`](/admin/deploy/scale#searcher) | Provides on-demand un-indexed search for repositories. It fetches archives from gitserver and searches them with regexp. | -| [`symbols`](/admin/deploy/scale#symbols) | Indexes symbols in repositories using Ctags. | +| [`searcher`](/admin/deploy/scale#searcher) | Provides on-demand un-indexed search for repositories. It fetches archives from gitserver and searches them with regexp. Indexes symbols in repositories using Ctags. | | [`syntect-server`](/admin/deploy/scale#syntect-server) | An HTTP server that exposes the Rust Syntect syntax highlighting library for use by other services. | | [`worker`](/admin/deploy/scale#worker) | Runs a collection of background jobs periodically in response to internal requests and external events. It is currently janitorial and commit based. | | [`zoekt-indexserver`](/admin/deploy/scale#zoekt-indexserver) | Indexes all enabled repositories on Sourcegraph and keeps the indexes up to date. Lives inside the indexed-search pod in a Kubernetes deployment. | @@ -87533,48 +87694,12 @@ A Redis instance for storing short-term information such as user sessions. --- -### repo-updater - -``` -Repo-updater tracks the state of repositories. -It is responsible for automatically scheduling updates using gitserver. -It is also responsible for synchronizing metadata between code hosts and external services. -Services that desire updates or fetch must communicate with repo-updater instead of gitserver. -``` - -| Replica | | -|:------------|:--------------------------------------------------------| -| `Overview` | Singleton | -| `Factors` | - | -| `Guideline` | A Singleton service should not have more than 1 replica | - -| CPU | | -|:------------|:-----------------------------------------------------------------------------------------| -| `Overview` | Most operations are not CPU bound | -| `Factors` | Most of the syncing jobs are related more to internal and code host-specific rate limits | -| `Guideline` | - | - -| Memory | | -|:------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `Overview` | The queue of repositories that need to be updated is stored in memory. It uses an in-memory queue and is mostly network intensive as it makes API calls and processes and writes those newly available data to the pgsql database | -| `Factors` | Number of repositories | -| `Guideline` | This service is safe to restart at any time. The existing in-memory update queue is reset upon restart | -| | Not memory intensive | - -| Storage | | -|:------------|:---------------------------------------------------------------| -| `Overview` | A stateless service that directly writes to the pgsql database | -| `Factors` | - | -| `Guideline` | - | -| `Type` | None | - ---- - ### searcher ``` Provides on-demand unindexed search for repositories. -It relies on the OS file page cache to speed up future searches +It relies on the OS file page cache to speed up future searches. +Also the backend for symbols operations, indexing symbols in repositories using Ctags. ``` | Replica | | @@ -87588,7 +87713,7 @@ It relies on the OS file page cache to speed up future searches |:------------|:-----------------------------------------------------------------------------------------------| | `Overview` | Searcher is IO and CPU bound. It fetches archives from gitserver and searches them with regexp | | `Factors` | Number of active users | -| `Guideline` | More engaged users = more CPU | +| `Guideline` | More engaged users = more CPU. Scale with the size of repositories as well | | Memory | | |:------------|:----------------------------------------------------------------------| @@ -87606,50 +87731,13 @@ It relies on the OS file page cache to speed up future searches | | The most important thing is to ensure fast IO for storage | | | Add more disks or replicas if you have lots of unindexed searches | | | More disk space will help speed up future caches | +| | At least 20% more than the size of your largest repository | | `Type` | Ephemeral storage for Kubernetes deployments | | | The request size of the ephemeral storage is used as a limit for the zip cache | | | Non-persistent SSD for Docker Compose | For example, if you search all branches on all repositories, that translates into lots of concurrent unindexed requests. ---- - -### symbols - -``` -The backend for symbols operations. -Indexes symbols in repositories using Ctags. -``` - -| Replica | | -|:------------|:----------------------------------------------------------------------------| -| `Overview` | Process unindexed search | -| `Factors` | Number of active users | -| `Guideline` | More requests for distinct commits in different repositories = more replica | - - -| CPU | | -|:------------|:---------------------------------------------------------------------------------------| -| `Overview` | Runs Ctags over code, stores symbol data in SQLite (or codeintel-db if using Rockskip) | -| `Factors` | Size of all repositories | -| `Guideline` | Scale with the size of repositories | - - -| Memory | | -|:------------|:--------------------------------------------------------------------| -| `Overview` | Stores symbol data in SQLite and/or Postgres if Rockskip is enabled | -| `Factors` | Size of all repositories | -| `Guideline` | Scale with the size of repositories | - -| Storage | | -|:------------|:---------------------------------------------------------------------------------------------------------------------| -| `Overview` | Saves SQLite DBs as files on disk in LRU fashion and copies an old one to a new file when a user visits a new commit | -| `Factors` | Size of the largest repository | -| `Guideline` | At least 20% more than the size of your largest repository | -| | Using SSD is highly preferred | -| `Type` | Ephemeral storage for Kubernetes deployments | -| | Non-persistent SSD for Docker Compose | - If Rockskip is enabled, the symbols for repositories indexed by [Rockskip](/code-search/code-navigation/rockskip) are stored in codeintel-db instead. --- @@ -89367,34 +89455,34 @@ This error occurs because Envoy, the proxy used by Istio, [drops proxied trailer In a service mesh like Istio, communication between services is secured using a feature called mutual Transport Layer Security (mTLS). mTLS relies on services communicating with each other using DNS names, rather than IP addresses, to identify the specific services or pods that the communication is intended for. -To illustrate this, consider the following examples of communication flows between the "frontend" component and the "symbols" component: +To illustrate this, consider the following examples of communication flows between the "frontend" component and the "searcher" component: Example 1: Approved Communication Flow -1. Frontend sends a request to `http://symbol_pod_ip:3184` +1. Frontend sends a request to `http://searcher_pod_ip:3184` 2. The Envoy sidecar intercepts the request -3. Envoy looks up the upstream service using the DNS name "symbols" -4. Envoy forwards the request to the symbols component +3. Envoy looks up the upstream service using the DNS name "searcher" +4. Envoy forwards the request to the searcher component Example 2: Disapproved Communication Flow -1. Frontend sends a request to `http://symbol_pod_ip:3184` +1. Frontend sends a request to `http://searcher_pod_ip:3184` 2. The Envoy sidecar intercepts the request -3. Envoy tries to look up the upstream service using the IP address `symbol_pod_ip` +3. Envoy tries to look up the upstream service using the IP address `searcher_pod_ip` 4. Envoy is unable to find the upstream service because it's an IP address not a DNS name -5. Envoy will not forward the request to the symbols component +5. Envoy will not forward the request to the searcher component > NOTE: When using mTLS, communication between services must be made using the DNS names of the services, rather than their IP addresses. This is to ensure that the service mesh can properly identify and secure the communication. -To resolve this issue, the solution is to redeploy the frontend after specifying the service address for symbols by setting the SYMBOLS_URL environment variable in frontend. +To resolve this issue, the solution is to redeploy the frontend after specifying the service address for searcher by setting the SEARCHER_URL environment variable in frontend. Please make sure the old frontend pods are removed. ```yaml -SYMBOLS_URL=http:symbols:3184 +SEARCHER_URL=http:searcher:3184 ``` -> WARNING: **This option is recommended only for symbols with a single replica**. Enabling this option will negatively impact the performance of the symbols service when it has multiple replicas, as it will no longer be able to distribute requests by repository/commit. +> WARNING: **This option is recommended only for searcher with a single replica**. Enabling this option will negatively impact the performance of the searcher service when it has multiple replicas, as it will no longer be able to distribute requests by repository/commit. #### Squirrel.LocalCodeIntel http status 502 @@ -89428,10 +89516,9 @@ For production environments, we recommend allocate resources based on your [inst Here is a simplified list of the key parameters to tune when scaling Sourcegraph to many repositories: - `sourcegraph-frontend` CPU/memory resource allocations -- `searcher` replica count +- `searcher` replica count and CPU/memory resource allocations - `indexedSearch` replica count and CPU/memory resource allocations - `gitserver` replica count -- `symbols` replica count and CPU/memory resource allocations - `gitMaxConcurrentClones`, because `git clone` and `git fetch` operations are IO and CPU-intensive - `repoListUpdateInterval` (in minutes), because each interval triggers `git fetch` operations for all repositories @@ -89451,7 +89538,6 @@ Here is a simplified list of key parameters to tune when scaling Sourcegraph to - `sourcegraph-frontend` CPU/memory resource allocations - `searcher` CPU/memory resource allocations (allocate enough memory to hold all non-binary files in your repositories) - `indexedSearch` CPU/memory resource allocations (for the `zoekt-indexserver` pod, allocate enough memory to hold all non-binary files in your largest repository; for the `zoekt-webserver` pod, allocate enough memory to hold ~2.7x the size of all non-binary files in your repositories) -- `symbols` CPU/memory resource allocations - `gitserver` CPU/memory resource allocations (allocate enough memory to hold your Git packed bare repositories) --- @@ -89898,11 +89984,9 @@ precise-code-intel-worker ClusterIP 10.72.11.102 3188/TC prometheus ClusterIP 10.72.12.201 30090/TCP 25h redis-cache ClusterIP 10.72.15.138 6379/TCP,9121/TCP 25h redis-store ClusterIP 10.72.4.162 6379/TCP,9121/TCP 25h -repo-updater ClusterIP 10.72.11.176 3182/TCP,6060/TCP 25h searcher ClusterIP None 3181/TCP,6060/TCP 23h sourcegraph-frontend ClusterIP 10.72.12.103 30080/TCP,6060/TCP 25h sourcegraph-frontend-internal ClusterIP 10.72.9.155 80/TCP 25h -symbols ClusterIP None 3184/TCP,6060/TCP 23h syntect-server ClusterIP 10.72.14.49 9238/TCP,6060/TCP 25h worker ClusterIP 10.72.7.72 3189/TCP,6060/TCP 25h ``` @@ -91088,11 +91172,9 @@ Scale down `deployments` and `statefulSets` that access the database, _this step The following services must have their replicas scaled to 0: - Deployments (e.g., `kubectl scale deployment --replicas=0`) - precise-code-intel-worker -- repo-updater - searcher - sourcegraph-frontend - sourcegraph-frontend-internal -- symbols - worker - Stateful sets (e.g., `kubectl scale sts --replicas=0`): - gitserver @@ -92361,7 +92443,7 @@ patches: You can update environment variables for **searcher** with `patches`. -For example, to update the value for `SEARCHER_CACHE_SIZE_MB`: +For example, to update the value for `SEARCHER_CACHE_SIZE_MB` and `SEARCHER_CACHE_SIZE_MB`: ```yaml # instances/$INSTANCE_NAME/kustomization.yaml @@ -92375,21 +92457,6 @@ For example, to update the value for `SEARCHER_CACHE_SIZE_MB`: value: name: SEARCHER_CACHE_SIZE_MB value: "50000" -``` - -### Symbols - -You can update environment variables for **searcher** with `patches`. - -For example, to update the value for `SYMBOLS_CACHE_SIZE_MB`: - -```yaml -# instances/$INSTANCE_NAME/kustomization.yaml - patches: - - target: - name: symbols - kind: StatefulSet|Deployment - patch: |- - op: replace path: /spec/template/spec/containers/0/env/0 value: @@ -92465,12 +92532,9 @@ Sourcegraph supports specifying an external Redis server with these environment When using an external Redis server, the corresponding environment variable must also be added to the following services: - - `sourcegraph-frontend` -- `repo-updater` - `gitserver` - `searcher` -- `symbols` - `worker` **Step 1**: Include the `services/redis` component in your components: @@ -92788,7 +92852,7 @@ Here are the benefits of the new base cluster with the new Kustomize setup compa - Streamlined resource allocation process: * Allocates resources based on the size of the instance * Optimized through load testing - * The searcher and symbols use StatefulSets and do not require ephemeral storage + * The searcher StatefulSet does not require ephemeral storage - Utilizes the Kubernetes-native tool Kustomize: * Built into kubectl * No additional scripting required @@ -92965,6 +93029,8 @@ If your instance was deployed using the non-privileged overlay, you can follow t ## Step 9: Build and review new manifests +> NOTE: Symbols has been removed in Sourcegraph 6.4. + `pgsql`, `codeinsights-db`, `searcher`, `symbols`, and `codeintel-db` have been changed from `Deployments` to `StatefulSets`. However, redeploying these services as StatefulSets should not affect your existing deployment as they are all configured to use the same PVCs. ### From Deployment to StatefulSet @@ -94402,9 +94468,7 @@ prometheus /bin/prom-wrapper Up query-runner /sbin/tini -- /usr/local/b ... Up redis-cache /sbin/tini -- redis-server ... Up 6379/tcp redis-store /sbin/tini -- redis-server ... Up 6379/tcp -repo-updater /sbin/tini -- /usr/local/b ... Up searcher-0 /sbin/tini -- /usr/local/b ... Up (healthy) -symbols-0 /sbin/tini -- /usr/local/b ... Up (healthy) 3184/tcp syntect-server sh -c /http-server-stabili ... Up (healthy) 9238/tcp worker /sbin/tini -- /usr/local/b ... Up 3189/tcp zoekt-indexserver-0 /sbin/tini -- zoekt-source ... Up @@ -94472,9 +94536,7 @@ prometheus /bin/prom-wrapper Up query-runner /sbin/tini -- /usr/local/b ... Up redis-cache /sbin/tini -- redis-server ... Up 6379/tcp redis-store /sbin/tini -- redis-server ... Up 6379/tcp -repo-updater /sbin/tini -- /usr/local/b ... Up searcher-0 /sbin/tini -- /usr/local/b ... Up (healthy) -symbols-0 /sbin/tini -- /usr/local/b ... Up (healthy) 3184/tcp syntect-server sh -c /http-server-stabili ... Up (healthy) 9238/tcp worker /sbin/tini -- /usr/local/b ... Up 3189/tcp zoekt-indexserver-0 /sbin/tini -- zoekt-source ... Up @@ -95393,7 +95455,7 @@ If you must use a `.netrc` file to store these credentials instead, follow the p ## Add replicas -When adding replicas for `gitserver`, `searcher`, `symbols`, `zoekt-indexserver`, or `zoekt-webserver`, you must update the corresponding environment variable on each of the frontend services in your docker-compose.override.yaml file to the number of replicas for the respective service. Sourcegraph will then automatically infer the containers' endpoints for each replica. +When adding replicas for `gitserver`, `searcher`, `zoekt-indexserver`, or `zoekt-webserver`, you must update the corresponding environment variable on each of the frontend services in your docker-compose.override.yaml file to the number of replicas for the respective service. Sourcegraph will then automatically infer the containers' endpoints for each replica. ```yaml # docker-compose.override.yaml @@ -95405,7 +95467,6 @@ services: - 'INDEXED_SEARCH_SERVERS=1' - 'SEARCHER_URL=1' - 'SRC_GIT_SERVERS=1' - - 'SYMBOLS_URL=1' sourcegraph-frontend-internal: environment: @@ -95413,7 +95474,6 @@ services: - 'INDEXED_SEARCH_SERVERS=1' - 'SEARCHER_URL=1' - 'SRC_GIT_SERVERS=1' - - 'SYMBOLS_URL=1' ``` ## Shard gitserver @@ -95888,306 +95948,617 @@ All site configuration options and their default values are shown below. ### admin/config/site.schema.json +{/* SCHEMA_SYNC_START: admin/config/site.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:25Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { + + ////////////////////////////////////////////////////////////// + // General Configuration + ////////////////////////////////////////////////////////////// + // Prompts user to install new browser for non es5 "RedirectUnsupportedBrowser": false, - // Configuration options for App only. - "app": null, + // Enable/Disable attribution search for Cody-generated snippets + "attribution.enabled": false, + + // Use this gateway parameters for customers that bring their own key. Otherwise gateway endpoint is used. + "attribution.gateway": { + "accessToken": null, + "endpoint": null + }, + + // Hide Cody-generated snippets that have attribution matches ("enforced"), or show the snippet but passively inform the user about attribution ("permissive", the default). Requires attribution.enabled = true. + // Valid options: "permissive", "enforced" + "attribution.mode": "permissive", + + // Automatically delete branches created for Batch Changes changesets when the changeset is merged or closed, for supported code hosts. Overrides any setting on the repository on the code host itself. + "batchChanges.autoDeleteBranch": false, + + // How long changesets will be retained after they have been detached from a batch change. // Other example values: - // - { - // "app": { - // "dotcomAuthToken": "abc123" - // } - // } + // - "336h" + // - "48h" + // - "5h30m40s" + "batchChanges.changesetsRetention": null, - // Enables and configures password policy. This will allow admins to enforce password complexity and length requirements. - "auth.passwordPolicy": null, + // A list of permitted container registries for use in batch changes, e.g., docker.io. If empty, all container registries are allowed. It cannot be used together with 'batchChanges.containerRegistryDenylist' // Other example values: - // - { - // "enabled": true, - // "numberOfSpecialCharacters": 1, - // "requireAtLeastOneNumber": true, - // "requireUpperandLowerCase": true - // } + // - "docker.io" + // - "artifactory.acme.com" + "batchChanges.containerRegistryAllowlist": null, - // When true, site admins will only be able to see private code they have access to via our authz system. - "authz.enforceForSiteAdmins": false, + // A list of forbidden container registries for use in batch changes, e.g., docker.io. If empty, all container registries are allowed. It cannot be used together with 'batchChanges.containerRegistryAllowlist' + // Other example values: + // - "docker.io" + // - "artifactory.acme.com" + "batchChanges.containerRegistryDenylist": null, - // Time interval (in seconds) of how often each component picks up authorization changes in external services. - "authz.refreshInterval": 5, + // Hides Batch Changes warnings about webhooks not being configured. + "batchChanges.disableWebhooksWarning": false, + + // Enables/disables the Batch Changes feature. + "batchChanges.enabled": true, + + // When enabled, all branches created by batch changes will be pushed to forks of the original repository. + "batchChanges.enforceForks": false, // Reject unverified commits when creating a Batch Change "batchChanges.rejectUnverifiedCommit": false, - // Customize Sourcegraph homepage logo and search icon. - // - // Only available in Sourcegraph Enterprise. - "branding": null, + // When enabled, only site admins can create and apply batch changes. + "batchChanges.restrictToAdmins": false, + + // Specifies specific windows, which can have associated rate limits, to be used when reconciling published changesets (creating or updating). All days and times are handled in UTC. // Other example values: // - { - // "dark": { - // "logo": "https://example.com/logo_dark.png", - // "symbol": "https://example.com/search_symbol_dark_24x24.png" - // }, - // "disableSymbolSpin": true, - // "favicon": "https://example.com/favicon.ico", - // "light": { - // "logo": "https://example.com/logo_light.png", - // "symbol": "https://example.com/search_symbol_light_24x24.png" - // } + // "days": [ + // "saturday", + // "sunday" + // ], + // "end": "20:00", + // "rate": "10/hour", + // "start": "06:00" // } + "batchChanges.rolloutWindows": null, - // Whether clone progress should be logged to a file. If enabled, logs are written to files in the OS default path for temporary files. - "cloneProgress.log": false, + // Maximum number of batch spec templates to display in the template library UI. Default is 20. + "batchChanges.templateLibrary.displayLimit": 20, - // Configuration for the completions service. - "completions": null, - // Other example values: - // - { - // "accessToken": "abc123", - // "chatModel": "chat", - // "completionModel": "code-completion", - // "enabled": true, - // "perUserDailyLimit": 100, - // "provider": "openai" - // } + // Whether auto-indexing policies may apply to all repositories on the Sourcegraph instance. Default is false. The policyRepositoryMatchLimit setting still applies to such auto-indexing policies. + "codeIntelAutoIndexing.allowGlobalPolicies": false, - // The rate limit (in requests per hour) for the default rate limiter in the rate limiters registry. By default this is disabled and the default rate limit is infinity. - "defaultRateLimit": -1, + // Enables/disables the code intel auto-indexing feature. Currently experimental. + "codeIntelAutoIndexing.enabled": false, - // Configuration for embeddings service. - "embeddings": null, + // Overrides the default Docker images used by auto-indexing. // Other example values: // - { - // "accessToken": "your-access-token", - // "dimensions": 1536, - // "enabled": true, - // "excludedFilePathPatterns": [ - // "*.svg", - // "**/__mocks__/**", - // "**/test/**" - // ], - // "model": "text-embedding-ada-002", - // "url": "https://api.openai.com/v1/embeddings" + // "go": "sourcegraph/lsif-go:latest", + // "java": "sourcegraph/lsif-java:latest" // } + "codeIntelAutoIndexing.indexerMap": null, - // Configuration for encryption keys used to encrypt data at rest in the database. - "encryption.keys": null, + // The maximum number of repositories to which a single auto-indexing policy can apply. Default is -1, which is unlimited. + "codeIntelAutoIndexing.policyRepositoryMatchLimit": -1, + + // Configuration options for code monitors + "codeMonitors": { + "concurrency": 4, + "maxRuntime": 1, + "pollInterval": "5m" + }, + + // Rules defining the repositories that will never be shared by Cody with third-party LLM providers. + "cody.contextFilters": { + "exclude": null, + "include": null + }, + + // Enable or disable Cody instance-wide. When Cody is disabled, all Cody endpoints and GraphQL queries will return errors, Cody will not show up in the site-admin sidebar, and Cody in the global navbar will only show a call-to-action for site-admins to enable Cody. + "cody.enabled": false, + + // Whether to enable Cody role-based access controls. Only respected if cody.restrictUsersFeatureFlag is not set. See https://sourcegraph.com/docs/admin/access_control + "cody.permissions": true, + + // DEPRECATED; see cody.permissions instead. PRIOR DESCRIPTION: Cody to only be enabled for users that have a feature flag labeled "cody" set to true. You must create a feature flag with this ID after enabling this setting: https://www.notion.so/sourcegraph/How-to-use-feature-flags-70f42bcacd9045d4a55de22f5dd87df0?source=copy_link. This setting only has an effect if cody.enabled is true. + "cody.restrictUsersFeatureFlag": false, + + // Configuration for Server-side context API + "cody.serverSideContext": { + "reranker": { + "type": null + } + }, + + // Configuration for the completions service. // Other example values: // - { - // "externalServiceKey": { - // "filePath": "/path/to/external_service.key", - // "type": "mounted" - // } - // } - // - { - // "userExternalAccountKey": { - // "keyname": "projects/my-project/locations/global/keyRings/my-keyring/cryptoKeys/my-key", - // "type": "cloudkms" - // } + // "chat": true // } + "configFeatures": { + "autoComplete": false, + "chat": false, + "chatVision": false, + "commands": false + }, - // The shared secret between Sourcegraph and executors. The value must contain at least 20 characters. - "executors.accessToken": null, + // Enables the computation of contributor statistics per author and repository. Will all commits of each repository initially, and then work on deltas. // Other example values: - // - "my-super-secret-access-token" - - // The image to use for batch changes in executors. Use this value to pull from a custom image registry. - "executors.batcheshelperImage": "sourcegraph/batcheshelper", + // - true + "contributorsDataEnabled": true, - // The tag to use for the batcheshelper image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. - "executors.batcheshelperImageTag": null, + // Required when using any of the native code host integrations for Phabricator, GitLab, or Bitbucket Server. It is a space-separated list of allowed origins for cross-origin HTTP requests which should be the base URL for your Phabricator, GitLab, or Bitbucket Server instance. // Other example values: - // - "4.1.0" + // - "https://my-phabricator.example.com https://my-bitbucket.example.com https://my-gitlab.example.com" + "corsOrigin": null, - // The URL where Sourcegraph executors can reach the Sourcegraph instance. If not set, defaults to externalURL. URLs with a path (other than `/`) are not allowed. For Docker executors, the special hostname `host.docker.internal` can be used to refer to the Docker container's host. - "executors.frontendURL": null, + // (debug) controls the amount of symbol search parallelism. Defaults to 20. It is not recommended to change this outside of debugging scenarios. This option will be removed in a future version. // Other example values: - // - "https://sourcegraph.example.com" + // - "20" + "debug.search.symbolsParallelism": 0, - // The tag to use for the lsif-go image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. - "executors.lsifGoImage": null, - // Other example values: - // - "sourcegraph/lsif-go" + // The rate limit (in requests per hour) for the default rate limiter in the rate limiters registry. By default this is disabled and the default rate limit is infinity. + "defaultRateLimit": -1, - // The configuration for multiqueue executors. - "executors.multiqueue": null, + // Disable periodic syncs of configured code host connections (repository metadata, permissions, batch changes changesets, etc) + "disableAutoCodeHostSyncs": false, - // The image to use for src-cli in executors. Use this value to pull from a custom image registry. - "executors.srcCLIImage": "sourcegraph/src-cli", + // Disable periodically fetching git contents for existing repositories. + "disableAutoGitUpdates": false, - // The tag to use for the src-cli image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. - "executors.srcCLIImageTag": null, - // Other example values: - // - "4.1.0" + // Disable the feedback survey + "disableFeedbackSurvey": false, - "exportUsageTelemetry": null, - // Other example values: - // - { - // "batchSize": 1000, - // "enabled": true, - // "topicName": "usage-data", - // "topicProjectName": "my-project" - // } - // - {"enabled":false} + // DEPRECATED. Has no effect. + "disableNonCriticalTelemetry": false, - // The externally accessible URL for Sourcegraph (i.e., what you type into your browser). Previously called `appURL`. Only root URLs are allowed. - "externalURL": null, + // ⚠️ DEPRECATED: Deprecated because it's no longer supported and hasn't been working for a while. + // DEPRECATED! Disable redirects to sourcegraph.com when visiting public repositories that can't exist on this server. // Other example values: - // - "https://sourcegraph.example.com" + // - true + "disablePublicRepoRedirects": false, - // DEPRECATED: The config options for Sourcegraph GitHub App. - "gitHubApp": null, - // Other example values: - // - { - // "appID": "1234", - // "clientID": "client-id", - // "clientSecret": "client-secret", - // "privateKey": "base64-encoded-private-key", - // "slug": "sourcegraph" - // } + // Configuration options for Sourcegraph.com only. + "dotcom": { + "codyGateway": { + "bigQueryDataset": null, + "bigQueryGoogleProjectID": null, + "bigQueryTable": null + }, + "codyProConfig": { + "samsBackendOrigin": "", + "sscBackendOrigin": "", + "sscBaseUrl": "https://accounts.sourcegraph.com/cody", + "stripePublishableKey": null, + "useEmbeddedUI": false + }, + "enterprisePortal.enableProxies": true, + "sams.clientID": null, + "sams.clientSecret": null, + "sams.server": null, + "samsDev.clientID": null, + "samsDev.clientSecret": null, + "samsDev.server": "https://accounts.sgdev.org", + "srcCliVersionCache": { + "enabled": false, + "github": { + "repository": { + "name": "src-cli", + "owner": "sourcegraph" + }, + "token": null, + "uri": "https://github.com", + "webhookSecret": null + }, + "interval": "1h" + } + }, - // Record git operations that are executed on configured repositories. - "gitRecorder": null, + // The "from" address for emails sent by this server. + // Please see https://sourcegraph.com/docs/admin/config/email // Other example values: - // - { - // "ignoredGitCommands": [ - // "show", - // "rev-parse", - // "log", - // "diff", - // "ls-tree" - // ], - // "repos": [ - // "github.com/sourcegraph/sourcegraph", - // "github.com/gorilla/mux" - // ], - // "size": 1000 - // } - - // Disk usage threshold at which to display warning notification. Value is a percentage. - "gitserver.diskUsageWarningThreshold": 90, + // - "noreply@sourcegraph.example.com" + "email.address": null, - // Configuration for logging and alerting, including to external services. - "log": null, + // The name to use in the "from" address for emails sent by this server. + // Other example values: + // - "Our Company Sourcegraph" + // - "Example Inc Sourcegraph" + "email.senderName": "Sourcegraph", - // Notifications recieved from Sourcegraph.com to display in Sourcegraph. - "notifications": null, + // The SMTP server used to send transactional emails. + // Please see https://sourcegraph.com/docs/admin/config/email // Other example values: // - { - // "key": "2023-03-10-my-key", - // "message": "This is a test notification message." + // "authentication": "PLAIN", + // "host": "smtp.example.com", + // "password": "mypassword", + // "port": 465, + // "username": "alice" // } + "email.smtp": null, - // Configure notifications for Sourcegraph's built-in alerts. Not configurable for Sourcegraph Cloud instances. - "observability.alerts": null, + // Configurable templates for some email types sent by Sourcegraph. // Other example values: // - { - // "level": "critical", - // "notifier": { - // "channel": "#alerts", - // "type": "slack", - // "url": "https://hooks.slack.com/services/..." - // } - // } - // - { - // "level": "warning", - // "notifier": { - // "address": "alerts@example.com", - // "type": "email" + // "resetPassword": { + // "body": "To reset your password on {{.Host}}, please click the link below:\n\n{{.URL}}\n\nIf you did not request a password reset, please ignore this email. Your password will not change until you click the link and set a new password.", + // "subject": "Reset your password on {{.Host}}" + // }, + // "setPassword": { + // "body": "To set your password on {{.Host}} and complete your account registration, please click the link below:\n\n{{.URL}}\n\nYour username is: {{.Username}}\n\nIf you did not sign up for an account on {{.Host}}, please ignore this email.", + // "subject": "Set your password on {{.Host}}" // } // } + "email.templates": { + "resetPassword": null, + "setPassword": null + }, - // EXPERIMENTAL: Configuration for client observability - "observability.client": null, + // Configure completion credits entitlement enablement + "entitlements.completionCredits": { + "mode": "disabled" + }, + + // Experimental features and settings. // Other example values: // - { - // "openTelemetry": { - // "endpoint": "/-/debug/otlp" - // } + // "customGitFetch": [ + // { + // "domainPath": "somecodehost.com/path/to/repo", + // "fetch": "customgitbinary someflag" + // }, + // { + // "domainPath": "somecodehost.com/path/to/anotherrepo", + // "fetch": "customgitbinary someflag anotherflag" + // } + // ] // } // - { - // "openTelemetry": { - // "endpoint": "https://opentelemetry.example.com" + // "tls.external": { + // "certificates": [ + // "-----BEGIN CERTIFICATE-----\n..." + // ], + // "insecureSkipVerify": true // } // } + "experimentalFeatures": { + "batchChanges.enableForkNameSuffix": false, + "batchChanges.enablePerforce": false, + "codeintelSyntacticIndexing.enabled": false, + "cody.auditLog": { + "enabled": false + }, + "codyContextIgnore": false, + "commitGraphUpdates": { + "defaultBranchOnly": null + }, + "customGitFetch": null, + "debug.log": { + "extsvc.gitlab": false + }, + "deepSearch.enabled": false, + "deepSearch.model": "anthropic::2024-10-22::claude-sonnet-4-latest", + "deepSearch.sharing.enabled": false, + "enableGithubInternalRepoVisibility": false, + "enablePermissionsWebhooks": false, + "enableStorm": false, + "eventLogging": "enabled", + "gitServerPinnedRepos": null, + "goPackages": "disabled", + "insightsAlternateLoadingStrategy": false, + "insightsBackfillerV2": true, + "insightsDataRetention": true, + "jvmPackages": "disabled", + "languageDetection": { + "graphQL": "useFileContents" + }, + "npmPackages": "disabled", + "pagure": "disabled", + "passwordPolicy": { + "enabled": true, + "minimumLength": 12, + "numberOfSpecialCharacters": 2, + "requireAtLeastOneNumber": true, + "requireUpperandLowerCase": true + }, + "perforceChangelistMapping": "enabled", + "pythonPackages": "disabled", + "ranking": { + "flushWallTimeMS": 500, + "maxQueueMatchCount": -1, + "maxQueueSizeBytes": -1, + "maxReorderDurationMS": 0, + "maxReorderQueueSize": 24, + "repoScores": {} + }, + "rateLimitAnonymous": 500, + "rubyPackages": "disabled", + "rustPackages": "disabled", + "scipBasedAPIs": true, + "search.index.branches": null, + "search.index.query.contexts": false, + "search.index.revisions": null, + "search.sanitization": { + "orgName": null, + "sanitizePatterns": null + }, + "searchJobs": false, + "structuralSearch": "disabled", + "subRepoPermissions": { + "allowCodeInsights": false, + "enabled": false, + "enforceIPRestrictions": false, + "ipParseCacheSize": 1000, + "redactInaccessibleCommits": false, + "rulesInterpretationMode": "unified", + "userCacheSize": 1000, + "userCacheTTLSeconds": 10 + }, + "tls.external": { + "certificates": null, + "insecureSkipVerify": false + } + }, - // Silence individual Sourcegraph alerts by identifier. - "observability.silenceAlerts": null, + // The externally accessible URL for Sourcegraph (i.e., what you type into your browser). Previously called `appURL`. Only root URLs are allowed. // Other example values: - // - [ - // "warning_gitserver_disk_space_remaining" - // ] - // - [ - // "critical_frontend_down", - // "warning_high_load" - // ] + // - "https://sourcegraph.example.com" + "externalURL": null, - // Configures distributed tracing within Sourcegraph. To learn more, refer to https://sourcegraph.com/docs/admin/observability/tracing - "observability.tracing": null, + // HTML to inject at the bottom of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. + "htmlBodyBottom": null, + + // HTML to inject at the top of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. + "htmlBodyTop": null, + + // HTML to inject at the bottom of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. + "htmlHeadBottom": null, + + // HTML to inject at the top of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. + "htmlHeadTop": null, + + // The size of the buffer for aggregations ran in-memory. A higher limit might strain memory for the frontend + "insights.aggregations.bufferSize": 500, + + // The maximum number of results a proactive search aggregation can accept before stopping + "insights.aggregations.proactiveResultLimit": 50000, + + // Set the number of seconds an insight series will spend backfilling before being interrupted. Series are interrupted to prevent long running insights from exhausting all of the available workers. Interrupted series will be placed back in the queue and retried based on their priority. + "insights.backfill.interruptAfter": 60, + + // Number of repositories within the batch to backfill concurrently. + "insights.backfill.repositoryConcurrency": 3, + + // Set the number of repositories to batch in a group during backfilling. + "insights.backfill.repositoryGroupSize": 10, + + // Maximum number of historical Code Insights data frames that may be analyzed per second. + // Other example values: + // - 50 + // - 0.5 + "insights.historical.worker.rateLimit": 20, + + // The allowed burst rate for the Code Insights historical worker rate limiter. + // Other example values: + // - 10 + // - 20 + "insights.historical.worker.rateLimitBurst": 20, + + // The maximum number of data points that will be available to view for a series on a code insight. Points beyond that will be stored in a separate table and available for data export. + // Other example values: + // - 12 + // - 24 + // - 50 + "insights.maximumSampleSize": 30, + + // Number of concurrent executions of a code insight query on a worker node + // Other example values: + // - 10 + "insights.query.worker.concurrency": 1, + + // Maximum number of Code Insights queries initiated per second on a worker node. + // Other example values: + // - 10 + // - 0.5 + "insights.query.worker.rateLimit": 20, + + // The allowed burst rate for the Code Insights queries per second rate limiter. + // Other example values: + // - 10 + // - 20 + "insights.query.worker.rateLimitBurst": 20, + + // Settings for repository language stats inventory // Other example values: // - { - // "debug": false, - // "sampling": "selective", - // "type": "opentelemetry", - // "urlTemplate": "https://ui.honeycomb.io/$ORG/environments/$DATASET/trace?trace_id={{ .TraceID }}" + // "disableEnhancedLanguageDetection": false, + // "gitServerConcurrency": 4, + // "maxInventoryInMemory": 1000, + // "redisConcurrency": 20, + // "timeoutInMinutes": 5 // } + "inventory": { + "disableEnhancedLanguageDetection": false, + "gitServerConcurrency": 4, + "maxInventoryInMemory": 1000, + "redisConcurrency": 20, + "timeoutInMinutes": 5 + }, + + // The license key associated with a Sourcegraph product subscription, which is necessary to activate Sourcegraph Enterprise functionality. To obtain this value, contact Sourcegraph to purchase a subscription. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. + "licenseKey": null, + + // Whether or not LSIF uploads will be blocked unless a valid LSIF upload token is provided. + "lsifEnforceAuth": false, + + // DEPRECATED: Configure maxRepos in search.limits. The maximum number of repositories to search across. The user is prompted to narrow their query if exceeded. Any value less than or equal to zero means unlimited. + "maxReposToSearch": -1, + + "modelConfiguration": null, + + // Notifications recieved from Sourcegraph.com to display in Sourcegraph. + // Other example values: // - { - // "debug": true, - // "sampling": "all", - // "type": "opentelemetry", // Jaeger now uses the OpenTelemetry format, the old jaeger format is deprecated - // "urlTemplate": "{{ .ExternalURL }}/-/debug/jaeger/trace/{{ .TraceID }}" + // "key": "2023-03-10-my-key", + // "message": "This is a test notification message." // } + "notifications": null, // Configuration for organization invitations. - "organizationInvitations": null, // Other example values: // - { // "expiryTime": 48, // "signingKey": "your-signing-key" // } + "organizationInvitations": { + "expiryTime": 48, + "signingKey": null + }, // The maximum number of outbound requests to retain. This is a global limit across all outbound requests. If the limit is exceeded, older items will be deleted. If the limit is 0, no outbound requests are logged. "outboundRequestLogLimit": 50, + // The max number of concurrent Own jobs that will run per worker node. + "own.background.repoIndexConcurrencyLimit": 5, + + // The maximum per second burst of repositories for Own jobs per worker node. Generally this value should not be less than the max concurrency. + "own.background.repoIndexRateBurstLimit": 5, + + // The maximum per second rate of repositories for Own jobs per worker node. + "own.background.repoIndexRateLimit": 20, + + // The Own service will attempt to match a Team by the last part of its handle if it contains a slash and no match is found for its full handle. + "own.bestEffortTeamMatching": true, + + // URL to fetch unreachable repository details from. Defaults to "https://sourcegraph.com" + // Other example values: + // - { + // "url": "https://sourcegraph.example.com" + // } + "parentSourcegraph": { + "url": "https://sourcegraph.com" + }, + // Time interval (in seconds) of how often cleanup worker should remove old jobs from permissions sync jobs table. - "permissions.syncJobCleanupInterval": 60, + "permissions.syncJobCleanupInterval": 3600, - // The number of last repo/user permission jobs to keep for history. + // The number of last repo/user permission jobs to keep for history. Will be cleaned up occasionally to only keep the most recent N jobs. "permissions.syncJobsHistorySize": 5, // Number of repo permissions to schedule for syncing in single scheduler iteration. - "permissions.syncOldestRepos": 10, + "permissions.syncOldestRepos": 100, // Number of user permissions to schedule for syncing in single scheduler iteration. - "permissions.syncOldestUsers": 10, + "permissions.syncOldestUsers": 100, // Don't sync a repo's permissions if it has synced within the last n seconds. - "permissions.syncReposBackoffSeconds": 60, + "permissions.syncReposBackoffSeconds": 900, + + // The maximum number of repo-centric permissions syncing jobs that can be spawned concurrently. Service restart is required to take effect for changes. + "permissions.syncReposMaxConcurrency": 5, // Time interval (in seconds) of how often each component picks up authorization changes in external services. - "permissions.syncScheduleInterval": 15, + "permissions.syncScheduleInterval": 60, // Don't sync a user's permissions if they have synced within the last n seconds. - "permissions.syncUsersBackoffSeconds": 60, + "permissions.syncUsersBackoffSeconds": 900, - // The maximum number of user-centric permissions syncing jobs that can be spawned concurrently. Server restart is required for changes to take effect. - "permissions.syncUsersMaxConcurrency": 1, + // The maximum number of user-centric permissions syncing jobs that can be spawned concurrently. Service restart is required to take effect for changes. + "permissions.syncUsersMaxConcurrency": 5, - // The maximum number of repo-centric permissions syncing jobs that can be spawned concurrently. Server restart is required for changes to take effect. - "permissions.syncReposMaxConcurrency": 5, - - "rateLimits": null, - - // Enables redacting sensitive information from outbound requests. Important: We only respect this setting in development environments. In production, we always redact outbound requests. - "redactOutboundRequestHeaders": null, + // Settings for Sourcegraph explicit permissions, which allow the site admin to explicitly manage repository permissions via the GraphQL API. This will mark repositories as restricted by default. + // Other example values: + // - { + // "bindID": "email" + // } + // - { + // "bindID": "username" + // } + "permissions.userMapping": { + "bindID": "email", + "enabled": true + }, + + // Enables users access to the product research page in their settings. + "productResearchPage.enabled": true, + + "rateLimits": { + "graphQLMaxAliases": 500, + "graphQLMaxDepth": 30, + "graphQLMaxDuplicateFieldCount": 500, + "graphQLMaxFieldCount": 500000, + "graphQLMaxUniqueFieldCount": 500 + }, + + // Enables redacting sensitive information from outbound requests. Important: We only respect this setting in development environments. In production, we always redact outbound requests. // Other example values: // - true + "redactOutboundRequestHeaders": false, + + // The number of concurrent external service syncers that can run. + "repoConcurrentExternalServiceSyncers": 3, + + // Interval (in minutes) for checking code hosts (such as GitHub, Gitolite, etc.) for new repositories. + "repoListUpdateInterval": 1, + + // Configuration for repository purge worker. + "repoPurgeWorker": { + "deletedTTLMinutes": 60, + "intervalMinutes": 15 + }, + + // The SCIM auth token is used to authenticate SCIM requests. If not set, SCIM is disabled. + "scim.authToken": "", + + // Identity provider used for SCIM support. "STANDARD" should be used unless a more specific value is available + // Valid options: "STANDARD", "Azure AD" + "scim.identityProvider": "STANDARD", + + // The number of threads each indexserver should use to index shards. If not set, indexserver will use the number of available CPUs. This is exposed as a safeguard and should usually not require being set. + // Other example values: + // - "10" + "search.index.shardConcurrency": 0, + + // Whether indexed symbol search is enabled. This is contingent on the indexed search configuration, and is true by default for instances with indexed search enabled. Enabling this will cause every repository to re-index, which is a time consuming (several hours) operation. Additionally, it requires more storage and ram to accommodate the added symbols information in the search index. + // Other example values: + // - true + "search.index.symbols.enabled": false, + + // A list of file glob patterns where matching files will be indexed and searched regardless of their size. Files still need to be valid utf-8 to be indexed. The glob pattern syntax can be found here: https://github.com/bmatcuk/doublestar#patterns. + // Other example values: + // - [ + // "go.sum", + // "package-lock.json", + // "**/*.thrift" + // ] + "search.largeFiles": null, + + // Limits that search applies for number of repositories searched and timeouts. + // Other example values: + // - { + // "commitDiffMaxRepos": 50, + // "commitDiffWithTimeFilterMaxRepos": 5000, + // "maxRepos": 200, + // "maxTimeoutSeconds": 60 + // } + "search.limits": { + "commitDiffMaxRepos": 50, + "commitDiffWithTimeFilterMaxRepos": 10000, + "maxRepos": -1, + "maxTimeoutSeconds": "60" + }, + + // The base URL of the Self-Serve Cody API. + "ssc.apiBaseUrl": "https://accounts.sourcegraph.com/cody/api", + + // The hostname of SAMS instance to connect. + "ssc.samsHostName": "accounts.sourcegraph.com", // Syntax highlighting configuration - "syntaxHighlighting": null, // Other example values: // - { // "engine": { @@ -96209,40 +96580,147 @@ All site configuration options and their default values are shown below. // ] // } // } + "syntaxHighlighting": { + "engine": { + "default": null, + "overrides": null + }, + "languages": { + "extensions": null, + "patterns": null + }, + "symbols": { + "engine": null + } + }, + + // Configuration for application user telemetry. + "telemetry": { + "disableLocalEventLogs": false + }, + + // The channel on which to automatically check for Sourcegraph updates. + // Valid options: "release", "none" + // Other example values: + // - "none" + "update.channel": "release", // Configuration for logging incoming webhooks. - "webhook.logging": null, // Other example values: // - { // "enabled": true, // "retention": "7d" // } + "webhook.logging": { + "enabled": false, + "retention": "72h" + }, + -////////////////////////////////////////////////////////////// -// Authentication -////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////// + // Authentication & Authorization + ////////////////////////////////////////////////////////////// // The config options for access requests - "auth.accessRequest": null, // Other example values: - // - {"enabled":true} - // - {"enabled":false} + // - { + // "enabled": true + // } + // - { + // "enabled": false + // } + "auth.accessRequest": { + "enabled": true + }, + + // Settings for access tokens, which enable external tools to access the Sourcegraph API with the privileges of the user. + // Other example values: + // - { + // "allow": "site-admin-create", + // "allowNoExpiration": true, + // "defaultExpirationDays": 90, + // "expirationOptionDays": [ + // 7, + // 14, + // 30, + // 60, + // 90 + // ] + // } + // - { + // "allow": "none", + // "allowNoExpiration": false, + // "defaultExpirationDays": 45, + // "expirationOptionDays": [ + // 7, + // 14, + // 30, + // 60, + // 90 + // ] + // } + "auth.accessTokens": { + "allow": "all-users-create", + "allowNoExpiration": false, + "defaultExpirationDays": 90, + "expirationOptionDays": [ + 7, + 14, + 30, + 60, + 90 + ] + }, + + // IP allowlist for access to the Sourcegraph instance. If set, only requests from these IP addresses will be allowed. By default client IP is infered connected client IP address, and you may configure to use a request header to determine the user IP. + "auth.allowedIpAddress": { + "clientIpAddress": null, + "enabled": false, + "errorMessageTemplate": "Access from your IP address is not allowed.", + "trustedClientIpAddress": null, + "userIpAddress": null, + "userIpRequestHeaders": null + }, // Enables users to change their username after account creation. Warning: setting this to be true has security implications if you have enabled (or will at any point in the future enable) repository permissions with an option that relies on username equivalency between Sourcegraph and an external service or authentication provider. Do NOT set this to true if you are using non-built-in authentication OR rely on username equivalency for repository permissions. "auth.enableUsernameChanges": false, // The config options for account lockout - "auth.lockout": null, // Other example values: // - { // "consecutivePeriod": 300, // "failedAttemptThreshold": 3, // "lockoutPeriod": 600 // } + "auth.lockout": { + "consecutivePeriod": 3600, + "failedAttemptThreshold": 5, + "lockoutPeriod": 1800 + }, + + // The maximum duration a user session may be idle (not making any requests), after which it expires and the user is required to re-authenticate. Must be at least 1 hour. Defaults to no idle expiry. + // Other example values: + // - "2h" + "auth.maxSessionIdleDuration": "0", // The minimum number of Unicode code points that a password must contain. "auth.minPasswordLength": 12, + // Enables and configures password policy. This will allow admins to enforce password complexity and length requirements. + // Other example values: + // - { + // "enabled": true, + // "numberOfSpecialCharacters": 1, + // "requireAtLeastOneNumber": true, + // "requireUpperandLowerCase": true + // } + "auth.passwordPolicy": { + "enabled": false, + "numberOfSpecialCharacters": 0, + "requireAtLeastOneNumber": true, + "requireUpperandLowerCase": true + }, + // The duration (in seconds) that a password reset link is considered valid. "auth.passwordResetLinkExpiry": 14400, @@ -96257,307 +96735,298 @@ All site configuration options and their default values are shown below. } ], - // WARNING: This option has been removed as of 3.8. - "auth.public": false, - - // The duration of a user session, after which it expires and the user is required to re-authenticate. The default is 90 days. There is typically no need to set this, but some users may have specific internal security requirements. - // + // The maximum duration of a user session, after which it expires and the user is required to re-authenticate. The default is 90 days. Must be at least 1 hour. There is typically no need to set this, but some users may have specific internal security requirements. // The string format is that of the Duration type in the Go time package (https://golang.org/pkg/time/#ParseDuration). E.g., "720h", "43200m", "2592000s" all indicate a timespan of 30 days. - // - // Note: changing this field does not affect the expiration of existing sessions. If you would like to enforce this limit for existing sessions, you must log out currently signed-in users. You can force this by removing all keys beginning with "session_" from the Redis store: - // - // * For deployments using `sourcegraph/server`: `docker exec $CONTAINER_ID redis-cli --raw keys 'session_*' | xargs docker exec $CONTAINER_ID redis-cli del` - // * For cluster deployments: - // ``` - // REDIS_POD="$(kubectl get pods -l app=redis-store -o jsonpath={.items[0].metadata.name})"; - // kubectl exec "$REDIS_POD" -- redis-cli --raw keys 'session_*' | xargs kubectl exec "$REDIS_POD" -- redis-cli --raw del; - // ``` - "auth.sessionExpiry": "2160h", // Other example values: // - "168h" + "auth.sessionExpiry": "2160h", // Validity expressed in minutes of the unlock account token "auth.unlockAccountLinkExpiry": 5, // Base64-encoded HMAC signing key to sign the JWT token for account unlock URLs - "auth.unlockAccountLinkSigningKey": null, // Other example values: // - "LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnphQzFyWlhrdGRqRUFBQUFBQkc1dmJtVUFBQUFFYm05dVpRQUFBQUFBQUFBQkFBQUJGZ0FBQUhVQkFBQQ" + "auth.unlockAccountLinkSigningKey": null, -////////////////////////////////////////////////////////////// -// BatchChanges -////////////////////////////////////////////////////////////// - - // Automatically delete branches created for Batch Changes changesets when the changeset is merged or closed, for supported code hosts. Overrides any setting on the repository on the code host itself. - "batchChanges.autoDeleteBranch": false, - - // How long changesets will be retained after they have been detached from a batch change. - "batchChanges.changesetsRetention": null, - // Other example values: - // - "336h" - // - "48h" - // - "5h30m40s" - - // Hides Batch Changes warnings about webhooks not being configured. - "batchChanges.disableWebhooksWarning": false, - - // Enables/disables the Batch Changes feature. - "batchChanges.enabled": true, - - // When enabled, all branches created by batch changes will be pushed to forks of the original repository. - "batchChanges.enforceForks": false, - - // When enabled, only site admins can create and apply batch changes. - "batchChanges.restrictToAdmins": false, - - // Specifies specific windows, which can have associated rate limits, to be used when reconciling published changesets (creating or updating). All days and times are handled in UTC. - "batchChanges.rolloutWindows": null, + // Ensure that matching users are members of the specified orgs (auto-joining users to the orgs if they are not already a member). Provide a JSON object of the form `{"*": ["org1", "org2"]}`, where org1 and org2 are orgs that all users are automatically joined to. Currently the only supported key is `"*"`. // Other example values: // - { - // "days": [ - // "saturday", - // "sunday" - // ], - // "end": "20:00", - // "rate": "10/hour", - // "start": "06:00" + // "*": [ + // "myorg1" + // ] // } + "auth.userOrgMap": null, -////////////////////////////////////////////////////////////// -// Code intelligence -////////////////////////////////////////////////////////////// + // When true, site admins will only be able to see private code they have access to via our authz system. + "authz.enforceForSiteAdmins": false, - // Whether auto-indexing policies may apply to all repositories on the Sourcegraph instance. Default is false. The policyRepositoryMatchLimit setting still applies to such auto-indexing policies. - "codeIntelAutoIndexing.allowGlobalPolicies": false, - // Enables/disables the code intel auto-indexing feature. Currently experimental. - "codeIntelAutoIndexing.enabled": false, + ////////////////////////////////////////////////////////////// + // Security & Encryption + ////////////////////////////////////////////////////////////// - // Overrides the default Docker images used by auto-indexing. - "codeIntelAutoIndexing.indexerMap": null, + // Configuration for encryption keys used to encrypt data at rest in the database. // Other example values: // - { - // "go": "sourcegraph/lsif-go:latest", - // "java": "sourcegraph/lsif-java:latest" + // "externalServiceKey": { + // "filePath": "/path/to/external_service.key", + // "type": "mounted" + // } // } + // - { + // "userExternalAccountKey": { + // "keyname": "projects/my-project/locations/global/keyRings/my-keyring/cryptoKeys/my-key", + // "type": "cloudkms" + // } + // } + "encryption.keys": { + "batchChangesCredentialKey": null, + "cacheSize": 2048, + "enableCache": false, + "executorSecretKey": null, + "externalServiceKey": null, + "gitHubAppKey": null, + "outboundWebhookKey": null, + "userExternalAccountKey": null, + "webhookKey": null, + "webhookLogKey": null + }, - // The maximum number of repositories to which a single auto-indexing policy can apply. Default is -1, which is unlimited. - "codeIntelAutoIndexing.policyRepositoryMatchLimit": -1, - - // A cron expression indicating when to run the document reference counts graph reduction job. - "codeIntelRanking.documentReferenceCountsCronExpression": "@weekly", - - // An arbitrary identifier used to group calculated rankings from SCIP data (excluding the SCIP export). - "codeIntelRanking.documentReferenceCountsDerivativeGraphKeyPrefix": null, - // Other example values: - // - "" - - // Enables/disables the document reference counts feature. Currently experimental. - "codeIntelRanking.documentReferenceCountsEnabled": false, - - // An arbitrary identifier used to group calculated rankings from SCIP data (including the SCIP export). - "codeIntelRanking.documentReferenceCountsGraphKey": null, - // Other example values: - // - "dev" - - // The interval at which to run the reduce job that computes document reference counts. Default is 24hrs. - "codeIntelRanking.staleResultsAge": 24, - -////////////////////////////////////////////////////////////// -// CodeInsights -////////////////////////////////////////////////////////////// - - // The size of the buffer for aggregations ran in-memory. A higher limit might strain memory for the frontend - "insights.aggregations.bufferSize": 500, - - // The maximum number of results a proactive search aggregation can accept before stopping - "insights.aggregations.proactiveResultLimit": 50000, - - // Set the number of seconds an insight series will spend backfilling before being interrupted. Series are interrupted to prevent long running insights from exhausting all of the available workers. Interrupted series will be placed back in the queue and retried based on their priority. - "insights.backfill.interruptAfter": 60, - - // Number of repositories within the batch to backfill concurrently. - "insights.backfill.repositoryConcurrency": 3, - - // Set the number of repositories to batch in a group during backfilling. - "insights.backfill.repositoryGroupSize": 10, - - // Maximum number of historical Code Insights data frames that may be analyzed per second. - "insights.historical.worker.rateLimit": 20, - // Other example values: - // - 50 - // - 0.5 - - // The allowed burst rate for the Code Insights historical worker rate limiter. - "insights.historical.worker.rateLimitBurst": 20, - // Other example values: - // - 10 - // - 20 - - // The maximum number of data points that will be available to view for a series on a code insight. Points beyond that will be stored in a separate table and available for data export. - "insights.maximumSampleSize": 30, - // Other example values: - // - 12 - // - 24 - // - 50 - - // Number of concurrent executions of a code insight query on a worker node - "insights.query.worker.concurrency": 1, - // Other example values: - // - 10 - // Maximum number of Code Insights queries initiated per second on a worker node. - "insights.query.worker.rateLimit": 20, - // Other example values: - // - 10 - // - 0.5 + ////////////////////////////////////////////////////////////// + // AI & Completions + ////////////////////////////////////////////////////////////// - // The allowed burst rate for the Code Insights queries per second rate limiter. - "insights.query.worker.rateLimitBurst": 20, + // Configuration for the completions service. // Other example values: - // - 10 - // - 20 - -////////////////////////////////////////////////////////////// -// Cody -////////////////////////////////////////////////////////////// - - // Enable or disable Cody instance-wide. When Cody is disabled, all Cody endpoints and GraphQL queries will return errors, Cody will not show up in the site-admin sidebar, and Cody in the global navbar will only show a call-to-action for site-admins to enable Cody. - "cody.enabled": false, - - // Restrict Cody to only be enabled for users that have a feature flag labeled "cody" set to true. You must create a feature flag with this ID after enabling this setting: https://sourcegraph.com/docs/dev/how-to/use_feature_flags#create-a-feature-flag. This setting only has an effect if cody.enabled is true. - "cody.restrictUsersFeatureFlag": false, - -////////////////////////////////////////////////////////////// -// Debug -////////////////////////////////////////////////////////////// + // - { + // "accessToken": "abc123", + // "chatModel": "chat", + // "completionModel": "code-completion", + // "enabled": true, + // "perUserDailyLimit": 100, + // "provider": "openai" + // } + "completions": { + "accessToken": null, + "azureChatModel": null, + "azureCompletionModel": null, + "azureUseDeprecatedCompletionsAPIForOldModels": true, + "chatModel": null, + "chatModelMaxTokens": 0, + "completionModel": null, + "completionModelMaxTokens": 0, + "disableClientConfigAPI": false, + "enabled": true, + "endpoint": null, + "fastChatModel": null, + "fastChatModelMaxTokens": 0, + "model": null, + "perCommunityUserChatMonthlyInteractionLimit": 0, + "perCommunityUserChatMonthlyLLMRequestLimit": 0, + "perCommunityUserCodeCompletionsMonthlyInteractionLimit": 0, + "perCommunityUserCodeCompletionsMonthlyLLMRequestLimit": 0, + "perProUserChatDailyInteractionLimit": 0, + "perProUserChatDailyLLMRequestLimit": 0, + "perProUserCodeCompletionsDailyInteractionLimit": 0, + "perProUserCodeCompletionsDailyLLMRequestLimit": 0, + "perUserCodeCompletionsDailyLimit": 0, + "perUserDailyLimit": 0, + "provider": "sourcegraph", + "smartContextWindow": "enabled", + "user": null + }, - // (debug) controls the amount of symbol search parallelism. Defaults to 20. It is not recommended to change this outside of debugging scenarios. This option will be removed in a future version. - "debug.search.symbolsParallelism": null, + // ⚠️ DEPRECATED: Deprecated changes to this section will not be respected. + // Configuration for embeddings service. // Other example values: - // - "20" + // - { + // "accessToken": "your-access-token", + // "dimensions": 1536, + // "enabled": true, + // "excludedFilePathPatterns": [ + // "*.svg", + // "**/__mocks__/**", + // "**/test/**" + // ], + // "model": "text-embedding-ada-002", + // "url": "https://api.openai.com/v1/embeddings" + // } + "embeddings": { + "accessToken": null, + "dimensions": 0, + "enabled": true, + "endpoint": null, + "excludeChunkOnError": true, + "excludedFilePathPatterns": [ + ".*ignore", + ".gitattributes", + ".mailmap", + "*.csv", + "*.svg", + "*.xml", + "__fixtures__/", + "node_modules/", + "testdata/", + "mocks/", + "vendor/" + ], + "fileFilters": { + "excludedFilePathPatterns": [ + ".*ignore", + ".gitattributes", + ".mailmap", + "*.csv", + "*.svg", + "*.xml", + "__fixtures__/", + "node_modules/", + "testdata/", + "mocks/", + "vendor/" + ], + "includedFilePathPatterns": null, + "maxFileSizeBytes": 1000000 + }, + "incremental": true, + "maxEmbeddingsPerRepo": 0, + "minimumInterval": "24h", + "model": null, + "perCommunityUserEmbeddingsMonthlyLimit": 0, + "perProUserEmbeddingsMonthlyLimit": 0, + "policyRepositoryMatchLimit": "5000", + "provider": null, + "url": null + }, - // (debug) Set a limit to the amount of captured slow GraphQL requests being stored for visualization. For defining the threshold for a slow GraphQL request, see observability.logSlowGraphQLRequests. - "observability.captureSlowGraphQLRequestsLimit": null, - // Other example values: - // - 2000 - // (debug) logs all GraphQL requests slower than the specified number of milliseconds. - "observability.logSlowGraphQLRequests": null, - // Other example values: - // - 10000 + ////////////////////////////////////////////////////////////// + // Executors + ////////////////////////////////////////////////////////////// - // (debug) logs all search queries (issued by users, code intelligence, or API requests) slower than the specified number of milliseconds. - "observability.logSlowSearches": null, + // The shared secret between Sourcegraph and executors. The value must contain at least 20 characters. // Other example values: - // - 10000 + // - "my-super-secret-access-token" + "executors.accessToken": null, -////////////////////////////////////////////////////////////// -// Email -////////////////////////////////////////////////////////////// + // The image to use for batch changes in executors when using native execution. Use this value to pull from a custom image registry. + "executors.batcheshelperImage": "sourcegraph/batcheshelper", - // The "from" address for emails sent by this server. - // Please see https://sourcegraph.com/docs/admin/config/email - "email.address": null, + // The tag to use for the batcheshelper image in executors when using native execution. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. // Other example values: - // - "noreply@sourcegraph.example.com" + // - "4.1.0" + "executors.batcheshelperImageTag": null, - // The name to use in the "from" address for emails sent by this server. - "email.senderName": "Sourcegraph", + // The URL where Sourcegraph executors can reach the Sourcegraph instance. If not set, defaults to externalURL. URLs with a path (other than `/`) are not allowed. For Docker executors, the special hostname `host.docker.internal` can be used to refer to the Docker container's host. // Other example values: - // - "Our Company Sourcegraph" - // - "Example Inc Sourcegraph" + // - "https://sourcegraph.example.com" + "executors.frontendURL": null, - // The SMTP server used to send transactional emails. - // Please see https://sourcegraph.com/docs/admin/config/email - "email.smtp": null, + // The tag to use for the lsif-go image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. // Other example values: - // - { - // "authentication": "PLAIN", - // "host": "smtp.example.com", - // "password": "mypassword", - // "port": 465, - // "username": "alice" - // } + // - "sourcegraph/lsif-go" + "executors.lsifGoImage": null, - // Configurable templates for some email types sent by Sourcegraph. - "email.templates": null, - // Other example values: - // - { - // "resetPassword": { - // "body": "To reset your password on {{.Host}}, please click the link below:\n\n{{.URL}}\n\nIf you did not request a password reset, please ignore this email. Your password will not change until you click the link and set a new password.", - // "subject": "Reset your password on {{.Host}}" - // }, - // "setPassword": { - // "body": "To set your password on {{.Host}} and complete your account registration, please click the link below:\n\n{{.URL}}\n\nYour username is: {{.Username}}\n\nIf you did not sign up for an account on {{.Host}}, please ignore this email.", - // "subject": "Set your password on {{.Host}}" - // } - // } + // The configuration for multiqueue executors. + "executors.multiqueue": { + "dequeueCacheConfig": { + "batches": { + "limit": 50, + "weight": 4 + }, + "codeintel": { + "limit": 250, + "weight": 1 + } + } + }, -////////////////////////////////////////////////////////////// -// Experimental -////////////////////////////////////////////////////////////// + // The image to use for src-cli in executors. Use this value to pull from a custom image registry. + "executors.srcCLIImage": "sourcegraph/src-cli", - // Experimental features and settings. - "experimentalFeatures": null, + // The tag to use for the src-cli image in executors. Use this value to use a custom tag. Sourcegraph by default uses the best match, so use this setting only if you really need to overwrite it and make sure to keep it updated. // Other example values: - // - { - // "customGitFetch": [ - // { - // "domainPath": "somecodehost.com/path/to/repo", - // "fetch": "customgitbinary someflag" - // }, - // { - // "domainPath": "somecodehost.com/path/to/anotherrepo", - // "fetch": "customgitbinary someflag anotherflag" - // } - // ] - // } - // - { - // "tls.external": { - // "certificates": [ - // "-----BEGIN CERTIFICATE-----\n..." - // ], - // "insecureSkipVerify": true - // } - // } + // - "4.1.0" + "executors.srcCLIImageTag": null, -////////////////////////////////////////////////////////////// -// External services -////////////////////////////////////////////////////////////// - // Disable periodic syncs of configured code host connections (repository metadata, permissions, batch changes changesets, etc) - "disableAutoCodeHostSyncs": false, + ////////////////////////////////////////////////////////////// + // Git & Repository Management + ////////////////////////////////////////////////////////////// - // Disable periodically fetching git contents for existing repositories. - "disableAutoGitUpdates": false, - - // DEPRECATED! Disable redirects to sourcegraph.com when visiting public repositories that can't exist on this server. - "disablePublicRepoRedirects": null, - // Other example values: - // - true + // Whether clone progress should be logged to a file. If enabled, logs are written to files in the OS default path for temporary files. + "cloneProgress.log": false, // JSON array of configuration that maps from Git clone URL to repository name. Sourcegraph automatically resolves remote clone URLs to their proper code host. However, there may be non-remote clone URLs (e.g., in submodule declarations) that Sourcegraph cannot automatically map to a code host. In this case, use this field to specify the mapping. The mappings are tried in the order they are specified and take precedence over automatic mappings. - "git.cloneURLToRepositoryName": null, // Other example values: // - [ // { - // "from": "^/admin/config(?P\u003cname\u003e\\w+)$", + // "from": "^../(?P\u003cname\u003e\\w+)$", // "to": "github.com/user/{name}" // } // ] + "git.cloneURLToRepositoryName": null, + + // DEPRECATED: The config options for Sourcegraph GitHub App. + // Other example values: + // - { + // "appID": "1234", + // "clientID": "client-id", + // "clientSecret": "client-secret", + // "privateKey": "base64-encoded-private-key", + // "slug": "sourcegraph" + // } + "gitHubApp": { + "appID": null, + "clientID": null, + "clientSecret": null, + "privateKey": null, + "slug": null + }, - // Maximum number of seconds that a long Git command (e.g. clone or remote update) is allowed to execute. The default is 3600 seconds, or 1 hour. - "gitLongCommandTimeout": 3600, + // Maximum number of seconds that a long Git command (e.g. clone or remote update) is allowed to execute. The default is 7200 seconds, or 2 hours. + "gitLongCommandTimeout": 7200, // Maximum number of remote code host git operations (e.g. clone or ls-remote) to be run per second per gitserver. Default is -1, which is unlimited. "gitMaxCodehostRequestsPerSecond": -1, + // Maximum number of git clone processes that will be run concurrently per gitserver to update repositories. <= 0 means disabled. + "gitMaxConcurrentCleanups": 5, + // Maximum number of git clone processes that will be run concurrently per gitserver to update repositories. Note: the global git update scheduler respects gitMaxConcurrentClones. However, we allow each gitserver to run upto gitMaxConcurrentClones to allow for urgent fetches. Urgent fetches are used when a user is browsing a PR and we do not have the commit yet. "gitMaxConcurrentClones": 5, - // JSON array of repo name patterns and update intervals. If a repo matches a pattern, the associated interval will be used. If it matches no patterns a default backoff heuristic will be used. Pattern matches are attempted in the order they are provided. - "gitUpdateInterval": null, + // Record git operations that are executed on configured repositories. + // Other example values: + // - { + // "ignoredGitCommands": [ + // "show", + // "rev-parse", + // "log", + // "diff", + // "ls-tree" + // ], + // "repos": [ + // "github.com/sourcegraph/sourcegraph", + // "github.com/gorilla/mux" + // ], + // "size": 1000 + // } + "gitRecorder": { + "ignoredGitCommands": [ + "show", + "rev-parse", + "log", + "diff", + "ls-tree" + ], + "repos": null, + "size": 10000 + }, + + // ⚠️ DEPRECATED: Deprecated because it's no longer supported. Sourcegraph relies on user traffic, webhooks, and heuristics now. + // DEPRECATED: As of Sourcegraph 5.10, this option is no longer in use. Remove this block. // Other example values: // - [ // { @@ -96569,163 +97038,148 @@ All site configuration options and their default values are shown below. // "pattern": "^bitbucket.org/.*" // } // ] + "gitUpdateInterval": null, - // URL to fetch unreachable repository details from. Defaults to "https://sourcegraph.com" - "parentSourcegraph": null, - // Other example values: - // - { - // "url": "https://sourcegraph.example.com" - // } + // Disk usage threshold at which to display warning notification. Value is a percentage. + "gitserver.diskUsageWarningThreshold": 90, - // The number of concurrent external service syncers that can run. - "repoConcurrentExternalServiceSyncers": 3, - // Interval (in minutes) for checking code hosts (such as GitHub, Gitolite, etc.) for new repositories. - "repoListUpdateInterval": 1, + ////////////////////////////////////////////////////////////// + // Branding & UI + ////////////////////////////////////////////////////////////// - // Configuration for repository purge worker. - "repoPurgeWorker": { - "deletedTTLMinutes": 60, - "intervalMinutes": 15 + // Customize Sourcegraph homepage logo and search icon. + // Other example values: + // - { + // "dark": { + // "logo": "https://example.com/logo_dark.png", + // "symbol": "https://example.com/search_symbol_dark_24x24.png" + // }, + // "disableSymbolSpin": true, + // "favicon": "https://example.com/favicon.ico", + // "light": { + // "logo": "https://example.com/logo_light.png", + // "symbol": "https://example.com/search_symbol_light_24x24.png" + // } + // } + "branding": { + "brandName": "Sourcegraph", + "dark": null, + "disableSymbolSpin": false, + "favicon": null, + "light": null }, - // The SCIM auth token is used to authenticate SCIM requests. If not set, SCIM is disabled. - "scim.authToken": "", - // Identity provider used for SCIM support. "STANDARD" should be used unless a more specific value is available - "scim.identityProvider": "STANDARD", - -////////////////////////////////////////////////////////////// -// Misc. -////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////// + // Observability & Monitoring + ////////////////////////////////////////////////////////////// - // Disable the feedback survey - "disableFeedbackSurvey": false, - - // DEPRECATED. Has no effect. - "disableNonCriticalTelemetry": false, - - // HTML to inject at the bottom of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. - "htmlBodyBottom": null, - - // HTML to inject at the top of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. - "htmlBodyTop": null, - - // HTML to inject at the bottom of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. - "htmlHeadBottom": null, - - // HTML to inject at the top of the `` element on each page, for analytics scripts. Requires env var ENABLE_INJECT_HTML=true. - "htmlHeadTop": null, - - // Enables users access to the product research page in their settings. - "productResearchPage.enabled": true, + // Configuration for logging and alerting, including to external services. + "log": { + "auditLog": { + "gitserverAccess": false, + "graphQL": false, + "internalTraffic": false, + "severityLevel": null + }, + "sentry": { + "backendDSN": null, + "codeIntelDSN": null, + "dsn": null + } + }, - // The channel on which to automatically check for Sourcegraph updates. - "update.channel": "release", + // Configure notifications for Sourcegraph's built-in alerts. // Other example values: - // - "none" - -////////////////////////////////////////////////////////////// -// Own -////////////////////////////////////////////////////////////// - - // The max number of concurrent Own jobs that will run per worker node. - "own.background.repoIndexConcurrencyLimit": 5, - - // The maximum per second burst of repositories for Own jobs per worker node. Generally this value should not be less than the max concurrency. - "own.background.repoIndexRateBurstLimit": 5, - - // The maximum per second rate of repositories for Own jobs per worker node. - "own.background.repoIndexRateLimit": 20, - - // The Own service will attempt to match a Team by the last part of its handle if it contains a slash and no match is found for its full handle. - "own.bestEffortTeamMatching": true, + // - { + // "level": "critical", + // "notifier": { + // "channel": "#alerts", + // "type": "slack", + // "url": "https://hooks.slack.com/services/..." + // } + // } + // - { + // "level": "warning", + // "notifier": { + // "addresses": [ + // "alerts@example.com" + // ], + // "type": "email" + // } + // } + "observability.alerts": null, -////////////////////////////////////////////////////////////// -// Search -////////////////////////////////////////////////////////////// + // (debug) Set a limit to the amount of captured slow GraphQL requests being stored for visualization. For defining the threshold for a slow GraphQL request, see observability.logSlowGraphQLRequests. + // Other example values: + // - 2000 + "observability.captureSlowGraphQLRequestsLimit": 0, - // DEPRECATED: Configure maxRepos in search.limits. The maximum number of repositories to search across. The user is prompted to narrow their query if exceeded. Any value less than or equal to zero means unlimited. - "maxReposToSearch": -1, + // EXPERIMENTAL: Configuration for client observability + // Other example values: + // - { + // "openTelemetry": { + // "endpoint": "/-/debug/otlp" + // } + // } + // - { + // "openTelemetry": { + // "endpoint": "https://opentelemetry.example.com" + // } + // } + "observability.client": { + "openTelemetry": { + "endpoint": "/-/debug/otlp", + "webVitalsInstrumentation": false + } + }, - // The number of threads each indexserver should use to index shards. If not set, indexserver will use the number of available CPUs. This is exposed as a safeguard and should usually not require being set. - "search.index.shardConcurrency": null, + // (debug) logs all GraphQL requests slower than the specified number of milliseconds. // Other example values: - // - "10" + // - 10000 + "observability.logSlowGraphQLRequests": 0, - // Whether indexed symbol search is enabled. This is contingent on the indexed search configuration, and is true by default for instances with indexed search enabled. Enabling this will cause every repository to re-index, which is a time consuming (several hours) operation. Additionally, it requires more storage and ram to accommodate the added symbols information in the search index. - "search.index.symbols.enabled": null, + // (debug) logs all search queries (issued by users, code intelligence, or API requests) slower than the specified number of milliseconds. // Other example values: - // - true + // - 10000 + "observability.logSlowSearches": 0, - // A list of file glob patterns where matching files will be indexed and searched regardless of their size. Files still need to be valid utf-8 to be indexed. The glob pattern syntax can be found here: https://github.com/bmatcuk/doublestar#patterns. - "search.largeFiles": null, + // Silence individual Sourcegraph alerts by identifier. // Other example values: // - [ - // "go.sum", - // "package-lock.json", - // "**/*.thrift" + // "warning_gitserver_disk_space_remaining" // ] + // - [ + // "critical_frontend_down", + // "warning_high_load" + // ] + "observability.silenceAlerts": null, - // Limits that search applies for number of repositories searched and timeouts. - "search.limits": null, + // Configures distributed tracing within Sourcegraph. To learn more, refer to https://sourcegraph.com/docs/admin/observability/tracing // Other example values: // - { - // "commitDiffMaxRepos": 50, - // "commitDiffWithTimeFilterMaxRepos": 5000, - // "maxRepos": 200, - // "maxTimeoutSeconds": 60 + // "debug": false, + // "sampling": "selective", + // "type": "opentelemetry", + // "urlTemplate": "https://ui.honeycomb.io/$ORG/environments/$DATASET/trace?trace_id={{ .TraceID }}" // } + // - { + // "debug": true, + // "sampling": "all", + // "type": "jaeger", + // "urlTemplate": "{{ .ExternalURL }}/-/debug/jaeger/trace/{{ .TraceID }}" + // } + "observability.tracing": { + "debug": false, + "sampling": "selective", + "type": "opentelemetry", + "urlTemplate": null + } -////////////////////////////////////////////////////////////// -// Security -////////////////////////////////////////////////////////////// - - // Settings for access tokens, which enable external tools to access the Sourcegraph API with the privileges of the user. - "auth.accessTokens": { - "allow": "all-users-create", - "expirationOptionDays": [7,14,30,60,90], - "defaultExpirationDays": 90, - "allowNoExpiration": false, - "maxTokensPerUser": 25 - }, - // Other example values: - // - {"allow":"site-admin-create"} - // - {"allow":"none"} - - // Required when using any of the native code host integrations for Phabricator, GitLab, or Bitbucket Server. It is a space-separated list of allowed origins for cross-origin HTTP requests which should be the base URL for your Phabricator, GitLab, or Bitbucket Server instance. - "corsOrigin": null, - // Other example values: - // - "https://my-phabricator.example.com https://my-bitbucket.example.com https://my-gitlab.example.com" - - // Whether or not LSIF uploads will be blocked unless a valid LSIF upload token is provided. - "lsifEnforceAuth": false, - - // Settings for Sourcegraph explicit permissions, which allow the site admin to explicitly manage repository permissions via the GraphQL API. This will mark repositories as restricted by default. - "permissions.userMapping": { - "bindID": "email", - "enabled": true - }, - // Other example values: - // - {"bindID":"email"} - // - {"bindID":"username"} - -////////////////////////////////////////////////////////////// -// Sourcegraph Enterprise license -////////////////////////////////////////////////////////////// - - // The license key associated with a Sourcegraph Enterprise subscription, which is necessary to activate Sourcegraph Enterprise functionality. To obtain this value, contact Sourcegraph to purchase a license. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. - "licenseKey": null, - -////////////////////////////////////////////////////////////// -// Sourcegraph.com -////////////////////////////////////////////////////////////// - - // Configuration options for Sourcegraph.com only. - "dotcom": null } ``` - +{/* SCHEMA_SYNC_END: admin/config/site.schema.json */} #### Known bugs The following site configuration options require the server to be restarted for the changes to take effect: @@ -96849,8 +97303,16 @@ Settings options and their default values are shown below. ### admin/config/settings.schema.json +{/* SCHEMA_SYNC_START: admin/config/settings.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:26Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { + + ////////////////////////////////////////////////////////////// + // General Configuration + ////////////////////////////////////////////////////////////// + // Disables observability-related site alert banners. "alerts.hideObservabilitySiteAlerts": true, @@ -96861,59 +97323,106 @@ Settings options and their default values are shown below. "alerts.showPatchUpdates": true, // Whether to run global searches over all repositories. On instances with many repositories, this can lead to issues such as: low quality results, slow response times, or significant load on the Sourcegraph instance. Defaults to true. - "basicCodeIntel.globalSearchesEnabled": null, + "basicCodeIntel.globalSearchesEnabled": false, // Whether to include archived repositories in search results. - "basicCodeIntel.includeArchives": null, + "basicCodeIntel.includeArchives": false, // Whether to include forked repositories in search results. - "basicCodeIntel.includeForks": null, + "basicCodeIntel.includeForks": false, // Whether to use only indexed requests to the search API. - "basicCodeIntel.indexOnly": null, + "basicCodeIntel.indexOnly": false, // The timeout (in milliseconds) for un-indexed search requests. - "basicCodeIntel.unindexedSearchTimeout": null, + "basicCodeIntel.unindexedSearchTimeout": 0, // Whether to fetch multiple precise definitions and references on hover. - "codeIntel.disableRangeQueries": null, + "codeIntel.disableRangeQueries": false, // Never fall back to search-based code intelligence. - "codeIntel.disableSearchBased": null, + "codeIntel.disableSearchBased": false, // Whether to supplement precise references with search-based results. - "codeIntel.mixPreciseAndSearchBasedReferences": null, + "codeIntel.mixPreciseAndSearchBasedReferences": false, // Whether to enable trace logging on the extension. - "codeIntel.traceExtension": null, + "codeIntel.traceExtension": false, + + // Custom informational messages to display to users at Cody clients locations. + // Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user. + "cody.notices": null, + + // Experimental features and settings. + "experimentalFeatures": { + "batchChangesExecution": true, + "boostRelevantRepositories": true, + "clientSearchResultRanking": "by-zoekt-ranking", + "codeInsightsCompute": false, + "codeInsightsRepoUI": "single-search-query", + "disableOrderBySimilarity": false, + "enableLazyBlobSyntaxHighlighting": true, + "enableLazyFileResultSyntaxHighlighting": true, + "enableSearchFilePrefetch": true, + "enableSidebarFilePrefetch": true, + "fuzzyFinder": false, + "fuzzyFinderActions": false, + "fuzzyFinderAll": false, + "fuzzyFinderCaseInsensitiveFileCountThreshold": 25000, + "fuzzyFinderNavbar": false, + "fuzzyFinderRepositories": false, + "fuzzyFinderSymbols": false, + "goCodeCheckerTemplates": false, + "keywordSearch": true, + "newSearchNavigationUI": false, + "newSearchResultFiltersPanel": false, + "newSearchResultsUI": true, + "proactiveSearchResultsAggregations": true, + "searchContextsQuery": false, + "searchQueryInput": "v1", + "searchResultsAggregations": false, + "showCodeMonitoringLogs": false, + "symbolKindTags": false + }, // Whether the sidebar on the repo view should be open by default. "fileSidebarVisibleByDefault": true, // Custom page size for the history tab. If set, the history tab will populate that number of commits the first time the history tab is opened and then double the number of commits progressively. - "history.defaultPageSize": null, + "history.defaultPageSize": 0, // Show absolute timestamps in the history panel and only show relative timestamps (e.g.: "5 days ago") in tooltip when hovering. "history.preferAbsoluteTimestamps": false, + // The number of seconds to execute the aggregation for when running in extended timeout mode. This value should always be less than any proxy timeout if one exists. The maximum value is equal to searchLimits.maxTimeoutSeconds + "insights.aggregations.extendedTimeout": 55, + // DEPRECATED: Use `notices` instead. - // // An array (often with just one element) of messages to display at the top of all pages, including for unauthenticated users. Users may dismiss a message (and any message with the same string value will remain dismissed for the user). - // // Markdown formatting is supported. - // // Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that user. (This is useful for testing the correctness of the message's Markdown formatting.) - // // MOTD stands for "message of the day" (which is the conventional Unix name for this type of message). "motd": null, // Custom informational messages to display to users at specific locations in the Sourcegraph user interface. - // // Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user. "notices": null, // Group of settings related to opening files in an editor. - "openInEditor": null, + "openInEditor": { + "custom.urlPattern": null, + "editorIds": null, + "jetbrains.forceApi": null, + "projectPaths.default": null, + "projectPaths.linux": null, + "projectPaths.mac": null, + "projectPaths.windows": null, + "replacements": null, + "vscode.isProjectPathUNCPath": false, + "vscode.remoteHostForSSH": null, + "vscode.useInsiders": false, + "vscode.useSSH": false + }, // If enabled, all members of the org will be treated as admins (e.g. can edit, apply, delete) for all batch changes created in that org. "orgs.allMembersBatchChangesAdmin": false, @@ -96930,10 +97439,10 @@ Settings options and their default values are shown below. // Whether query patterns are treated case sensitively. Patterns are case insensitive by default. "search.defaultCaseSensitive": false, - // Defines default properties for search behavior. The default is `smart`, which provides query assistance that automatically runs alternative queries when appropriate. When `precise`, search behavior strictly searches for the precise meaning of the query. + // DEPRECATED: this setting is no longer read when the default 'keyword' patterntype is enabled, which always uses the 'precise' mode. Smart search will be removed in a future release. "search.defaultMode": null, - // The default pattern type for search queries. Note: to disable keyword search and use the previous behavior, set "search.defaultPatternType: standard". + // The default pattern type that search queries will be interpreted as. "search.defaultPatternType": null, // The number of results we send down during a search. Note: this is different to the count: in the query. The search will continue once we hit displayLimit and updated filters and statistics will continue to stream down. Defaults to 1500. @@ -96948,28 +97457,15 @@ Settings options and their default values are shown below. // Whether searches should include searching forked repositories. "search.includeForks": false, - // DEPRECATED: Saved search queries - "search.savedQueries": null, - // Predefined search snippets that can be appended to any search (also known as search scopes) "search.scopes": null, -////////////////////////////////////////////////////////////// -// CodeInsights -////////////////////////////////////////////////////////////// - - // The number of seconds to execute the aggregation for when running in extended timeout mode. This value should always be less than any proxy timeout if one exists. The maximum value is equal to searchLimits.maxTimeoutSeconds - "insights.aggregations.extendedTimeout": 55, - -////////////////////////////////////////////////////////////// -// Experimental -////////////////////////////////////////////////////////////// + // Enables default site wide search context. Only admins can set this. Individual users can override with their own search context. + "siteWideSearchContext": null - // Experimental features and settings. - "experimentalFeatures": null } ``` - +{/* SCHEMA_SYNC_END: admin/config/settings.schema.json */} ## Additional details on settings ### Notices @@ -97031,7 +97527,6 @@ services hosted within an organization's private network * Connecting to external [LLM providers](../../cody/capabilities/supported-models) with Cody - **gitserver**: Executes git commands against externally hosted [code hosts](../external_service) - **migrator**: Connects to Postgres instances (which may be [externally hosted](../external_services/postgres)) to process database migrations -- **repo-updater**: Communicates with [code hosts](../external_service) APIs to coordinate repository synchronization - **worker**: Sourcegraph [Worker](../workers) run various background jobs that may require establishing connections to services hosted within an organization's private network @@ -97046,14 +97541,14 @@ variables will depend on your Sourcegraph deployment method. Add the proxy environment variables to your Sourcegraph Helm chart [override file](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/values.yaml): ```yaml -executor|frontend|gitserver|migrator|repo-updater|worker: +executor|frontend|gitserver|migrator|worker: env: - name: HTTP_PROXY value: http://proxy.example.com:8080 - name: HTTPS_PROXY value: http://proxy.example.com:8080 - name: NO_PROXY - value: "blobstore,codeinsights-db,codeintel-db,sourcegraph-frontend-internal,sourcegraph-frontend,github-proxy,gitserver,grafana,indexed-search-indexer,indexed-search,jaeger-query,pgsql,precise-code-intel-worker,prometheus,redis-cache,redis-store,repo-updater,searcher,symbols,syntect-server,worker-executors,worker,cloud-sql-proxy,localhost,127.0.0.1,.svc,.svc.cluster.local,kubernetes.default.svc" + value: "blobstore,codeinsights-db,codeintel-db,sourcegraph-frontend-internal,sourcegraph-frontend,github-proxy,gitserver,grafana,indexed-search-indexer,indexed-search,jaeger-query,pgsql,precise-code-intel-worker,prometheus,redis-cache,redis-store,searcher,syntect-server,worker-executors,worker,cloud-sql-proxy,localhost,127.0.0.1,.svc,.svc.cluster.local,kubernetes.default.svc" ``` @@ -97061,7 +97556,7 @@ If the updated Sourcegraph pods fail to pass their readiness or health checks af ```yaml - name: NO_PROXY - value: "blobstore,codeinsights-db,codeintel-db,sourcegraph-frontend-internal,sourcegraph-frontend,github-proxy,gitserver,grafana,indexed-search-indexer,indexed-search,jaeger-query,pgsql,precise-code-intel-worker,prometheus,redis-cache,redis-store,repo-updater,searcher,symbols,syntect-server,worker-executors,worker,cloud-sql-proxy,localhost,127.0.0.1,.svc,.svc.cluster.local,kubernetes.default.svc,10.10.0.0/16,10.20.0.0/16" + value: "blobstore,codeinsights-db,codeintel-db,sourcegraph-frontend-internal,sourcegraph-frontend,github-proxy,gitserver,grafana,indexed-search-indexer,indexed-search,jaeger-query,pgsql,precise-code-intel-worker,prometheus,redis-cache,redis-store,searcher,syntect-server,worker-executors,worker,cloud-sql-proxy,localhost,127.0.0.1,.svc,.svc.cluster.local,kubernetes.default.svc,10.10.0.0/16,10.20.0.0/16" ``` @@ -97074,7 +97569,7 @@ services: environment: - HTTP_PROXY=http://proxy.example.com:8080 - HTTPS_PROXY=http://proxy.example.com:8080 - - NO_PROXY='blobstore,caddy,cadvisor,codeintel-db,codeintel-db-exporter,codeinsights-db,codeinsights-db-exporter,sourcegraph-frontend-0,sourcegraph-frontend-internal,gitserver-0,grafana,migrator,node-exporter,otel-collector,pgsql,pgsql-exporter,precise-code-intel-worker,prometheus,redis-cache,redis-store,repo-updater,searcher-0,symbols-0,syntect-server,worker,zoekt-indexserver-0,zoekt-webserver-0,localhost,127.0.0.1' + - NO_PROXY='blobstore,caddy,cadvisor,codeintel-db,codeintel-db-exporter,codeinsights-db,codeinsights-db-exporter,sourcegraph-frontend-0,sourcegraph-frontend-internal,gitserver-0,grafana,migrator,node-exporter,otel-collector,pgsql,pgsql-exporter,precise-code-intel-worker,prometheus,redis-cache,redis-store,searcher-0,syntect-server,worker,zoekt-indexserver-0,zoekt-webserver-0,localhost,127.0.0.1' ``` Failure to configure `NO_PROXY` correctly can cause the proxy configuration to interfere with @@ -97294,7 +97789,6 @@ The setting `max_connections` determines the number of active connections that c | --------------------------- | ------------------------------------------ | | `frontend` | `pgsql`, `codeintel-db`, `codeinsights-db` | | `gitserver` | `pgsql` | -| `repo-updater` | `pgsql` | | `precise-code-intel-worker` | `codeintel-db`, `pgsql` | | `worker` | `codeintel-db`, `pgsql`, `codeinsights-db` | @@ -99191,7 +99685,7 @@ Requests to the configured code host will be staggered as to not exceed `"reques - For Sourcegraph `<=3.38`, if rate limiting is configured more than once for the same code host instance, the most restrictive limit will be used. - For Sourcegraph >=3.39, rate limiting should be enabled and configured for each individual code host connection. -To see the status of configured internal rate limits, visit **Site admin > Instrumentation > repo-updater > Rate Limiter State**. This page lists internal rate limits by code host, for example: +To see the status of configured internal rate limits, visit **Site admin > Instrumentation > worker > Rate Limiter State**. This page lists internal rate limits by code host, for example: ```json { @@ -99294,9 +99788,21 @@ The Sourcegraph instance's site admin must [update the `corsOrigin` site config ### admin/code_hosts/phabricator.schema.json - +{/* SCHEMA_SYNC_START: admin/code_hosts/phabricator.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:34Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, + + // The type of Git URLs to use for cloning and fetching Git repositories. + // Valid options: "http", "ssh" + "gitURLType": "http", + // The list of repositories available on Phabricator. "repos": null, @@ -99304,11 +99810,12 @@ The Sourcegraph instance's site admin must [update the `corsOrigin` site config "token": null, // URL of a Phabricator instance, such as https://phabricator.example.com - "url": null // Other example values: // - "https://phabricator.example.com" + "url": null } ``` +{/* SCHEMA_SYNC_END: admin/code_hosts/phabricator.schema.json */} @@ -99383,10 +99890,12 @@ Repositories must be listed individually: ### admin/code_hosts/other_external_service.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/other_external_service.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:35Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { // A list of repositories to never mirror by name after applying repositoryPathPattern. Supports excluding by exact name ({"name": "myrepo"}) or regular expression ({"pattern": ".*secret.*"}). - "exclude": null, // Other example values: // - [ // { @@ -99396,35 +99905,36 @@ Repositories must be listed individually: // "pattern": ".*secret.*" // } // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, // Whether or not these repositories should be marked as public on Sourcegraph.com. Defaults to false. "makeReposPublicOnDotCom": false, + // REQUIRED: "repos": null, // The pattern used to generate the corresponding Sourcegraph repository name for the repositories. In the pattern, the variable "{base}" is replaced with the Git clone base URL host and path, and "{repo}" is replaced with the repository path taken from the `repos` field. - // // For example, if your Git clone base URL is https://git.example.com/repos and `repos` contains the value "my/repo", then a repositoryPathPattern of "{base}/{repo}" would mean that a repository at https://git.example.com/repos/my/repo is available on Sourcegraph at https://sourcegraph.example.com/git.example.com/repos/my/repo. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. - // - // Note: These patterns are ignored if using src-expose / src-serve / src-serve-local. - "repositoryPathPattern": "{base}/{repo}", + // Note: These patterns are ignored if using src-expose / src-serve. // Other example values: // - "pretty-host-name/{repo}" + "repositoryPathPattern": "{base}/{repo}", - // The root directory to walk for discovering local git repositories to mirror. To sync with local repositories and use this root property one must run Cody App and define the repos configuration property such as ["src-serve-local"]. - "root": "", - // Other example values: - // - "path/to/my/repos" - - "url": null // Other example values: // - "https://github.com/?access_token=secret" // - "ssh://user@host.xz:2333/" // - "git://host.xz:2333/" + "url": null } ``` +{/* SCHEMA_SYNC_END: admin/code_hosts/other_external_service.schema.json */} @@ -99686,10 +100196,12 @@ To connect Gitolite to Sourcegraph: ### admin/code_hosts/gitolite.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/gitolite.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:33Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { // A list of repositories to never mirror from this Gitolite instance. Supports excluding by exact name ({"name": "foo"}). - "exclude": null, // Other example values: // - [ // { @@ -99699,27 +100211,41 @@ To connect Gitolite to Sourcegraph: // "pattern": ".*secret.*" // } // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, + // REQUIRED: // Gitolite host that stores the repositories (e.g., git@gitolite.example.com, ssh://git@gitolite.example.com:2222/). - "host": null, // Other example values: // - "git@gitolite.example.com" // - "ssh://git@gitolite.example.com:2222/" + "host": null, + // ⚠️ DEPRECATED: DEPRECATED: the Phabricator integration with Gitolite code hosts is deprecated // This is DEPRECATED - "phabricator": null, + "phabricator": { + "callsignCommand": null, + "url": null + }, + // ⚠️ DEPRECATED: DEPRECATED: the Phabricator integration with Gitolite code hosts is deprecated // This is DEPRECATED "phabricatorMetadataCommand": null, + // REQUIRED: // Repository name prefix that will map to this Gitolite host. This should likely end with a trailing slash. E.g., "gitolite.example.com/". - // // It is important that the Sourcegraph repository name generated with this prefix be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. - "prefix": null // Other example values: // - "gitolite.example.com/" + "prefix": null } ``` +{/* SCHEMA_SYNC_END: admin/code_hosts/gitolite.schema.json */} @@ -99911,24 +100437,24 @@ See [Internal rate limits](/admin/code_hosts/rate_limits#internal-rate-limits). ### admin/code_hosts/gitlab.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/gitlab.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:28Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { // If non-null, enforces GitLab repository permissions. This requires that there be an item in the `auth.providers` field of type "gitlab" with the same `url` field as specified in this `GitLabConnection`. - "authorization": null, + "authorization": { + "identityProvider": { + "type": null + } + }, // TLS certificate of the GitLab instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. - "certificate": null, // Other example values: // - "-----BEGIN CERTIFICATE-----\n..." + "certificate": null, - // Only used to override the cloud_default column from a config file specified by EXTSVC_CONFIG_FILE - "cloudDefault": false, - - // When set to true, this external service will be chosen as our 'Global' GitLab service. Only valid on Sourcegraph.com. Only one service can have this flag set. - "cloudGlobal": false, - - // A list of projects to never mirror from this GitLab instance. Takes precedence over \"projects\" and \"projectQuery\" configuration. You can exclude projects by: name ({"name": "group/name"}), ID ({"id": 42}), regular expression matching pattern ({"pattern": "^group/project-.*"}), or by excluding empty repositories ({"emptyRepos": true}). - "exclude": null, + // A list of projects to never mirror from this GitLab instance. Takes precedence over "projects" and "projectQuery" configuration. You can exclude projects by: name ({"name": "group/name"}), ID ({"id": 42}), regular expression matching pattern ({"pattern": "^group\/project-.*"}), or by excluding empty repositories ({"emptyRepos": true}). // Other example values: // - [ // { @@ -99949,22 +100475,30 @@ See [Internal rate limits](/admin/code_hosts/rate_limits#internal-rate-limits). // "name": "gitlab-com/www-gitlab-com" // } // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, // The type of Git URLs to use for cloning and fetching Git repositories on this GitLab instance. - // // If "http", Sourcegraph will access GitLab repositories using Git URLs of the form http(s)://gitlab.example.com/myteam/myproject.git (using https: if the GitLab instance uses HTTPS). - // // If "ssh", Sourcegraph will access GitLab repositories using Git URLs of the form git@example.gitlab.com:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication. + // Valid options: "http", "ssh" "gitURLType": "http", // Deprecated and ignored field which will be removed entirely in the next release. GitLab repositories can no longer be enabled or disabled explicitly. - "initialRepositoryEnablement": null, + "initialRepositoryEnablement": false, // If true, internal repositories will be accessible to all users on Sourcegraph as if they were public, and user permission syncs will no longer check for public repositories. This overrides repository permissions but allows easier discovery and access to internal repositories, and may be desirable if all users on the Sourcegraph instance should have access to all internal repositories anyways. Defaults to false. "markInternalReposAsPublic": false, + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, + // An array of transformations will apply to the repository name. Currently, only regex replacement is supported. All transformations happen after "repositoryPathPattern" is processed. - "nameTransformations": null, // Other example values: // - [ // { @@ -99976,21 +100510,21 @@ See [Internal rate limits](/admin/code_hosts/rate_limits#internal-rate-limits). // "replacement": "" // } // ] + "nameTransformations": null, + // REQUIRED: // An array of strings specifying which GitLab projects to mirror on Sourcegraph. Each string is a URL path and query that targets a GitLab API endpoint returning a list of projects. If the string only contains a query, then "projects" is used as the path. Examples: "?membership=true&search=foo", "groups/mygroup/projects". - // // The special string "none" can be used as the only element to disable this feature. Projects matched by multiple query strings are only imported once. Here are a few endpoints that return a list of projects: https://docs.gitlab.com/ee/api/projects.html#list-all-projects, https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects, https://docs.gitlab.com/ee/api/search.html#scope-projects. - "projectQuery": [ - "none" - ], // Other example values: // - [ // "?membership=true\u0026search=foo", // "groups/mygroup/projects" // ] + "projectQuery": [ + "none" + ], // A list of projects to mirror from this GitLab instance. Supports including by name ({"name": "group/name"}) or by ID ({"id": 42}). - "projects": null, // Other example values: // - [ // { @@ -100008,6 +100542,7 @@ See [Internal rate limits](/admin/code_hosts/rate_limits#internal-rate-limits). // "name": "gitlab-org/gitlab-ce" // } // ] + "projects": null, // Rate limit applied when making background API requests to GitLab. "rateLimit": { @@ -100016,35 +100551,37 @@ See [Internal rate limits](/admin/code_hosts/rate_limits#internal-rate-limits). }, // The pattern used to generate a the corresponding Sourcegraph repository name for a GitLab project. In the pattern, the variable "{host}" is replaced with the GitLab URL's host (such as gitlab.example.com), and "{pathWithNamespace}" is replaced with the GitLab project's "namespace/path" (such as "myteam/myproject"). - // // For example, if your GitLab is https://gitlab.example.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{pathWithNamespace}" would mean that a GitLab project at https://gitlab.example.com/myteam/myproject is available on Sourcegraph at https://src.example.com/gitlab.example.com/myteam/myproject. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. "repositoryPathPattern": "{host}/{pathWithNamespace}", - // A GitLab access token with "api" scope. Can be a personal access token (PAT) or an OAuth token. If you are enabling permissions with identity provider type "external", this token should also have "sudo" scope. + // REQUIRED: + // A GitLab access token with "api" scope. Can be a personal access token (PAT) or an OAuth token. If you are enabling permissions with identity provider type "username", this token should also have "sudo" scope. "token": null, // The OAuth token expiry (Unix timestamp in seconds) - "token.oauth.expiry": null, + "token.oauth.expiry": 0, // The OAuth refresh token "token.oauth.refresh": null, // The type of the token + // Valid options: "pat", "oauth" "token.type": "pat", + // REQUIRED: // URL of a GitLab instance, such as https://gitlab.example.com or (for GitLab.com) https://gitlab.com. - "url": null, // Other example values: // - "https://gitlab.com" // - "https://gitlab.example.com" + "url": null, + // ⚠️ DEPRECATED: Deprecated in favour of first class webhooks. See https://sourcegraph.com/docs/admin/config/webhooks/incoming#deprecation-notice // An array of webhook configurations "webhooks": null } ``` - +{/* SCHEMA_SYNC_END: admin/code_hosts/gitlab.schema.json */} ## Native integration To provide out-of-the-box code navigation features to your users on GitLab, you will need to [configure your GitLab instance](https://docs.gitlab.com/ee/integration/sourcegraph.html). If you are using an HTTPS connection to GitLab, you will need to [configure HTTPS](/admin/http_https_configuration) for your Sourcegraph instance. @@ -100107,6 +100644,12 @@ There are 2 ways to connect with GitHub: {/* */} +There are two ways to connect a GitHub App: +1. **[Create a new GitHub App](#creating-a-new-github-app)** via Sourcegraph, which will set up all of the required permissions and automatically retrieve the credentials +2. **[Add an existing GitHub App](#adding-an-existing-github-app)** by providing the details of an existing GitHub App (required when using GitHub Enterprise Apps) + +### Creating a new GitHub App + To create a GitHub App and connect it to Sourcegraph: 1. Go to **Site admin > Repositories > Github Apps** on Sourcegraph. @@ -100150,13 +100693,21 @@ To create a GitHub App and connect it to Sourcegraph: You can now [select repositories to sync](#selecting-repositories-to-sync) or see more configuration options in the [configuration section](#configuration). +#### Syncing repositories from all installations + +When creating a code host connection for a GitHub App with multiple installations, you have two options: + +1. **Sync from a specific installation**: Create a connection under a specific installation (as described above). This will only sync repositories from that particular installation. + +2. **Sync from all installations**: Create a connection that syncs repositories from all installations of the GitHub App by omitting the `installationID` field in the connection configuration. This is useful when you want a single connection to handle repositories across multiple organizations or user accounts. + 9. (Optional) If you want to sync repositories from other organization or user namespaces and your GitHub App is set to public visibility, you can create additional installations with **Add installation**. > NOTE: When you create a GitHub App, Sourcegraph automatically sets up an [incoming webhook](/admin/config/webhooks/incoming) for the app. This webhook subscribes to events for any repository or organization the app has access to, allowing Sourcegraph to keep repository and permission data in sync with GitHub. > NOTE: If you are using [Batch Changes](/batch-changes/), you can create a GitHub App to perform [commit signing](/admin/config/batch_changes#commit-signing-for-github) (Beta). -### Multiple installations +#### Multiple installations The initial GitHub App setup will only install the App on the organization or user account that you registered it with. If your code is spread across multiple organizations or user accounts, you will need to create additional installations for each namespace that you want Sourcegraph to sync repositories from. @@ -100164,7 +100715,7 @@ By default, Sourcegraph creates a private GitHub App, which only allows the App Once public, App can be installed in additional namespaces either from Sourcegraph or from GitHub. -#### Installing from Sourcegraph +##### Installing from Sourcegraph 1. Go to **Site admin > Repositories > Github Apps** and click **Edit** on the App you want to install in another namespace. You'll be taken to the App details page. @@ -100185,7 +100736,7 @@ Once public, App can be installed in additional namespaces either from Sourcegra 4. To sync repositories from this installation, click **Add connection** under your new installation. -#### Installing from GitHub +##### Installing from GitHub 1. Go to the GitHub App page. You can get here easily from Sourcegraph by clicking **View in GitHub** for the App you want to install in another namespace. 2. Click **Configure**, or go to **App settings > Install App**, and select the organization or user account you want to install the App on. @@ -100197,10 +100748,40 @@ Once public, App can be installed in additional namespaces either from Sourcegra 5. To sync repositories from this installation, click **Add connection** under your new installation. +### Adding an existing GitHub App + +If you have an existing GitHub App (such as a GitHub Enterprise App), you can connect it to Sourcegraph by providing its details manually. This is particularly useful for: + +- **GitHub Enterprise Apps**: Apps that can be installed across multiple organizations within an enterprise account while maintaining private visibility +- **Existing GitHub Apps**: Apps that were created outside of Sourcegraph that you want to use for repository syncing + +To add an existing GitHub App: + +1. Go to **Site admin > Repositories > Github Apps** on Sourcegraph. +2. Click **Add an existing GitHub App**. +3. Enter the following details of your existing GitHub App: + - **GitHub URL**: The URL of your GitHub instance (e.g., `https://github.com` or `https://github-enterprise.example.com`) + - **Client ID**: The unique identifier for your GitHub App + - **Private Key**: The private key generated for your GitHub App (in PEM format) +4. Click **Add GitHub App** to save the configuration. +5. Once added, you can manage installations and create code host connections just like with apps created through Sourcegraph. + +> NOTE: You'll still need to create a client secret on GitHub and [set up an auth provider](/admin/auth#github) if you would like to enable repository permissions. + +When creating code host connections for your existing GitHub App, you can choose to sync repositories from a specific installation or from all installations by omitting the `installationID` field (see [Syncing repositories from all installations](#syncing-repositories-from-all-installations)). + +> NOTE: For GitHub Enterprise Apps, this method allows you to use a single app across multiple organizations within your enterprise, avoiding the need to create separate public apps or multiple private apps for each organization. + +> NOTE: Make sure your existing GitHub App has the required permissions listed in the [Creating a new GitHub App](#creating-a-new-github-app) section. + ### Configuring Multiple Private GitHub Apps for Sourcegraph If you prefer not to make your GitHub App public and instead create separate private GitHub Apps for each organizations, users will need to authorize each GitHub App individually to ensure proper repository access and permissions syncing. This is because GitHub Apps have narrowly scoped permissions and do not share authentication across multiple installations. To streamline this process, users can go to `User Settings` > `Account Security` in Sourcegraph and connect all necessary GitHub Apps from there. Once authorized, Sourcegraph will use the user's GitHub identity to determine access across all configured GitHub Apps. -For customers using GitHub Enterprise Cloud, an alternative approach is to create an Enterprise GitHub App, which can be installed across multiple organizations within an enterprise account while maintaining private visibility. More details on this approach can be found in [GitHub's documentation](https://docs.github.com/en/enterprise-cloud@latest/admin/managing-your-enterprise-account/creating-github-apps-for-your-enterprise). +**GitHub Enterprise Apps**: For customers using GitHub Enterprise Cloud, we recommend creating a GitHub Enterprise App, which can be installed across multiple organizations within an enterprise account while maintaining private visibility. This eliminates the need to create separate apps for each organization or make your app public. + +To use a GitHub Enterprise App with Sourcegraph: +1. Create the Enterprise App in your GitHub Enterprise settings (see [GitHub's documentation](https://docs.github.com/en/enterprise-cloud@latest/admin/managing-your-enterprise-account/creating-github-apps-for-your-enterprise)) +2. Use the [**Add an existing GitHub App**](#adding-an-existing-github-app) option in Sourcegraph to connect it ### Uninstalling an App @@ -100303,15 +100884,11 @@ Fine-grained tokens can access public repositories, but can only access the priv When creating your fine-grained access token, select the following permissions depending on the purpose of the token: -| Feature | Required token permissions | +| Feature | Required token permissions | | ----------------------------------------------------- | ------------------------------------------------------ | | [Sync private repositories](#private-repositories) | `Repository permissions: Contents - Access: Read-only` | | [Sync repository permissions][permissions] | `Repository permissions: Contents - Access: Read-only` | -| [Batch changes][batch-changes] | `Unsupported` | - - - -> WARNING: Fine-grained tokens don't support the `repositoryQuery` code host connection option or batch changes. Both of these features rely on GitHub's GraphQL API, which is [unsupported by fine-grained access tokens](https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql). +| [Batch changes][batch-changes] | `Repository permissions: Contents: Read and write, Metadata: Read-only, Pull requests: Read and write, Workflows: Read and write` | ### Private repositories @@ -100487,30 +101064,34 @@ GitHub connections support the following configuration options, which are specif ### admin/code_hosts/github.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/github.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:27Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json + // Authentication alternatives: token OR gitHubAppDetails OR externalAccount OR useRandomExternalAccount + { // If non-null, enforces GitHub repository permissions. This requires that there is an item in the [site configuration json](https://sourcegraph.com/docs/admin/config/site_config#auth-providers) `auth.providers` field, of type "github" with the same `url` field as specified in this `GitHubConnection`. - "authorization": null, + "authorization": { + "groupsCacheTTL": 72, + "markInternalReposAsPublic": false, + "syncInternalRepoPermissions": false + }, // TLS certificate of the GitHub Enterprise instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. - "certificate": null, // Other example values: // - "-----BEGIN CERTIFICATE-----\n..." + "certificate": null, - // Only used to override the cloud_default column from a config file specified by EXTSVC_CONFIG_FILE - "cloudDefault": false, - - // When set to true, this external service will be chosen as our 'Global' GitHub service. Only valid on Sourcegraph.com. Only one service can have this flag set. - "cloudGlobal": false, - - // A list of repositories to never mirror from this GitHub instance. Takes precedence over "orgs", "repos", and "repositoryQuery" configuration. - // - // Supports excluding by name ({"name": "owner/name"}) or by ID ({"id": "MDEwOlJlcG9zaXRvcnkxMTczMDM0Mg=="}). - // + // A list of repository entries that define which repositories to never mirror from this GitHub instance. Takes precedence over "orgs", "repos", and "repositoryQuery" configuration. + // Each entry in the list can be either a name ({"name": "owner/name"}), an ID ({"id": "MDEwOlJlcG9zaXRvcnkxMTczMDM0Mg=="}), or a set of conditions like pattern, size, stars, etc. If multiple conditions are specified within a single entry, ALL of those conditions must be met for a repository to be excluded (AND). If multiple entries exist in the exclude list, a repository matching ANY of the entries (OR) will be excluded from syncing. // Note: ID is the GitHub GraphQL ID, not the GitHub database ID. eg: "curl https://api.github.com/repos/vuejs/vue | jq .node_id" - "exclude": null, // Other example values: - // - [{"forks":true}] + // - [ + // { + // "forks": true + // } + // ] // - [ // { // "name": "owner/name" @@ -100536,32 +101117,54 @@ GitHub connections support the following configuration options, which are specif // "stars": "\u003c 100" // } // ] + "exclude": null, + + // GitHub external account to use for authentication. + "externalAccount": { + "accountID": null, + "clientID": null + }, // If non-null, this is a GitHub App connection with some additional properties. - "gitHubAppDetails": null, + "gitHubAppDetails": { + "appID": 0, + "baseURL": null, + "cloneAllRepositories": false, + "installationID": 0 + }, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, // The type of Git URLs to use for cloning and fetching Git repositories on this GitHub instance. - // // If "http", Sourcegraph will access GitHub repositories using Git URLs of the form http(s)://github.com/myteam/myproject.git (using https: if the GitHub instance uses HTTPS). - // - // If "ssh", Sourcegraph will access GitHub repositories using Git URLs of the form git@github.com:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication. + // If "ssh", Sourcegraph will access GitHub repositories using Git URLs of the form git@github.com:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth. + // Valid options: "http", "ssh" "gitURLType": "http", // DEPRECATED: The installation ID of the GitHub App. "githubAppInstallationID": null, // Deprecated and ignored field which will be removed entirely in the next release. GitHub repositories can no longer be enabled or disabled explicitly. Configure repositories to be mirrored via "repos", "exclude" and "repositoryQuery" instead. - "initialRepositoryEnablement": null, + "initialRepositoryEnablement": false, + + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, // An array of organization names identifying GitHub organizations whose repositories should be mirrored on Sourcegraph. - "orgs": null, // Other example values: - // - ["name"] + // - [ + // "name" + // ] // - [ // "kubernetes", // "golang", // "facebook" // ] + "orgs": null, // Whether the code host connection is in a pending state. "pending": false, @@ -100573,55 +101176,52 @@ GitHub connections support the following configuration options, which are specif }, // An array of repository "owner/name" strings specifying which GitHub or GitHub Enterprise repositories to mirror on Sourcegraph. - "repos": null, // Other example values: - // - ["owner/name"] + // - [ + // "owner/name" + // ] // - [ // "kubernetes/kubernetes", // "golang/go", // "facebook/react" // ] + "repos": null, // The pattern used to generate the corresponding Sourcegraph repository name for a GitHub or GitHub Enterprise repository. In the pattern, the variable "{host}" is replaced with the GitHub host (such as github.example.com), and "{nameWithOwner}" is replaced with the GitHub repository's "owner/path" (such as "myorg/myrepo"). - // // For example, if your GitHub Enterprise URL is https://github.example.com and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of "{host}/{nameWithOwner}" would mean that a GitHub repository at https://github.example.com/myorg/myrepo is available on Sourcegraph at https://src.example.com/github.example.com/myorg/myrepo. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. "repositoryPathPattern": "{host}/{nameWithOwner}", // An array of strings specifying which GitHub or GitHub Enterprise repositories to mirror on Sourcegraph. The valid values are: - // // - `public` mirrors all public repositories for GitHub Enterprise and is the equivalent of `none` for GitHub - // // - `internal` mirrors all internal repositories for GitHub Enterprise and is the equivalent of `none` for GitHub - // // - `affiliated` mirrors all repositories affiliated with the configured token's user: - // - Private repositories with read access - // - Public repositories owned by the user or their orgs - // - Public repositories with write access - // + // - Private repositories with read access + // - Public repositories owned by the user or their orgs + // - Public repositories with write access // - `none` mirrors no repositories (except those specified in the `repos` configuration property or added manually) - // // - All other values are executed as a GitHub advanced repository search as described at https://github.com/search/advanced. Example: to sync all repositories from the "sourcegraph" organization including forks the query would be "org:sourcegraph fork:true". - // // If multiple values are provided, their results are unioned. - // // If you need to narrow the set of mirrored repositories further (and don't want to enumerate it with a list or query set as above), create a new bot/machine user on GitHub or GitHub Enterprise that is only affiliated with the desired repositories. "repositoryQuery": [ "none" ], - // A GitHub personal access token. Create one for GitHub.com at https://github.com/settings/tokens/new?description=Sourcegraph (for GitHub Enterprise, replace github.com with your instance's hostname). See https://sourcegraph.com/docs/admin/code_host_connection/github#github-api-token-and-access for which scopes are required for which use cases. + // A GitHub personal access token. Create one for GitHub.com at https://github.com/settings/tokens/new?description=Sourcegraph (for GitHub Enterprise, replace github.com with your instance's hostname). See https://sourcegraph.com/docs/admin/code_hosts/github#github-api-access for which scopes are required for which use cases. "token": null, + // REQUIRED: // URL of a GitHub instance, such as https://github.com or https://github-enterprise.example.com. - "url": null, // Other example values: // - "https://github.com" // - "https://github-enterprise.example.com" + "url": null, + + // Use a random user external account for authentication. When set, the code host connection will only be able to add public repositories. + "useRandomExternalAccount": false, + // ⚠️ DEPRECATED: Deprecated in favour of first class webhooks. See https://sourcegraph.com/docs/admin/config/webhooks/incoming#deprecation-notice // An array of configurations defining existing GitHub webhooks that send updates back to Sourcegraph. - "webhooks": null // Other example values: // - [ // { @@ -100629,43 +101229,10 @@ GitHub connections support the following configuration options, which are specif // "secret": "webhook-secret" // } // ] + "webhooks": null } ``` - -## Default branch - -Sourcegraph displays search results from the default branch of a repository when no `revision:` [parameter](/code-search/queries#repository-revisions) is specified. If you'd like the search results to be displayed from another branch by default, you may [change a repo's default branch on the github repo settings page](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch). If this is not an option, consider using [search contexts](/code-search/working/search_contexts) instead. - -## Troubleshooting - -### Hitting GitHub Search API rate limit with repositoryQuery -When Sourcegraph syncs repositories configured via `repositoryQuery`, it consumes GitHub API search rate limit, which is lower than the normal rate limit. The `affiliated`, `public`, and `none` special values, however, trigger normal API requests instead of search API requests. `internal` is also a special value that uses the GitHub Search API to list all internal repositories. - -When the search rate limit quota is exhausted, an error like `failed to list GitHub repositories for search: page=..., searchString=\"...\"` can be found in logs. To work around this try reducing the frequency with which repository syncing happens by setting a higher value (in minutes) of `repoListUpdateInterval` in your Sourcegraph [site config](/admin/config/site_config). - -`repositoryQuery` is the only repo syncing method that consumes GitHub search API quota, so if setting `repoListUpdateInterval` doesn't work consider switching your syncing method to use another option, like `orgs`, or using one of the special values described above. - -### "repositoryQuery": ["public"] does not return archived status of a repo - -The `repositoryQuery` option `"public"` is valuable in that it allows sourcegraph to sync all public repositories, however, it does not return whether or not a repo is archived. This can result in archived repos appearing in normal search. You can see an example of what is returned by the GitHub API for a query to "public" [here](https://docs.github.com/en/rest/reference/repos#list-public-repositories). - -If you would like to sync all public repositories while omitting archived repos, consider generating a GitHub token with access to only public repositories, then use `repositoryQuery` with option `affiliated` and an `exclude` argument with option `public` as seen in the example below: -``` -{ - "url": "https://github.example.com", - "gitURLType": "http", - "repositoryPathPattern": "devs/{nameWithOwner}", - "repositoryQuery": [ - "affiliated" - ], - "token": "TOKEN_WITH_PUBLIC_ACCESS", - "exclude": [ - { - "archived": true - } - ] -} -``` +{/* SCHEMA_SYNC_END: admin/code_hosts/github.schema.json */} @@ -100780,48 +101347,82 @@ Gerrit connections support the following configuration options, which are specif ### admin/code_hosts/gerrit.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/gerrit.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:32Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { // If non-null, enforces Gerrit repository permissions. This requires that there is an item in the [site configuration json](https://sourcegraph.com/docs/admin/config/site_config#auth-providers) `auth.providers` field, of type "gerrit" with the same `url` field as specified in this `GerritConnection`. - "authorization": null, + "authorization": { + "identityProvider": null + }, + // A list of repositories to never mirror from this Gerrit instance. Takes precedence over "projects" configuration. + // Supports excluding by name ({"name": "owner/name"}) + // Other example values: + // - [ + // { + // "name": "docs" + // }, + // { + // "name": "php/php-src" + // } + // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, + + // The type of Git URLs to use for cloning and fetching Git repositories on this Gerrit instance. + // If "http", Sourcegraph will access Gerrit repositories using Git URLs of the form http(s)://gerrit.example.com/a/myteam/myproject.git (using https: if the Gerrit instance uses HTTPS). + // If "ssh", Sourcegraph will access Gerrit repositories using Git URLs of the form git@gerrit.example.com:myteam/myproject.git. The exact hostname and port will be fetched from /ssh_info. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth. + // Valid options: "http", "ssh" + "gitURLType": "http", + + // REQUIRED: // The password associated with the Gerrit username used for authentication. "password": null, + // Any number of query parameters as supported by the Gerrit REST API: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html + // Other example values: + // - "query=name:kubernetes" + // - "r=.*test" + "projectQuery": null, + // An array of project strings specifying which Gerrit projects to mirror on Sourcegraph. If empty, all projects will be mirrored. - "projects": null, // Other example values: - // - ["name","owner/name"] + // - [ + // "name", + // "owner/name" + // ] // - [ // "docs", // "kubernetes/kubernetes", // "golang/go", // "facebook/react" // ] + "projects": null, - // A list of repositories to never mirror from this Gerrit instance. Takes precedence over \"projects\" configuration. - // - // Supports excluding by name ({"name": "owner/name"}) - "exclude": null, - // Other example values: - // - [ - // { - // "name": "docs" - // }, - // { - // "name": "php/php-src" - // } - // ] + // The pattern used to generate the corresponding Sourcegraph repository name for a Gerrit repository. In the pattern, the variable "{host}" is replaced with the Gerrit host (such as gerrit.example.com), and "{name}" is replaced with the Gerrit repository's name (such as "myrepo"). + // For example, if your Gerrit URL is https://gerrit.example.com and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of "{host}/{name}" would mean that a Gerrit repository at https://gerrit.example.com/myrepo is available on Sourcegraph at https://src.example.com/gerrit.example.com/myrepo. + // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. + "repositoryPathPattern": "{host}/{name}", + // REQUIRED: // URL of a Gerrit instance, such as https://gerrit.example.com. - "url": null, // Other example values: // - "https://gerrit.example.com" + "url": null, - // A username for authentication withe the Gerrit code host. + // REQUIRED: + // A username for authentication with the Gerrit code host. "username": null } ``` +{/* SCHEMA_SYNC_END: admin/code_hosts/gerrit.schema.json */} @@ -101035,20 +101636,32 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi ### admin/code_hosts/bitbucket_server.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/bitbucket_server.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:28Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json + // Authentication alternatives: token OR password + { // If non-null, enforces Bitbucket Server / Bitbucket Data Center repository permissions. - "authorization": null, + "authorization": { + "identityProvider": { + "type": null + }, + "oauth": { + "consumerKey": null, + "signingKey": null + }, + "oauth2": false + }, // TLS certificate of the Bitbucket Server / Bitbucket Data Center instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh. - "certificate": null, // Other example values: // - "-----BEGIN CERTIFICATE-----\n..." + "certificate": null, // A list of repositories to never mirror from this Bitbucket Server / Bitbucket Data Center instance. Takes precedence over "repos" and "repositoryQuery". - // // Supports excluding by name ({"name": "projectKey/repositorySlug"}) or by ID ({"id": 42}). - "exclude": null, // Other example values: // - [ // { @@ -101072,29 +101685,43 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi // "pattern": "^topsecretproject/.*" // } // ] + "exclude": null, // Whether or not personal repositories should be excluded or not. When true, Sourcegraph will ignore personal repositories it may have access to. See https://sourcegraph.com/docs/integration/bitbucket_server#excluding-personal-repositories for more information. "excludePersonalRepositories": false, + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, + // The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Server / Bitbucket Data Center instance. - // // If "http", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form http(s)://bitbucket.example.com/scm/myproject/myrepo.git (using https: if the Bitbucket Server / Bitbucket Data Center instance uses HTTPS). - // - // If "ssh", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form ssh://git@example.bitbucket.org/myproject/myrepo.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication. - "gitURLType": "http", + // If "ssh", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form ssh://git@example.bitbucket.org/myproject/myrepo.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth. + // Valid options: "http", "ssh" // Other example values: // - "ssh" + "gitURLType": "http", // Deprecated and ignored field which will be removed entirely in the next release. BitBucket repositories can no longer be enabled or disabled explicitly. "initialRepositoryEnablement": false, + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, + // The password to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "username" field. - // // For Bitbucket Server / Bitbucket Data Center instances that support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.5 and newer), it is recommended to provide a token instead (in the "token" field). "password": null, // Configuration for Bitbucket Server / Bitbucket Data Center Sourcegraph plugin - "plugin": null, + "plugin": { + "permissions": "disabled", + "webhooks": { + "disableSync": false, + "secret": null + } + }, // An array of project key strings that defines a collection of repositories related to their associated project keys "projectKeys": null, @@ -101106,55 +101733,55 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi }, // An array of repository "projectKey/repositorySlug" strings specifying repositories to mirror on Sourcegraph. - "repos": null, // Other example values: // - [ // "myproject/myrepo", // "myproject/myotherrepo", // "~USER/theirrepo" // ] + "repos": null, // The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Server / Bitbucket Data Center repository. - // - // - "{host}" is replaced with the Bitbucket Server / Bitbucket Data Center URL's host (such as bitbucket.example.com) - // - "{projectKey}" is replaced with the Bitbucket repository's parent project key (such as "PRJ") - // - "{repositorySlug}" is replaced with the Bitbucket repository's slug key (such as "my-repo"). - // + // - "{host}" is replaced with the Bitbucket Server / Bitbucket Data Center URL's host (such as bitbucket.example.com) + // - "{projectKey}" is replaced with the Bitbucket repository's parent project key (such as "PRJ") + // - "{repositorySlug}" is replaced with the Bitbucket repository's slug key (such as "my-repo"). // For example, if your Bitbucket Server / Bitbucket Data Center is https://bitbucket.example.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{projectKey}/{repositorySlug}" would mean that a Bitbucket Server / Bitbucket Data Center repository at https://bitbucket.example.com/projects/PRJ/repos/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.example.com/PRJ/my-repo. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. - "repositoryPathPattern": "{host}/{projectKey}/{repositorySlug}", // Other example values: // - "{projectKey}/{repositorySlug}" + "repositoryPathPattern": "{host}/{projectKey}/{repositorySlug}", // An array of strings specifying which repositories to mirror on Sourcegraph. Each string is a URL query string with parameters that filter the list of returned repos. Examples: "?name=my-repo&projectname=PROJECT&visibility=private". - // // The special string "none" can be used as the only element to disable this feature. Repositories matched by multiple query strings are only imported once. Here's the official Bitbucket Server / Bitbucket Data Center documentation about which query string parameters are valid: https://docs.atlassian.com/bitbucket-server/rest/6.1.2/bitbucket-rest.html#idp355 - "repositoryQuery": [ - "none" - ], // Other example values: // - [ // "?name=my-repo\u0026projectname=PROJECT\u0026visibility=private" // ] + "repositoryQuery": [ + "none" + ], // A Bitbucket Server / Bitbucket Data Center personal access token with Read permissions. When using batch changes, the token needs Write permissions. Create one at https://[your-bitbucket-hostname]/plugins/servlet/access-tokens/add. Also set the corresponding "username" field. - // // For Bitbucket Server / Bitbucket Data Center instances that don't support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.4 and older), specify user-password credentials in the "username" and "password" fields. "token": null, + // REQUIRED: // URL of a Bitbucket Server / Bitbucket Data Center instance, such as https://bitbucket.example.com. - "url": null, // Other example values: // - "https://bitbucket.example.com" + "url": null, + // REQUIRED: // The username to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "token" or "password" field. "username": null, // DEPRECATED: Switch to "plugin.webhooks" - "webhooks": null + "webhooks": { + "secret": null + } } ``` +{/* SCHEMA_SYNC_END: admin/code_hosts/bitbucket_server.schema.json */} @@ -101277,26 +101904,31 @@ Bitbucket Cloud connections support the following configuration options, which a ### admin/code_hosts/bitbucket_cloud.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/bitbucket_cloud.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:29Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json + // Authentication alternatives: username + appPassword + { // The workspace access token to use when authenticating with Bitbucket Cloud. "accessToken": null, // The API URL of Bitbucket Cloud, such as https://api.bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform. - "apiURL": null, // Other example values: // - "https://api.bitbucket.org" + "apiURL": null, // The app password to use when authenticating to the Bitbucket Cloud. Also set the corresponding "username" field. "appPassword": null, // If non-null, enforces Bitbucket Cloud repository permissions. This requires that there is an item in the [site configuration json](https://sourcegraph.com/docs/admin/config/site_config#auth-providers) `auth.providers` field, of type "bitbucketcloud" with the same `url` field as specified in this `BitbucketCloudConnection`. - "authorization": null, + "authorization": { + "identityProvider": null + }, // A list of repositories to never mirror from Bitbucket Cloud. Takes precedence over "teams" configuration. - // // Supports excluding by name ({"name": "myorg/myrepo"}) or by UUID ({"uuid": "{fceb73c7-cef6-4abe-956d-e471281126bd}"}). - "exclude": null, // Other example values: // - [ // { @@ -101317,15 +101949,24 @@ Bitbucket Cloud connections support the following configuration options, which a // "pattern": "^topsecretproject/.*" // } // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, // The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Cloud. - // // If "http", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form https://bitbucket.org/myteam/myproject.git. - // // If "ssh", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form git@bitbucket.org:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication. - "gitURLType": "http", + // Valid options: "http", "ssh" // Other example values: // - "ssh" + "gitURLType": "http", + + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, // Rate limit applied when making background API requests to Bitbucket Cloud. "rateLimit": { @@ -101333,38 +101974,47 @@ Bitbucket Cloud connections support the following configuration options, which a "requestsPerHour": 7200 }, + // An array of repository "projectKey/repositorySlug" strings specifying repositories to mirror on Sourcegraph. + // Other example values: + // - [ + // "myproject/myrepo", + // "myproject/myotherrepo" + // ] + "repos": null, + // The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Cloud repository. - // - // - "{host}" is replaced with the Bitbucket Cloud URL's host (such as bitbucket.org), and "{nameWithOwner}" is replaced with the Bitbucket Cloud repository's "owner/path" (such as "myorg/myrepo"). - // + // - "{host}" is replaced with the Bitbucket Cloud URL's host (such as bitbucket.org), and "{nameWithOwner}" is replaced with the Bitbucket Cloud repository's "owner/path" (such as "myorg/myrepo"). // For example, if your Bitbucket Cloud is https://bitbucket.org and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{nameWithOwner}" would mean that a Bitbucket Cloud repository at https://bitbucket.org/alice/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.org/alice/my-repo. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. "repositoryPathPattern": "{host}/{nameWithOwner}", // An array of team names identifying Bitbucket Cloud teams whose repositories should be mirrored on Sourcegraph. - "teams": null, // Other example values: - // - ["name"] + // - [ + // "name" + // ] // - [ // "kubernetes", // "golang", // "facebook" // ] + "teams": null, + // REQUIRED: // URL of Bitbucket Cloud, such as https://bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform. - "url": null, // Other example values: // - "https://bitbucket.org" + "url": null, // The username to use when authenticating to the Bitbucket Cloud. Also set the corresponding "appPassword" field. "username": null, + // ⚠️ DEPRECATED: Deprecated in favour of first class webhooks. See https://sourcegraph.com/docs/admin/config/webhooks/incoming#deprecation-notice // A shared secret used to authenticate incoming webhooks (minimum 12 characters). "webhookSecret": null } ``` - +{/* SCHEMA_SYNC_END: admin/code_hosts/bitbucket_cloud.schema.json */} ## Webhooks Using the `webhooks` property on the external service has been deprecated. @@ -101441,13 +102091,17 @@ Azure DevOps connections support the following configuration options, which are ### admin/code_hosts/azuredevops.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/azuredevops.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:30Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json + // Authentication alternatives: token OR windowsPassword + { // A flag to enforce Azure DevOps repository access permissions "enforcePermissions": false, // A list of repositories to never mirror from Azure DevOps Services. - "exclude": null, // Other example values: // - [ // { @@ -101465,42 +102119,77 @@ Azure DevOps connections support the following configuration options, which are // "pattern": "^topsecretproject/.*" // } // ] + "exclude": null, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, // The type of Git URLs to use for cloning and fetching Git repositories. - // // If "http", Sourcegraph will access repositories using Git URLs of the form http(s)://dev.azure.com/myrepo.git. - // - // If "ssh", Sourcegraph will access repositories using Git URLs of the form git@ssh.dev.azure.com:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication. + // If "ssh", Sourcegraph will access repositories using Git URLs of the form git@ssh.dev.azure.com:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth. + // Valid options: "http", "ssh" "gitURLType": "http", + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, + // An array of organization names identifying Azure DevOps organizations whose repositories should be mirrored on Sourcegraph. - "orgs": null, // Other example values: - // - ["name"] + // - [ + // "name" + // ] // - [ // "kubernetes", // "golang", // "facebook" // ] + "orgs": null, // An array of projects "org/project" strings specifying which Azure DevOps projects' repositories should be mirrored on Sourcegraph. + // Other example values: + // - [ + // "org/project" + // ] "projects": null, + + // Rate limit applied when making background API requests. + "rateLimit": { + "enabled": false, + "requestsPerHour": 0 + }, + + // The pattern used to generate the corresponding Sourcegraph repository name for a Azure DevOps repository. + // - "{host}" is replaced with the Azure DevOps URL's host (such as dev.azure.com) + // - "{orgName}" is replaced with the repository's parent projects owning organization (or collection on DevOps server) + // - "{projectName}" is replaced with the repository's parent project + // - "{repositoryName}" is replaced with the repository's name. + // For example, if your Azure DevOps is https://dev.azure.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{orgName}/{projectName}/{repositoryName}" would mean that a Azure DevOps repository at https://dev.azure.com/MYORG/MYPROJECT/MYREPO is available on Sourcegraph at https://src.example.com/dev.azure.com/MYORG/MYPROJECT/MYREPO. + // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. // Other example values: - // - ["org/project"] + // - "{projectName}/{repositoryName}" + "repositoryPathPattern": "{host}/{orgName}/{projectName}/{repositoryName}", // The Personal Access Token associated with the Azure DevOps username used for authentication. "token": null, + // REQUIRED: // URL for Azure DevOps Services, set to https://dev.azure.com. - "url": null, // Other example values: // - "https://dev.azure.com" + "url": null, - // A username for authentication with the Azure DevOps code host. - "username": null + // REQUIRED: + // A username for authentication with the Azure DevOps code host. Typically an email address when connect to Azure DevOps Services (cloud) and a domain\username when connecting to Azure DevOp Server (onPrem) + "username": null, + + // Windows account password (Azure Devops Server OnPrem Only): This is needed to clone the repo, the Token will be used for REST API calls + "windowsPassword": null } ``` - +{/* SCHEMA_SYNC_END: admin/code_hosts/azuredevops.schema.json */} ## Webhooks Please consult [this page](/admin/config/webhooks/incoming) in order to configure webhooks. @@ -101569,15 +102258,17 @@ AWS CodeCommit connections support the following configuration options, which ar ### admin/code_hosts/aws_codecommit.schema.json +{/* SCHEMA_SYNC_START: admin/code_hosts/aws_codecommit.schema.json */} +{/* WARNING: This section is auto-generated during releases. Do not edit manually. */} +{/* Last updated: 2025-07-10T00:07:31Z via sourcegraph/sourcegraph@v6.5.2654 */} ```json { + // REQUIRED: // The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy. "accessKeyID": null, // A list of repositories to never mirror from AWS CodeCommit. - // // Supports excluding by name ({"name": "git-codecommit.us-west-1.amazonaws.com/repo-name"}) or by ARN ({"id": "arn:aws:codecommit:us-west-1:999999999999:name"}). - "exclude": null, // Other example values: // - [ // { @@ -101595,34 +102286,55 @@ AWS CodeCommit connections support the following configuration options, which ar // "name": "go-client" // } // ] + "exclude": null, + // REQUIRED: // The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS. - // // See the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit. // For detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html - "gitCredentials": null, + "gitCredentials": { + "password": null, + "username": null + }, + + // SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`. + "gitSSHCipher": null, + + // SSH keys to use when cloning Git repo. + "gitSSHCredential": null, + + // The ID of the SSH key created for your IAM users. It is required when using SSH to clone repositories. + "gitSSHKeyID": null, + + // The type of Git URLs to use for cloning and fetching Git repositories. + // Valid options: "http", "ssh" + "gitURLType": "http", // Deprecated and ignored field which will be removed entirely in the next release. AWS CodeCommit repositories can no longer be enabled or disabled explicitly. Configure which repositories should not be mirrored via "exclude" instead. "initialRepositoryEnablement": false, + // The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum. + "maxDeletions": 0, + + // REQUIRED: // The AWS region in which to access AWS CodeCommit. See the list of supported regions at https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-git. + // Valid options: "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2" "region": "us-east-1", // The pattern used to generate a the corresponding Sourcegraph repository name for an AWS CodeCommit repository. In the pattern, the variable "{name}" is replaced with the repository's name. - // // For example, if your Sourcegraph instance is at https://src.example.com, then a repositoryPathPattern of "awsrepos/{name}" would mean that a AWS CodeCommit repository named "myrepo" is available on Sourcegraph at https://src.example.com/awsrepos/myrepo. - // // It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined. - "repositoryPathPattern": "{name}", // Other example values: // - "git-codecommit.us-west-1.amazonaws.com/{name}" // - "git-codecommit.eu-central-1.amazonaws.com/{name}" + "repositoryPathPattern": "{name}", + // REQUIRED: // The AWS secret access key (that corresponds to the AWS access key ID set in `accessKeyID`). "secretAccessKey": null } ``` - +{/* SCHEMA_SYNC_END: admin/code_hosts/aws_codecommit.schema.json */} ## Setup steps for SSH connections to AWS CodeCommit repositories To add CodeCommit repositories in Docker Container: @@ -103273,12 +103985,16 @@ Service accounts are created like regular user accounts, but with a few key diff - Check the **Service account** checkbox - Click **Create service account** +![create-service-account](https://storage.googleapis.com/sourcegraph-assets/Docs/create-service-accounts-0625.png) + You'll be presented with some next steps you might want to take, like creating an access token, managing and assigning roles, and managing repository permissions. - Service accounts are automatically assigned the "Service Account" system role - They appear in the user list with "Service account" type designation - By default, service accounts can only access public and unrestricted repositories +![next-steps-service-account](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-next-steps-0625.png) + ## Managing Access Tokens Service accounts authenticate using access tokens rather than passwords. For detailed information about creating, managing, and using access tokens, see: @@ -103305,11 +104021,16 @@ Administrators can assign additional roles to service accounts through the user - [Managing user roles](/admin/access_control#managing-user-roles) - [Creating custom roles](/admin/access_control#creating-a-new-role-and-assigning-it-permissions) +![service-account-roles](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-manage-roles-0625.png) + ## Repository Permissions Service accounts respect repository permissions and access controls. For comprehensive information about repository permissions, see the [Repository permissions](/admin/permissions) documentation. Service accounts by default can only access public and unrestricted repositories in Sourcegraph. You may explicitly grant fine-grained access to private repositories from the service account's user settings page, under the **Repo permissions** tab, or via [the GraphQL API](/admin/permissions/api#explicit-permissions-api). In the **Repo permissions** tab, you can also grant service accounts access to all current and future repositories on Sourcegraph, regardless of their visibility, which is useful for service accounts that need to do things like perform search jobs, but admins should take care to ensure that the access tokens for these accounts are not shared with unauthorized users. + +![service-account-repo-permissions](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-repo-permissions-0625.png) +