# Table of Contents - [Overview - Sourcebot](#overview-sourcebot) - [Linking code from Azure Devops Cloud - Sourcebot](#linking-code-from-azure-devops-cloud-sourcebot) - [Linking code from Azure Devops Server - Sourcebot](#linking-code-from-azure-devops-server-sourcebot) - [Linking code from Bitbucket Cloud - Sourcebot](#linking-code-from-bitbucket-cloud-sourcebot) - [Authentication - Sourcebot](#authentication-sourcebot) - [Agents Overview - Sourcebot](#agents-overview-sourcebot) - [Docker Compose - Sourcebot](#docker-compose-sourcebot) - [Chat Sharing - Sourcebot](#chat-sharing-sourcebot) - [Other Git hosts - Sourcebot](#other-git-hosts-sourcebot) - [Linking code from Bitbucket Data Center - Sourcebot](#linking-code-from-bitbucket-data-center-sourcebot) - [Linking code from GitHub - Sourcebot](#linking-code-from-github-sourcebot) - [Redis - Sourcebot](#redis-sourcebot) - [Linking code from Gerrit - Sourcebot](#linking-code-from-gerrit-sourcebot) - [Linking code from Gitea - Sourcebot](#linking-code-from-gitea-sourcebot) - [Linking code from GitLab - Sourcebot](#linking-code-from-gitlab-sourcebot) - [AI Code Review Agent - Sourcebot](#ai-code-review-agent-sourcebot) - [V2 to V3 Guide - Sourcebot](#v2-to-v3-guide-sourcebot) - [Audit Logs - Sourcebot](#audit-logs-sourcebot) - [Structured Logging - Sourcebot](#structured-logging-sourcebot) - [V3 to V4 Guide - Sourcebot](#v3-to-v4-guide-sourcebot) - [Transactional Email - Sourcebot](#transactional-email-sourcebot) - [Sourcebot MCP server - Sourcebot](#sourcebot-mcp-server-sourcebot) - [Overview - Sourcebot](#overview-sourcebot) - [Config File - Sourcebot](#config-file-sourcebot) - [Access Settings - Sourcebot](#access-settings-sourcebot) - [FAQ - Sourcebot](#faq-sourcebot) - [Overview - Sourcebot](#overview-sourcebot) - [Writing search queries - Sourcebot](#writing-search-queries-sourcebot) - [Providers - Sourcebot](#providers-sourcebot) - [Roles and Permissions - Sourcebot](#roles-and-permissions-sourcebot) - [Sizing Guide - Sourcebot](#sizing-guide-sourcebot) - [Permission syncing - Sourcebot](#permission-syncing-sourcebot) - [Searching multiple branches and tags - Sourcebot](#searching-multiple-branches-and-tags-sourcebot) - [License key - Sourcebot](#license-key-sourcebot) - [Search contexts - Sourcebot](#search-contexts-sourcebot) - [External Identity Providers - Sourcebot](#external-identity-providers-sourcebot) - [Environment variables - Sourcebot](#environment-variables-sourcebot) - [Local Git repositories - Sourcebot](#local-git-repositories-sourcebot) - [Analytics - Sourcebot](#analytics-sourcebot) - [AI Search Assist - Sourcebot](#ai-search-assist-sourcebot) - [Code navigation - Sourcebot](#code-navigation-sourcebot) - [Overview - Sourcebot](#overview-sourcebot) - [Language Model Providers - Sourcebot](#language-model-providers-sourcebot) - [Overview - Sourcebot](#overview-sourcebot) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) - [Vercel Security Checkpoint](#vercel-security-checkpoint) --- # Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Getting Started Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Features](https://docs.sourcebot.dev/docs/overview#features) * [Ask Sourcebot](https://docs.sourcebot.dev/docs/overview#ask-sourcebot) * [Code Search](https://docs.sourcebot.dev/docs/overview#code-search) * [Code Navigation](https://docs.sourcebot.dev/docs/overview#code-navigation) * [Cross code-host support](https://docs.sourcebot.dev/docs/overview#cross-code-host-support) * [Authentication](https://docs.sourcebot.dev/docs/overview#authentication) * [Self-hosted](https://docs.sourcebot.dev/docs/overview#self-hosted) * [Get started](https://docs.sourcebot.dev/docs/overview#get-started) * [Architecture](https://docs.sourcebot.dev/docs/overview#architecture) * [Scalability](https://docs.sourcebot.dev/docs/overview#scalability) * [License key](https://docs.sourcebot.dev/docs/overview#license-key) * [Telemetry](https://docs.sourcebot.dev/docs/overview#telemetry) [Sourcebot](https://github.com/sourcebot-dev/sourcebot) is a platform that helps humans and agents understand your codebase: * [Code search](https://docs.sourcebot.dev/docs/features/search/overview) : Search and navigate across all your repos and branches, no matter where they’re hosted * [Ask Sourcebot](https://docs.sourcebot.dev/docs/features/ask) : Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations * [MCP](https://docs.sourcebot.dev/docs/features/mcp-server) : Enrich agent context windows with code across your organization Deployment guides ----------------- Learn how to self-host Sourcebot in a few simple steps. Why Sourcebot? * **Full-featured search:** Fast indexed-based search with regex support, filters, branch search, boolean logic, and more. * **Self-hosted:** Deploy it in minutes using our official [docker container](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot) . All of your data stays on your machine. * **Modern design:** Light/Dark mode, vim keybindings, keyboard shortcuts, syntax highlighting, etc. * **Scalable:** Scales to millions of lines of code. * **Fair-source:** Core features are [FSL licensed](https://github.com/sourcebot-dev/sourcebot/blob/main/LICENSE.md#functional-source-license-version-11-alv2-future-license) . [​](https://docs.sourcebot.dev/docs/overview#features) Features ------------------------------------------------------------------ * * * Find an overview of all Sourcebot features below. For details, see the individual documentation pages. ### [​](https://docs.sourcebot.dev/docs/overview#ask-sourcebot) Ask Sourcebot [Ask Sourcebot](https://docs.sourcebot.dev/docs/features/ask) gives you the ability to ask complex questions about your codebase, and have Sourcebot provide detailed answers with inline citations. Key benefits * **Bring your own model:** [Configure](https://docs.sourcebot.dev/docs/configuration/language-model-providers) to any language model you’d like * **Inline citations:** Every answer Sourcebot provides is grounded with inline citations directly into your codebase * **Multi-repo:** Ask questions about any repository you have indexed on Sourcebot ### [​](https://docs.sourcebot.dev/docs/overview#code-search) Code Search Search across all your repos/branches across any code host platform. Blazingly fast, and supports regular expressions, repo/language search filters, boolean logic, and more. Key benefits * **Regex support:** Use regular expressions to find code with precision. * **Query language:** Scope searches to specific files, repos, languages, symbol definitions and more using a rich [query language](https://docs.sourcebot.dev/docs/features/search/syntax-reference) . * **Branch search:** Specify a list of branches to search across ([docs](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) ). * **Fast & scalable:** Sourcebot uses [trigram indexing](https://en.wikipedia.org/wiki/Trigram_search) , allowing it to scale to massive codebases. * **Syntax highlighting:** Syntax highlighting support for over [100+ languages](https://github.com/sourcebot-dev/sourcebot/blob/57724689303f351c279d37f45b6406f1d5d5d5ab/packages/web/src/lib/codemirrorLanguage.ts#L125) . * **Multi-repository:** Search across all of your repositories in a single search. * **Search suggestions:** Get search suggestions as you craft your query. * **Filter panel:** Filter results by repository or by language. ### [​](https://docs.sourcebot.dev/docs/overview#code-navigation) Code Navigation [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) helps you jump between symbol definitions and references quickly when browsing source code in Sourcebot. Key benefits * **Hover popover:** Hovering over a symbol reveals the symbol’s definition signature in a inline preview. * **Go to definition:** Navigate to a symbol’s definition(s). * **Find references:** Get all references to a symbol. * **Cross-repository:** Sourcebot can resolve references and definitions across repositories. ### [​](https://docs.sourcebot.dev/docs/overview#cross-code-host-support) Cross code-host support Connect your code from multiple code-host platforms and search across all of them from a single interface. Key benefits * **Auto re-syncing:** Sourcebot will periodically sync with code hosts to pull the latest changes. * **Flexible configuration:** Sourcebot uses an expressive [JSON schema](https://docs.sourcebot.dev/docs/connections/overview) config format to specify exactly what repositories to index (and what not to index). * **Parallel indexing:** Repositories are indexed in parallel. ![github](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/github.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=69c26e315a03ec8f3fe6d00f45a76092) GitHub ------ ![gitlab](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/gitlab.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=8ec8c7bfed756710d7aaf8bf970c4c67) GitLab ------ ![bitbucket](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/bitbucket.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=b1c5b6b27e70a9119f3a24b870ba1511) BitBucket --------- ![gitea](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/gitea.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=3aadb740a6a899c780470fe63b9c2961) Gitea ----- ![gerrit](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/gerrit.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=47dd59b303ec918551a5631ce26236eb) Gerrit ------ ![git](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/git.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=9511f4bca0024cee45266580f0273775) Other Git Hosts --------------- ![local](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/local.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=0875a82134b0b93f45861b996177ccc2) Local Git Repos --------------- ### [​](https://docs.sourcebot.dev/docs/overview#authentication) Authentication Sourcebot comes with built-in support for authentication via [email/password](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-%2F-password) , [email codes](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-codes) , and various [SSO providers](https://docs.sourcebot.dev/docs/configuration/auth/providers#enterprise-authentication-providers) . Key benefits * **Configurable auth providers:** Configure the auth providers that are available to your team. * **SSO:** Support for various SSO providers. * **_(coming soon)_ RBAC:** Role-based access control for managing user permissions. * **_(coming soon)_ Code host permission syncing:** Sync permissions from GitHub, Gitlab, etc. to Sourcebot. * **_(coming soon)_ Audit logs:** Audit logs for all actions performed on Sourcebot, such as user login, search, etc. ### [​](https://docs.sourcebot.dev/docs/overview#self-hosted) Self-hosted Sourcebot is designed to be easily self-hosted, allowing you to deploy it onto your own infrastructure, keeping your code private and secure. Key benefits * **Easy deployment:** Sourcebot is shipped as a [single docker container](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot) that can be deployed to a k8s cluster, a VM, or any other platform that supports docker. * **Secure:** Your code **never** leaves your infrastructure. * **No-vendor lock-in:** Avoid dependency on a third-party SaaS provider; you can modify, extend, or migrate your deployment as needed. [​](https://docs.sourcebot.dev/docs/overview#get-started) Get started ------------------------------------------------------------------------ * * * Deployment guides -> -------------------- Connecting your code -> ----------------------- Search syntax reference -> -------------------------- Code navigation overview -> --------------------------- [​](https://docs.sourcebot.dev/docs/overview#architecture) Architecture -------------------------------------------------------------------------- * * * Sourcebot is shipped as a single docker container that runs a collection of services using [supervisord](https://supervisord.org/) : ![architecture diagram](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/architecture_diagram.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=b0d7fa506cd45abf5eb68c83218d6506) Sourcebot consists of the following components: * **Web Server** : main Next.js web application serving the Sourcebot UI. * **Backend Worker** : Node.js process that incrementally syncs with code hosts (e.g., GitHub, GitLab etc.) and asynchronously indexes configured repositories. * **Zoekt** : the [open-source](https://github.com/sourcegraph/zoekt) , trigram indexing code search engine that powers Sourcebot under the hood. * **Postgres** : transactional database for storing business-logic data. * **Redis Job Queue** : fast in-memory store. Used with [BullMQ](https://docs.bullmq.io/) for queuing asynchronous work. * **`.sourcebot/` cache** : file-system cache where persistent data is written. You can use managed Redis / Postgres services that run outside of the Sourcebot container by providing the `REDIS_URL` and `DATABASE_URL` environment variables, respectively. See the [environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) doc for more configuration options. [​](https://docs.sourcebot.dev/docs/overview#scalability) Scalability ------------------------------------------------------------------------ * * * One of our design philosophies for Sourcebot is to keep our infrastructure [radically simple](https://www.radicalsimpli.city/) while balancing scalability concerns. Depending on the number of repositories you have indexed and the instance you are running Sourcebot on, you may experience slow search times or other performance degradations. Our recommendation is to vertically scale your instance by increasing the number of CPU cores and memory. See the [sizing guide](https://docs.sourcebot.dev/docs/deployment/sizing-guide) for detailed recommendations. Sourcebot does not support horizontal scaling at this time, but it is on our roadmap. If this is something your team would be interested in, please contact us at [team@sourcebot.dev](mailto:team@sourcebot.dev) . [​](https://docs.sourcebot.dev/docs/overview#license-key) License key ------------------------------------------------------------------------ * * * Sourcebot’s core features are available under an [FSL licensed](https://github.com/sourcebot-dev/sourcebot/blob/main/LICENSE.md#functional-source-license-version-11-alv2-future-license) without any limits. Some [additional features](https://docs.sourcebot.dev/docs/license-key#feature-availability) such as SSO and code navigation require a [license key](https://docs.sourcebot.dev/docs/license-key) . Pricing page ------------ Request trial key ----------------- [​](https://docs.sourcebot.dev/docs/overview#telemetry) Telemetry -------------------------------------------------------------------- * * * By default, Sourcebot collects anonymized usage data through [PostHog](https://posthog.com/) to help us improve the performance and reliability of our tool. We don’t collect or transmit any information related to your codebase. In addition, all events are [sanitized](https://github.com/sourcebot-dev/sourcebot/blob/HEAD/packages/web/src/app/posthogProvider.tsx) to ensure that no sensitive details (ex. ip address, query info) leave your machine. The data we collect includes general usage statistics and metadata such as query performance (e.g., search duration, error rates) to monitor the application’s health and functionality. This information helps us better understand how Sourcebot is used and where improvements can be made. If you’d like to disable all telemetry, you can do so by setting the environment variable `SOURCEBOT_TELEMETRY_DISABLED` to `true`: docker run \ -e SOURCEBOT_TELEMETRY_DISABLED=true \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest If you disabled telemetry correctly, you’ll see the following log when starting Sourcebot: Disabling telemetry since SOURCEBOT_TELEMETRY_DISABLED was set. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/overview) [Docker Compose\ \ Next](https://docs.sourcebot.dev/docs/deployment/docker-compose) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Azure Devops Cloud - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/ado-cloud#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Azure Devops Cloud [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/ado-cloud#examples) * [Authenticating with Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud#authenticating-with-azure-devops-cloud) * [Schema reference](https://docs.sourcebot.dev/docs/connections/ado-cloud#schema-reference) If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/ado-cloud#examples) Examples ------------------------------------------------------------------------------- Sync individual repos { "type": "azuredevops", "deploymentType": "cloud", "repos": [\ "organizationName/projectName/repoName",\ "organizationName/projectName/repoName2\ ] } Sync all repos in a organization { "type": "azuredevops", "deploymentType": "cloud", "orgs": [\ "organizationName",\ "organizationName2\ ] } Sync all repos in a project { "type": "azuredevops", "deploymentType": "cloud", "projects": [\ "organizationName/projectName",\ "organizationName/projectName2"\ ] } Exclude repos from syncing { "type": "azuredevops", "deploymentType": "cloud", // Include all repos in my-org... "orgs": [\ "my-org"\ ], // ...except: "exclude": { // repos that are disabled "disabled": true, // repos that match these glob patterns "repos": [\ "reposToExclude*"\ ], // projects that match these glob patterns "projects": [\ "projectstoExclude*"\ ] // repos less than the defined min OR larger than the defined max "size": { // repos that are less than 1MB (in bytes)... "min": 1048576, // or repos greater than 100MB (in bytes) "max": 104857600 } } } [​](https://docs.sourcebot.dev/docs/connections/ado-cloud#authenticating-with-azure-devops-cloud) Authenticating with Azure Devops Cloud ------------------------------------------------------------------------------------------------------------------------------------------- Azure Devops Cloud requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) . Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos. Next, provide the access [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) via an environment variable which is referenced in the `token` property: * Environment Variable 1. Add the `token` property to your connection config: { "type": "azuredevops", "deploymentType": "cloud", "token": { // note: this env var can be named anything. It // doesn't need to be `ADO_TOKEN`. "env": "ADO_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["organizationName/projectName/repoName"], // "orgs": ["organizationName"], // "projects": ["organizationName/projectName"] } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e ADO_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/ado-cloud#schema-reference) Schema reference ----------------------------------------------------------------------------------------------- Reference [schemas/v3/azuredevops.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/azuredevops.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "AzureDevOpsConnectionConfig", "properties": { "type": { "const": "azuredevops", "description": "Azure DevOps Configuration" }, "token": { "description": "A Personal Access Token (PAT).", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://dev.azure.com", "description": "The URL of the Azure DevOps host. For Azure DevOps Cloud, use https://dev.azure.com. For Azure DevOps Server, use your server URL.", "examples": [\ "https://dev.azure.com",\ "https://azuredevops.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "deploymentType": { "type": "string", "enum": [\ "cloud",\ "server"\ ], "description": "The type of Azure DevOps deployment" }, "useTfsPath": { "type": "boolean", "default": false, "description": "Use legacy TFS path format (/tfs) in API URLs. Required for older TFS installations (TFS 2018 and earlier). When true, API URLs will include /tfs in the path (e.g., https://server/tfs/collection/_apis/...)." }, "orgs": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org"\ ]\ ], "description": "List of organizations to sync with. For Cloud, this is the organization name. For Server, this is the collection name. All projects and repositories visible to the provided `token` will be synced, unless explicitly defined in the `exclude` property." }, "projects": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org/my-project",\ "my-collection/my-project"\ ]\ ], "description": "List of specific projects to sync with. Expected to be formatted as '{orgName}/{projectName}' for Cloud or '{collectionName}/{projectName}' for Server." }, "repos": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org/my-project/my-repo"\ ]\ ], "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{projectName}/{repoName}'." }, "exclude": { "type": "object", "properties": { "disabled": { "type": "boolean", "default": false, "description": "Exclude disabled repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of repositories to exclude from syncing. Glob patterns are supported." }, "projects": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of projects to exclude from syncing. Glob patterns are supported." }, "size": { "type": "object", "description": "Exclude repositories based on their size.", "properties": { "min": { "type": "integer", "description": "Minimum repository size (in bytes) to sync (inclusive). Repositories less than this size will be excluded from syncing." }, "max": { "type": "integer", "description": "Maximum repository size (in bytes) to sync (inclusive). Repositories greater than this size will be excluded from syncing." } }, "additionalProperties": false } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type",\ "token",\ "deploymentType"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/ado-cloud.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/ado-cloud) [Linking code from Bitbucket Data Center\ \ Previous](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) [Linking code from Azure Devops Server\ \ Next](https://docs.sourcebot.dev/docs/connections/ado-server) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Azure Devops Server - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/ado-server#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Azure Devops Server [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/ado-server#examples) * [Authenticating with Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server#authenticating-with-azure-devops-server) * [Schema reference](https://docs.sourcebot.dev/docs/connections/ado-server#schema-reference) If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/ado-server#examples) Examples -------------------------------------------------------------------------------- Enable TFS path support This is required if you’re using an older version of ADO Server which has `/tfs` in the repo paths. { "type": "azuredevops", "deploymentType": "server", "useTfsPath": true, "repos": [\ "organizationName/projectName/repoName",\ "organizationName/projectName/repoName2\ ] } Sync individual repos { "type": "azuredevops", "deploymentType": "server", "repos": [\ "organizationName/projectName/repoName",\ "organizationName/projectName/repoName2\ ] } Sync all repos in a collection { "type": "azuredevops", "deploymentType": "server", "orgs": [\ "collectionName",\ "collectionName2"\ ] } Sync all repos in a project { "type": "azuredevops", "deploymentType": "server", "projects": [\ "collectionName/projectName",\ "collectionName/projectName2"\ ] } Exclude repos from syncing { "type": "azuredevops", "deploymentType": "server", // Include all repos in my-org... "orgs": [\ "my-org"\ ], // ...except: "exclude": { // repos that are disabled "disabled": true, // repos that match these glob patterns "repos": [\ "reposToExclude*"\ ], // projects that match these glob patterns "projects": [\ "projectstoExclude*"\ ] // repos less than the defined min OR larger than the defined max "size": { // repos that are less than 1MB (in bytes)... "min": 1048576, // or repos greater than 100MB (in bytes) "max": 104857600 } } } [​](https://docs.sourcebot.dev/docs/connections/ado-server#authenticating-with-azure-devops-server) Authenticating with Azure Devops Server ---------------------------------------------------------------------------------------------------------------------------------------------- Azure Devops Server requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) . Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos. Next, provide the access [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) via an environment variable which is referenced in the `token` property: * Environment Variable 1. Add the `token` property to your connection config: { "type": "azuredevops", "deploymentType": "server", "token": { // note: this env var can be named anything. It // doesn't need to be `ADO_TOKEN`. "env": "ADO_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["collectionName/projectName/repoName"], // "orgs": ["collectionName"], // "projects": ["collectionName/projectName"] } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e ADO_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/ado-server#schema-reference) Schema reference ------------------------------------------------------------------------------------------------ Reference [schemas/v3/azuredevops.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/azuredevops.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "AzureDevOpsConnectionConfig", "properties": { "type": { "const": "azuredevops", "description": "Azure DevOps Configuration" }, "token": { "description": "A Personal Access Token (PAT).", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://dev.azure.com", "description": "The URL of the Azure DevOps host. For Azure DevOps Cloud, use https://dev.azure.com. For Azure DevOps Server, use your server URL.", "examples": [\ "https://dev.azure.com",\ "https://azuredevops.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "deploymentType": { "type": "string", "enum": [\ "cloud",\ "server"\ ], "description": "The type of Azure DevOps deployment" }, "useTfsPath": { "type": "boolean", "default": false, "description": "Use legacy TFS path format (/tfs) in API URLs. Required for older TFS installations (TFS 2018 and earlier). When true, API URLs will include /tfs in the path (e.g., https://server/tfs/collection/_apis/...)." }, "orgs": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org"\ ]\ ], "description": "List of organizations to sync with. For Cloud, this is the organization name. For Server, this is the collection name. All projects and repositories visible to the provided `token` will be synced, unless explicitly defined in the `exclude` property." }, "projects": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org/my-project",\ "my-collection/my-project"\ ]\ ], "description": "List of specific projects to sync with. Expected to be formatted as '{orgName}/{projectName}' for Cloud or '{collectionName}/{projectName}' for Server." }, "repos": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org/my-project/my-repo"\ ]\ ], "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{projectName}/{repoName}'." }, "exclude": { "type": "object", "properties": { "disabled": { "type": "boolean", "default": false, "description": "Exclude disabled repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of repositories to exclude from syncing. Glob patterns are supported." }, "projects": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of projects to exclude from syncing. Glob patterns are supported." }, "size": { "type": "object", "description": "Exclude repositories based on their size.", "properties": { "min": { "type": "integer", "description": "Minimum repository size (in bytes) to sync (inclusive). Repositories less than this size will be excluded from syncing." }, "max": { "type": "integer", "description": "Maximum repository size (in bytes) to sync (inclusive). Repositories greater than this size will be excluded from syncing." } }, "additionalProperties": false } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type",\ "token",\ "deploymentType"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/ado-server.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/ado-server) [Linking code from Azure Devops Cloud\ \ Previous](https://docs.sourcebot.dev/docs/connections/ado-cloud) [Linking code from Gitea\ \ Next](https://docs.sourcebot.dev/docs/connections/gitea) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Bitbucket Cloud - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Bitbucket Cloud [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#examples) * [Authenticating with Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#authenticating-with-bitbucket-cloud) * [Schema reference](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#schema-reference) Looking for docs on Bitbucket Data Center? See [this doc](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) . If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#examples) Examples ------------------------------------------------------------------------------------- Sync individual repos { "type": "bitbucket", "deploymentType": "cloud", "repos": [\ "myWorkspace/myRepo"\ ] } Sync all repos in a workspace { "type": "bitbucket", "deploymentType": "cloud", "workspaces": [\ "myWorkspace"\ ] } Sync all repos in a project { "type": "bitbucket", "deploymentType": "cloud", "projects": [\ "myProject"\ ] } Exclude repos from syncing { "type": "bitbucket", "deploymentType": "cloud", // Include all repos in my-workspace... "workspaces": [\ "myWorkspace"\ ], // ...except: "exclude": { // repos that are archived "archived": true, // repos that are forks "forks": true, // repos that match these glob patterns "repos": [\ "myWorkspace/repo1",\ "myWorkspace2/*"\ ] } } [​](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#authenticating-with-bitbucket-cloud) Authenticating with Bitbucket Cloud ------------------------------------------------------------------------------------------------------------------------------------------- In order to index private repositories, you’ll need to provide authentication credentials via a [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) . You can do this using an `API Token`, `Access Token`, or `App Password`. * API Token * Access Token * App Password 1. Navigate to [Personal Settings → API tokens](https://id.atlassian.com/manage-profile/security/api-tokens) and click **Create API token with scopes**. Give the token a name and set an expiry date. 2. Select **Bitbucket** as the app. 3. Select the following scopes: * `read:repository:bitbucket` — View your repositories * `read:workspace:bitbucket` — View your workspaces 4. Click **Create token** and copy the token value. 5. Add the `user` (your account email), `gitUser` (your Bitbucket username), and `token` to your connection config. [Learn why both are needed](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/) { "type": "bitbucket", "deploymentType": "cloud", "user": "you@example.com", "gitUser": "myusername", "token": { // note: this env var can be named anything. It // doesn't need to be `BITBUCKET_TOKEN`. "env": "BITBUCKET_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["myWorkspace/myRepo"], // "workspaces": ["myWorkspace"], // "projects": ["myProject"] } 6. Pass this environment variable each time you run Sourcebot: docker run \ -e BITBUCKET_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest Create an access token for the desired scope (repo, project, or workspace). Visit the official [Bitbucket Cloud docs](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/) for more info. 1. Add the `token` property to your connection config: { "type": "bitbucket", "deploymentType": "cloud", "token": { // note: this env var can be named anything. It // doesn't need to be `BITBUCKET_TOKEN`. "env": "BITBUCKET_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["myWorkspace/myRepo"], // "workspaces": ["myWorkspace"], // "projects": ["myProject"] } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e BITBUCKET_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest App Passwords are deprecated. Atlassian recommends migrating to API tokens. [Learn more](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens-enhancing-security-with-app-password-deprecation) Navigate to the [app password creation page](https://bitbucket.org/account/settings/app-passwords/) and create an app password. Ensure that it has the proper permissions for the scope of info you want to fetch (i.e. workspace, project, and/or repo level)![Bitbucket App Password Permissions](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/bitbucket_app_password_perms.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=c160a83510c5d77c9118755ca8f59cfa) 1. Add the `user` (your Bitbucket username) and `token` properties to your connection config: { "type": "bitbucket", "deploymentType": "cloud", "user": "myusername", "token": { // note: this env var can be named anything. It // doesn't need to be `BITBUCKET_TOKEN`. "env": "BITBUCKET_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["myWorkspace/myRepo"], // "workspaces": ["myWorkspace"], // "projects": ["myProject"] } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e BITBUCKET_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud#schema-reference) Schema reference ----------------------------------------------------------------------------------------------------- Reference [schemas/v3/bitbucket.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/bitbucket.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "BitbucketConnectionConfig", "properties": { "type": { "const": "bitbucket", "description": "Bitbucket configuration" }, "user": { "type": "string", "description": "The username to use for API authentication. For app passwords, this is your Bitbucket username. For API tokens, this is your Bitbucket account email address." }, "gitUser": { "type": "string", "description": "The username to use for git clone authentication over HTTPS. If not set, falls back to 'user'. For API tokens, this is your Bitbucket username" }, "token": { "description": "An authentication token.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://api.bitbucket.org/2.0", "description": "Bitbucket URL", "examples": [\ "https://bitbucket.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "deploymentType": { "type": "string", "enum": [\ "cloud",\ "server"\ ], "default": "cloud", "description": "The type of Bitbucket deployment" }, "all": { "type": "boolean", "default": false, "description": "Sync all repositories visible to the provided `token` (if any) in the Bitbucket Server instance. This option is ignored if `deploymentType` is `cloud`." }, "workspaces": { "type": "array", "items": { "type": "string" }, "description": "List of workspaces to sync. Ignored if deploymentType is server." }, "projects": { "type": "array", "items": { "type": "string" }, "description": "List of projects to sync" }, "repos": { "type": "array", "items": { "type": "string" }, "description": "List of repos to sync" }, "exclude": { "type": "object", "properties": { "archived": { "type": "boolean", "default": false, "description": "Exclude archived repositories from syncing." }, "forks": { "type": "boolean", "default": false, "description": "Exclude forked repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "cloud_workspace/PROJECT_KEY/repo1",\ "SERVER_PROJECT_KEY/repo2"\ ]\ ], "description": "List of specific repos to exclude from syncing." } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type"\ ], "if": { "properties": { "deploymentType": { "const": "server" } } }, "then": { "required": [\ "url"\ ] }, "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/bitbucket-cloud.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/bitbucket-cloud) [Linking code from GitLab\ \ Previous](https://docs.sourcebot.dev/docs/connections/gitlab) [Linking code from Bitbucket Data Center\ \ Next](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Authentication - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/api-reference/authentication#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Overview Authentication [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Overview * [Authentication](https://docs.sourcebot.dev/docs/api-reference/authentication) ##### Search & Navigation * [POST\ \ Search code](https://docs.sourcebot.dev/api-reference/search-&-navigation/search-code) * [POST\ \ Find symbol definitions](https://docs.sourcebot.dev/api-reference/search-&-navigation/find-symbol-definitions) * [POST\ \ Find symbol references](https://docs.sourcebot.dev/api-reference/search-&-navigation/find-symbol-references) ##### Repositories * [GET\ \ List repositories](https://docs.sourcebot.dev/api-reference/repositories/list-repositories) ##### Git * [GET\ \ Get commit details](https://docs.sourcebot.dev/api-reference/git/get-commit-details) * [GET\ \ Get diff between two commits](https://docs.sourcebot.dev/api-reference/git/get-diff-between-two-commits) * [GET\ \ List commits](https://docs.sourcebot.dev/api-reference/git/list-commits) * [GET\ \ Get file contents](https://docs.sourcebot.dev/api-reference/git/get-file-contents) * [POST\ \ Get a file tree](https://docs.sourcebot.dev/api-reference/git/get-a-file-tree) ##### Enterprise Management * [GET\ \ Get a user](https://docs.sourcebot.dev/api-reference/enterprise-ee/get-a-user) * [DEL\ \ Delete a user](https://docs.sourcebot.dev/api-reference/enterprise-ee/delete-a-user) * [GET\ \ List users](https://docs.sourcebot.dev/api-reference/enterprise-ee/list-users) * [GET\ \ List audit records](https://docs.sourcebot.dev/api-reference/enterprise-ee/list-audit-records) ##### System * [GET\ \ Get Sourcebot version](https://docs.sourcebot.dev/api-reference/system/get-sourcebot-version) * [GET\ \ Health check](https://docs.sourcebot.dev/api-reference/system/health-check) On this page * [Creating an API key](https://docs.sourcebot.dev/docs/api-reference/authentication#creating-an-api-key) * [Using an API key](https://docs.sourcebot.dev/docs/api-reference/authentication#using-an-api-key) To securely access and interact with Sourcebot’s API, authentication is required. Users must generate an API Key, which will be used to authenticate requests. If [anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access) is enabled, some endpoints will be accessible without a API key. [​](https://docs.sourcebot.dev/docs/api-reference/authentication#creating-an-api-key) Creating an API key ------------------------------------------------------------------------------------------------------------ Navigate to **Settings → API Keys** and click **Create API Key**. Copy the value - it is only shown once. ![API Keys page in Sourcebot Settings](https://mintcdn.com/sourcebot/ex_m8h1jdSrDJGnh/images/mcp_api_key_settings.png?w=2500&fit=max&auto=format&n=ex_m8h1jdSrDJGnh&q=85&s=8d6c5d1e82457e48e907842469984e44) [​](https://docs.sourcebot.dev/docs/api-reference/authentication#using-an-api-key) Using an API key ------------------------------------------------------------------------------------------------------ Pass your API key as a Bearer token in the `Authorization` header on every request. Authorization: Bearer For example, to call the `/api/search` endpoint: curl -X POST https://your-sourcebot-instance.com/api/search \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "hello world", "matches": 10}' Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/api-reference/authentication.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/api-reference/authentication) [Search code\ \ Next](https://docs.sourcebot.dev/api-reference/search-&-navigation/search-code) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Agents Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/agents/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Agents Agents Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental * [Overview](https://docs.sourcebot.dev/docs/features/agents/overview) * [AI code review agent](https://docs.sourcebot.dev/docs/features/agents/review-agent) ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) This is an experimental feature. Certain functionality may be incomplete and breaking changes may ship in non-major releases. Have feedback? Submit a [issue](https://github.com/sourcebot-dev/sourcebot/issues) on GitHub. Agents are automations that leverage the code indexed on Sourcebot to perform a specific task. Once you’ve setup Sourcebot, check out the guides below to configure additional agents. Review Agent ------------ An AI agent that reviews your PRs to identify issues Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/agents/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/agents/overview) [Permission syncing\ \ Previous](https://docs.sourcebot.dev/docs/features/permission-syncing) [AI Code Review Agent\ \ Next](https://docs.sourcebot.dev/docs/features/agents/review-agent) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Docker Compose - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/deployment/docker-compose#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Deployment Docker Compose [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment * [Docker Compose](https://docs.sourcebot.dev/docs/deployment/docker-compose) * [Kubernetes (Helm)](https://github.com/sourcebot-dev/sourcebot-helm-chart) * [Sizing Guide](https://docs.sourcebot.dev/docs/deployment/sizing-guide) * Infrastructure ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Get started](https://docs.sourcebot.dev/docs/deployment/docker-compose#get-started) * [Next steps](https://docs.sourcebot.dev/docs/deployment/docker-compose#next-steps) This guide will walk you through deploying Sourcebot locally or on a VM using Docker Compose. We will use the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the [Sourcebot repository](https://github.com/sourcebot-dev/sourcebot) . This is the simplest way to get started with Sourcebot. If you are looking to deploy onto Kubernetes, see the [Kubernetes (Helm)](https://docs.sourcebot.dev/docs/deployment/k8s) guide. [​](https://docs.sourcebot.dev/docs/deployment/docker-compose#get-started) Get started ----------------------------------------------------------------------------------------- 1 [](https://docs.sourcebot.dev/docs/deployment/docker-compose#) Requirements * docker & docker compose. Use [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Mac or Windows. 2 [](https://docs.sourcebot.dev/docs/deployment/docker-compose#) Obtain the Docker Compose file Download the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the Sourcebot repository. curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml 3 [](https://docs.sourcebot.dev/docs/deployment/docker-compose#) Create a config.json In the same directory as the `docker-compose.yml` file, create a [configuration file](https://docs.sourcebot.dev/docs/configuration/config-file) . The configuration file is a JSON file that configures Sourcebot’s behaviour, including what repositories to index, language model providers, auth providers, and more. Create example config touch config.json echo '{ "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", // Comments are supported. // This config creates a single connection to GitHub.com that // indexes the Sourcebot repository "connections": { "starter-connection": { "type": "github", "repos": [\ "sourcebot-dev/sourcebot"\ ] } } }' > config.json 4 [](https://docs.sourcebot.dev/docs/deployment/docker-compose#) Launch your instance Update the secrets in the `docker-compose.yml` and then run Sourcebot using: docker compose up 5 [](https://docs.sourcebot.dev/docs/deployment/docker-compose#) Done You’re all set! Navigate to [http://localhost:3000](http://localhost:3000/) to access your Sourcebot instance. [​](https://docs.sourcebot.dev/docs/deployment/docker-compose#next-steps) Next steps --------------------------------------------------------------------------------------- Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/deployment/docker-compose.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/deployment/docker-compose) [Overview\ \ Previous](https://docs.sourcebot.dev/docs/overview) [Kubernetes (Helm)\ \ Next](https://docs.sourcebot.dev/docs/deployment/k8s) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Chat Sharing - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Ask Sourcebot Chat Sharing [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Overview](https://docs.sourcebot.dev/docs/features/ask/overview) * [Chat Sharing](https://docs.sourcebot.dev/docs/features/ask/chat-sharing) * [Configure language models](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Visibility Options](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#visibility-options) * [Private (Default)](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#private-default) * [Public](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#public) * [Sharing with Specific Users](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#sharing-with-specific-users) * [Removing Access](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#removing-access) Chat sharing allows you to share Ask Sourcebot conversations with others. Whether you want to share insights with your team or make a conversation publicly accessible, Sourcebot provides flexible sharing options. ![Chat sharing dialog](https://mintcdn.com/sourcebot/VbmeqPrYKdpoVyMb/images/chat-sharing-dialog.png?w=2500&fit=max&auto=format&n=VbmeqPrYKdpoVyMb&q=85&s=94075fe954092eea08889ec1be978c92) [​](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#visibility-options) Visibility Options ------------------------------------------------------------------------------------------------------- Every chat has a visibility setting that controls who can access it: ![Chat visibility dropdown](https://mintcdn.com/sourcebot/VbmeqPrYKdpoVyMb/images/chat-visibility-dropdown.png?w=2500&fit=max&auto=format&n=VbmeqPrYKdpoVyMb&q=85&s=f8fd4f0f569354b16645fbf51072d777) ### [​](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#private-default) Private (Default) * Only the chat owner can view the conversation * Other users cannot access the chat, even with the link * You can explicitly invite specific org members to view the chat (requires [Enterprise license](https://docs.sourcebot.dev/docs/license-key) ) ### [​](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#public) Public * Anyone with the link can view the conversation * If [anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) is enabled, no authentication is required to view * Useful for sharing insights with your team or creating reference documentation * Public chats can be duplicated by others [​](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#sharing-with-specific-users) Sharing with Specific Users ------------------------------------------------------------------------------------------------------------------------- Sharing with specific users requires an [Enterprise license](https://docs.sourcebot.dev/docs/license-key) . ![Invite users dialog](https://mintcdn.com/sourcebot/VbmeqPrYKdpoVyMb/images/chat-invite-users.png?w=2500&fit=max&auto=format&n=VbmeqPrYKdpoVyMb&q=85&s=1e552920e9e724e859d544505e852bc1) Chat owners can invite specific organization members to view their private chats: 1. Open the chat you want to share 2. Click the **Share** button in the top-right corner 3. Search for users by name or email 4. Select the users you want to invite 5. Click **Invite** to grant them access Invited users will be able to: * View the full conversation * See all messages and code citations * Navigate through referenced code snippets Invited users **cannot**: * Edit or delete the chat * Send new messages * Invite other users ### [​](https://docs.sourcebot.dev/docs/features/ask/chat-sharing#removing-access) Removing Access ![Remove user from chat](https://mintcdn.com/sourcebot/VbmeqPrYKdpoVyMb/images/chat-remove-user.png?w=2500&fit=max&auto=format&n=VbmeqPrYKdpoVyMb&q=85&s=4da234a0e7f40fc926174de648a4207a) To remove a user’s access to your chat: 1. Open the Share dialog 2. Find the user in the “People with access” list 3. Click the **X** button next to their name Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/ask/chat-sharing.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/ask/chat-sharing) [Overview\ \ Previous](https://docs.sourcebot.dev/docs/features/ask/overview) [Configure Language Models\ \ Next](https://docs.sourcebot.dev/docs/features/ask/add-model-providers) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Other Git hosts - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/generic-git-host#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Other Git hosts [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Getting Started](https://docs.sourcebot.dev/docs/connections/generic-git-host#getting-started) * [Schema reference](https://docs.sourcebot.dev/docs/connections/generic-git-host#schema-reference) Sourcebot can sync code from any Git host (by clone url). This is helpful when you want to search code that not in a [supported code host](https://docs.sourcebot.dev/docs/connections/overview#platform-connection-guides) . If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/generic-git-host#getting-started) Getting Started ---------------------------------------------------------------------------------------------------- To connect to a Git host, create a new [connection](https://docs.sourcebot.dev/docs/connections/overview) with type `git` and specify the clone url in the `url` property. For example: { "type": "git", "url": "https://github.com/sourcebot-dev/sourcebot" } Note that only `http` & `https` URLs are supported at this time. [​](https://docs.sourcebot.dev/docs/connections/generic-git-host#schema-reference) Schema reference ------------------------------------------------------------------------------------------------------ Reference [schemas/v3/genericGitHost.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/genericGitHost.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GenericGitHostConnectionConfig", "properties": { "type": { "const": "git", "description": "Generic Git host configuration" }, "url": { "type": "string", "format": "url", "description": "The URL to the git repository. This can either be a remote URL (prefixed with `http://` or `https://`) or a absolute path to a directory on the local machine (prefixed with `file://`). If a local directory is specified, it must point to the root of a git repository. Local directories are treated as read-only modified. Local directories support glob patterns.", "pattern": "^(https?:\\/\\/[^\\s/$.?#].[^\\s]*|file:\\/\\/\\/[^\\s]+)$", "examples": [\ "https://github.com/sourcebot-dev/sourcebot",\ "file:///path/to/repo",\ "file:///repos/*"\ ] }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type",\ "url"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/generic-git-host.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/generic-git-host) [Linking code from Gerrit\ \ Previous](https://docs.sourcebot.dev/docs/connections/gerrit) [Local Git repositories\ \ Next](https://docs.sourcebot.dev/docs/connections/local-repos) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Bitbucket Data Center - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Bitbucket Data Center [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#examples) * [Authenticating with Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#authenticating-with-bitbucket-data-center) * [Rate limiting](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#rate-limiting) * [Troubleshooting](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#troubleshooting) * [Schema reference](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#schema-reference) Looking for docs on Bitbucket Cloud? See [this doc](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) . If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#examples) Examples ------------------------------------------------------------------------------------------- Sync individual repos { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", "repos": [\ "myProject/myRepo"\ ] } Sync all repos in a project { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", "projects": [\ "myProject"\ ] } Sync all repos Requires a `token` to be set in order to access private repositories. { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", // Index all repos visible to the provided token "all": true } Exclude repos from syncing { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", // Include all repos in myProject... "projects": [\ "myProject"\ ], // ...except: "exclude": { // repos that are archived "archived": true, // repos that are forks "forks": true, // repos that match these glob patterns "repos": [\ "myProject/repo1",\ "myProject2/*"\ ] } } [​](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#authenticating-with-bitbucket-data-center) Authenticating with Bitbucket Data Center ------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to index private repositories, you’ll need to provide a [HTTP Access Token](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html) . Tokens can be scoped to a user account, a project, or an individual repository. Only repositories visible to the token will be able to be indexed by Sourcebot. If [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-data-center) is enabled, the token must have **Repository Admin** permissions so Sourcebot can read repository-level user permissions. * User account token * Project / repository token User account tokens grant access to all repositories the user can access. Because these are tied to a specific user account, you must also set the `user` field to that user’s username. 1. In Bitbucket Data Center, navigate to your profile → **Manage account** → **HTTP access tokens** and click **Create token**. Give it a name and grant it **Project read** and **Repository read** permissions. 2. Add the `user` (your Bitbucket username) and `token` properties to your connection config: { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", "user": "myusername", "token": { // note: this env var can be named anything. It // doesn't need to be `BITBUCKET_TOKEN`. "env": "BITBUCKET_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["myProject/myRepo"], // "projects": ["myProject"], // "all": true } 3. Pass this environment variable each time you run Sourcebot: docker run \ -e BITBUCKET_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest Project and repository tokens are scoped to a specific project or repository. 1. In Bitbucket Data Center, navigate to the project or repository → **Settings** → **HTTP access tokens** and click **Create token**. Give it a name and grant it **Repository read** and **Project read** permissions. 2. Add the `token` property to your connection config: { "type": "bitbucket", "deploymentType": "server", "url": "https://mybitbucketdeployment.com", "token": { // note: this env var can be named anything. It // doesn't need to be `BITBUCKET_TOKEN`. "env": "BITBUCKET_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["myProject/myRepo"], // "projects": ["myProject"], // "all": true } 3. Pass this environment variable each time you run Sourcebot: docker run \ -e BITBUCKET_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#rate-limiting) Rate limiting ----------------------------------------------------------------------------------------------------- Bitbucket Data Center supports [rate limiting](https://confluence.atlassian.com/bitbucketserver094/improving-instance-stability-with-rate-limiting-1489803023.html) to protect instance stability. Rate limiting applies to HTTP requests with basic or bearer authentication, which includes the REST API calls Sourcebot makes to sync repositories. If rate limiting is enabled on your instance, Sourcebot may receive `HTTP 429 (Too Many Requests)` errors during sync. To prevent this, add a rate limiting exemption for the user (service account) whose token is used in your connection config. To add an exemption: 1. In Bitbucket Data Center, go to **Administration** → **Rate limiting** → **Exemptions** tab. 2. Click **Add exemption** and find the service account user. 3. Select **Allow unlimited requests** (recommended) or set a custom token bucket size and refill rate appropriate for your sync volume. 4. Click **Save**. ![Bitbucket Data Center rate limiting exemptions tab showing a user with unlimited requests](https://mintcdn.com/sourcebot/HN3U1hNIDFKT4nmq/images/bitbucket_rate_limit.png?w=2500&fit=max&auto=format&n=HN3U1hNIDFKT4nmq&q=85&s=ed44103548b68170562b97d32fadf07c) [​](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#troubleshooting) Troubleshooting --------------------------------------------------------------------------------------------------------- If you’re seeing errors like `TypeError: fetch failed` when fetching repo info, it may be that Sourcebot is refusing to connect to your self-hosted Bitbucket instance due to unrecognized SSL certs. Try setting the `NODE_TLS_REJECT_UNAUTHORIZED=0` environment variable or providing Sourcebot your certs through the `NODE_EXTRA_CA_CERTS` environment variable. [​](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center#schema-reference) Schema reference ----------------------------------------------------------------------------------------------------------- Reference [schemas/v3/bitbucket.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/bitbucket.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "BitbucketConnectionConfig", "properties": { "type": { "const": "bitbucket", "description": "Bitbucket configuration" }, "user": { "type": "string", "description": "The username to use for API authentication. For app passwords, this is your Bitbucket username. For API tokens, this is your Bitbucket account email address." }, "gitUser": { "type": "string", "description": "The username to use for git clone authentication over HTTPS. If not set, falls back to 'user'. For API tokens, this is your Bitbucket username" }, "token": { "description": "An authentication token.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://api.bitbucket.org/2.0", "description": "Bitbucket URL", "examples": [\ "https://bitbucket.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "deploymentType": { "type": "string", "enum": [\ "cloud",\ "server"\ ], "default": "cloud", "description": "The type of Bitbucket deployment" }, "all": { "type": "boolean", "default": false, "description": "Sync all repositories visible to the provided `token` (if any) in the Bitbucket Server instance. This option is ignored if `deploymentType` is `cloud`." }, "workspaces": { "type": "array", "items": { "type": "string" }, "description": "List of workspaces to sync. Ignored if deploymentType is server." }, "projects": { "type": "array", "items": { "type": "string" }, "description": "List of projects to sync" }, "repos": { "type": "array", "items": { "type": "string" }, "description": "List of repos to sync" }, "exclude": { "type": "object", "properties": { "archived": { "type": "boolean", "default": false, "description": "Exclude archived repositories from syncing." }, "forks": { "type": "boolean", "default": false, "description": "Exclude forked repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "cloud_workspace/PROJECT_KEY/repo1",\ "SERVER_PROJECT_KEY/repo2"\ ]\ ], "description": "List of specific repos to exclude from syncing." } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type"\ ], "if": { "properties": { "deploymentType": { "const": "server" } } }, "then": { "required": [\ "url"\ ] }, "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/bitbucket-data-center.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/bitbucket-data-center) [Linking code from Bitbucket Cloud\ \ Previous](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) [Linking code from Azure Devops Cloud\ \ Next](https://docs.sourcebot.dev/docs/connections/ado-cloud) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from GitHub - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/github#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from GitHub [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/github#examples) * [Authenticating with GitHub](https://docs.sourcebot.dev/docs/connections/github#authenticating-with-github) * [Connecting to a custom GitHub host](https://docs.sourcebot.dev/docs/connections/github#connecting-to-a-custom-github-host) * [Schema reference](https://docs.sourcebot.dev/docs/connections/github#schema-reference) * [See also](https://docs.sourcebot.dev/docs/connections/github#see-also) Sourcebot can sync code from GitHub.com, GitHub Enterprise Server, and GitHub Enterprise Cloud. If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/github#examples) Examples ---------------------------------------------------------------------------- Sync individual repos { "type": "github", "repos": [\ "sourcebot-dev/sourcebot",\ "getsentry/sentry",\ "torvalds/linux"\ ] } Sync all repos in a organization { "type": "github", "orgs": [\ "sourcebot-dev",\ "getsentry",\ "vercel"\ ] } Sync all repos owned by a user { "type": "github", "users": [\ "torvalds",\ "ggerganov"\ ] } Filter repos by topic { "type": "github", // Sync all repos in `my-org` that have a topic that... "orgs": [\ "my-org"\ ], // ...match one of these glob patterns. "topics": [\ "test-*",\ "ci-*",\ "k8s"\ ] } Exclude repos from syncing { "type": "github", // Include all repos in my-org... "orgs": [\ "my-org"\ ], // ...except: "exclude": { // repos that are archived "archived": true, // repos that are forks "forks": true, // repos that match these glob patterns "repos": [\ "my-org/repo1",\ "my-org/repo2",\ "my-org/sub-org-1/**",\ "my-org/sub-org-*/**"\ ], "size": { // repos that are less than 1MB (in bytes)... "min": 1048576, // or repos greater than 100MB (in bytes) "max": 104857600 }, // repos with topics that match these glob patterns "topics": [\ "test-*",\ "ci"\ ] } } [​](https://docs.sourcebot.dev/docs/connections/github#authenticating-with-github) Authenticating with GitHub ---------------------------------------------------------------------------------------------------------------- In order to index private repositories, you’ll need to authenticate with GitHub. Sourcebot supports the following mechanisms of authenticating a GitHub connection: GitHub App is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. 1 [](https://docs.sourcebot.dev/docs/connections/github#) Register a new GitHub App Register a new [GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app#registering-a-github-app) and provide it with the following permissions: * “Contents” repository permissions (read) * “Metadata” repository permissions (read) * “Members” organization permissions (read) * “Email addresses” account permissions (read) This can be the same GitHub App you’ve registered and configured as an [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#github) 2 [](https://docs.sourcebot.dev/docs/connections/github#) Install the GitHub App Install the GitHub App into the GitHub orgs that you want Sourcebot to be aware of. **Sourcebot will only be able to index repos from orgs with the GitHub App installed.** 3 [](https://docs.sourcebot.dev/docs/connections/github#) Create a private key for the GitHub App Create a [private key](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps) for the GitHub App. 4 [](https://docs.sourcebot.dev/docs/connections/github#) Define the GitHub App config in Sourcebot Create a new `apps` object in the Sourcebot [config file](https://docs.sourcebot.dev/docs/configuration/config-file) . The private key you created in the previous step must be passed in as a [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) . "apps": [\ {\ "type": "github", // must be github\ "id": "1234567", // Your GitHub App ID\ "privateKey": {\ "env": "GITHUB_APP_PRIVATE_KEY" // Token which contains your Github App private key\ }\ }\ ] 5 [](https://docs.sourcebot.dev/docs/connections/github#) You're done! That’s it! Sourcebot will now use this GitHub App to authenticate when pulling repos for this connection. Fine-grained personal access tokens 1 [](https://docs.sourcebot.dev/docs/connections/github#) Create PAT Create a new fine-grained PAT [here](https://github.com/settings/personal-access-tokens/new) . Select the resource owner and the repositories that you want Sourcebot to have access to.Next, under “Repository permissions”, select permissions `Contents` and `Metadata` with access `Read-only`. The permissions should look like the following:![GitHub PAT Scope](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/github_pat_scopes_fine_grained.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=f0e782739d6840bc8bd6c71fd239cbfc)[GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens) 2 [](https://docs.sourcebot.dev/docs/connections/github#) Pass PAT into Sourcebot Next, provide the PAT via a [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) which is referenced in the `token` field in the [connection](https://docs.sourcebot.dev/docs/connections/overview) config object.The most common mechanism of doing this is defining an environment variable that holds the PAT: { "type": "github", "token": { // note: this env var can be named anything. It // doesn't need to be `GITHUB_TOKEN`. "env": "GITHUB_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["my-org/myRepo"], // "orgs": ["my-org"], // "users": ["my-user"] } 3 [](https://docs.sourcebot.dev/docs/connections/github#) You're done! That’s it! Sourcebot will now use this PAT to authenticate when pulling repos for this connection. Personal access tokens (classic) 1 [](https://docs.sourcebot.dev/docs/connections/github#) Create PAT Create a new PAT [here](https://github.com/settings/tokens/new) and make sure you select the `repo` scope:![GitHub PAT Scope](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/github_pat_scopes.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=81dc3680f5b6ea12a171a7587d9d94a5)[GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic) 2 [](https://docs.sourcebot.dev/docs/connections/github#) Pass PAT into Sourcebot Next, provide the PAT via a [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) which is referenced in the `token` field in the [connection](https://docs.sourcebot.dev/docs/connections/overview) config object.The most common mechanism of doing this is defining an environment variable that holds the PAT: { "type": "github", "token": { // note: this env var can be named anything. It // doesn't need to be `GITHUB_TOKEN`. "env": "GITHUB_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["my-org/myRepo"], // "orgs": ["my-org"], // "users": ["my-user"] } 3 [](https://docs.sourcebot.dev/docs/connections/github#) You're done! That’s it! Sourcebot will now use this PAT to authenticate when pulling repos for this connection. [​](https://docs.sourcebot.dev/docs/connections/github#connecting-to-a-custom-github-host) Connecting to a custom GitHub host -------------------------------------------------------------------------------------------------------------------------------- To connect to a GitHub host other than `github.com`, provide the `url` property to your config: { "type": "github", "url": "https://github.example.com", // At least one of the following is required to specify which repos to sync: "repos": ["my-org/myRepo"], // "orgs": ["my-org"], // "users": ["my-user"] } [​](https://docs.sourcebot.dev/docs/connections/github#schema-reference) Schema reference -------------------------------------------------------------------------------------------- Reference [schemas/v3/github.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/github.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GithubConnectionConfig", "properties": { "type": { "const": "github", "description": "GitHub Configuration" }, "token": { "description": "A Personal Access Token (PAT).", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://github.com", "description": "The URL of the GitHub host. Defaults to https://github.com", "examples": [\ "https://github.com",\ "https://github.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "users": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+$" }, "default": [], "examples": [\ [\ "torvalds",\ "DHH"\ ]\ ], "description": "List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property." }, "orgs": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+$" }, "default": [], "examples": [\ [\ "my-org-name"\ ],\ [\ "sourcebot-dev",\ "commaai"\ ]\ ], "description": "List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property." }, "repos": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "default": [], "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'." }, "topics": { "type": "array", "items": { "type": "string" }, "minItems": 1, "default": [], "description": "List of repository topics to include when syncing. Only repositories that match at least one of the provided `topics` will be synced. If not specified, all repositories will be synced, unless explicitly defined in the `exclude` property. Glob patterns are supported.", "examples": [\ [\ "docs",\ "core"\ ]\ ] }, "exclude": { "type": "object", "properties": { "forks": { "type": "boolean", "default": false, "description": "Exclude forked repositories from syncing." }, "archived": { "type": "boolean", "default": false, "description": "Exclude archived repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of individual repositories to exclude from syncing. Glob patterns are supported." }, "topics": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of repository topics to exclude when syncing. Repositories that match one of the provided `topics` will be excluded from syncing. Glob patterns are supported.", "examples": [\ [\ "tests",\ "ci"\ ]\ ] }, "size": { "type": "object", "description": "Exclude repositories based on their disk usage. Note: the disk usage is calculated by GitHub and may not reflect the actual disk usage when cloned.", "properties": { "min": { "type": "integer", "description": "Minimum repository size (in bytes) to sync (inclusive). Repositories less than this size will be excluded from syncing." }, "max": { "type": "integer", "description": "Maximum repository size (in bytes) to sync (inclusive). Repositories greater than this size will be excluded from syncing." } }, "additionalProperties": false } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type"\ ], "additionalProperties": false } [​](https://docs.sourcebot.dev/docs/connections/github#see-also) See also ---------------------------------------------------------------------------- * [Syncing GitHub Access permissions to Sourcebot](https://docs.sourcebot.dev/docs/features/permission-syncing#github) Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/github.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/github) [Overview\ \ Previous](https://docs.sourcebot.dev/docs/connections/overview) [Linking code from GitLab\ \ Next](https://docs.sourcebot.dev/docs/connections/gitlab) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Redis - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Infrastructure Redis [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment * [Docker Compose](https://docs.sourcebot.dev/docs/deployment/docker-compose) * [Kubernetes (Helm)](https://github.com/sourcebot-dev/sourcebot-helm-chart) * [Sizing Guide](https://docs.sourcebot.dev/docs/deployment/sizing-guide) * Infrastructure * [Architecture Overview](https://docs.sourcebot.dev/docs/overview#architecture) * [Redis](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis) ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [TLS](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis#tls) Sourcebot uses Redis as a job queue for background indexing work. [​](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis#tls) TLS ------------------------------------------------------------------------------- To enable TLS for your Redis connection, set `REDIS_TLS_ENABLED=true`. You can also enable TLS implicitly by using a `rediss://` connection string in `REDIS_URL`. | Variable | Default | Description | | --- | --- | --- | | `REDIS_TLS_ENABLED` | `false` | Enable TLS for the Redis connection. Alternatively, enable tls via `rediss://` connection string. | | `REDIS_TLS_CA_PATH` | \- | Path to the CA certificate for the Redis connection. | | `REDIS_TLS_CERT_PATH` | \- | Path to the certificate for the Redis connection. | | `REDIS_TLS_KEY_PATH` | \- | Path to the private key for the Redis connection. | | `REDIS_TLS_KEY_PASSPHRASE` | \- | Passphrase for encrypted private keys. Required if your TLS private key is password-protected. | | `REDIS_TLS_SERVERNAME` | \- | Server name for SNI (Server Name Indication). Useful when connecting to Redis through a proxy or with custom certificates. | | `REDIS_TLS_REJECT_UNAUTHORIZED` | `true` | Set to `false` to disable certificate validation. Not recommended for production. When not set, defaults to Node.js secure behavior. | | `REDIS_TLS_CHECK_SERVER_IDENTITY` | \- | Set to `false` to bypass server identity checking. Use with caution in enterprise environments with custom certificate setups. | | `REDIS_TLS_SECURE_PROTOCOL` | \- | TLS protocol version (e.g., `TLSv1_2_method`, `TLSv1_3_method`). Uses Node.js defaults when not set. | | `REDIS_TLS_CIPHERS` | \- | Custom cipher suite configuration. Allows specification of allowed TLS ciphers for enhanced security requirements. | | `REDIS_TLS_HONOR_CIPHER_ORDER` | \- | Set to `true` to use server’s cipher order preference instead of client’s. Useful for enforcing security policies. | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/deployment/infrastructure/redis.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/deployment/infrastructure/redis) [Architecture Overview\ \ Previous](https://docs.sourcebot.dev/docs/deployment/infrastructure/architecture) [Overview\ \ Next](https://docs.sourcebot.dev/docs/features/search/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Gerrit - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/gerrit#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Gerrit [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Connecting to a Gerrit instance](https://docs.sourcebot.dev/docs/connections/gerrit#connecting-to-a-gerrit-instance) * [Examples](https://docs.sourcebot.dev/docs/connections/gerrit#examples) * [Schema reference](https://docs.sourcebot.dev/docs/connections/gerrit#schema-reference) Authenticating with Gerrit is currently not supported. If you need this capability, please raise a [feature request](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) . Sourcebot can sync code from self-hosted gerrit instances. If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/gerrit#connecting-to-a-gerrit-instance) Connecting to a Gerrit instance -------------------------------------------------------------------------------------------------------------------------- To connect to a gerrit instance, provide the `url` property to your config: { "type": "gerrit", "url": "https://gerrit.example.com", // Specify which projects to sync using glob patterns: "projects": ["project1/**"] } [​](https://docs.sourcebot.dev/docs/connections/gerrit#examples) Examples ---------------------------------------------------------------------------- Sync projects by glob pattern { "type": "gerrit", "url": "https://gerrit.example.com", // Sync all repos under project1 and project2/sub-project "projects": [\ "project1/**",\ "project2/sub-project/**"\ ] } Exclude repos from syncing { "type": "gerrit", "url": "https://gerrit.example.com", // Sync all repos under project1 and project2/sub-project... "projects": [\ "project1/**",\ "project2/sub-project/**"\ ], // ...except: "exclude": { // any project that matches these glob patterns "projects": [\ "project1/foo-project",\ "project2/sub-project/some-sub-folder/**"\ ], // projects that have state READ_ONLY "readOnly": true, // projects that have state HIDDEN "hidden": true } } [​](https://docs.sourcebot.dev/docs/connections/gerrit#schema-reference) Schema reference -------------------------------------------------------------------------------------------- Reference [schemas/v3/gerrit.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/gerrit.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GerritConnectionConfig", "properties": { "type": { "const": "gerrit", "description": "Gerrit Configuration" }, "url": { "type": "string", "format": "url", "description": "The URL of the Gerrit host.", "examples": [\ "https://gerrit.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "projects": { "type": "array", "items": { "type": "string" }, "description": "List of specific projects to sync. If not specified, all projects will be synced. Glob patterns are supported", "examples": [\ [\ "project1/repo1",\ "project2/**"\ ]\ ] }, "exclude": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "project1/repo1",\ "project2/**"\ ]\ ], "description": "List of specific projects to exclude from syncing." }, "readOnly": { "type": "boolean", "default": false, "description": "Exclude read-only projects from syncing." }, "hidden": { "type": "boolean", "default": false, "description": "Exclude hidden projects from syncing." } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type",\ "url"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/gerrit.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/gerrit) [Linking code from Gitea\ \ Previous](https://docs.sourcebot.dev/docs/connections/gitea) [Other Git hosts\ \ Next](https://docs.sourcebot.dev/docs/connections/generic-git-host) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from Gitea - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/gitea#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from Gitea [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/gitea#examples) * [Authenticating with Gitea](https://docs.sourcebot.dev/docs/connections/gitea#authenticating-with-gitea) * [Connecting to a custom Gitea](https://docs.sourcebot.dev/docs/connections/gitea#connecting-to-a-custom-gitea) * [Schema reference](https://docs.sourcebot.dev/docs/connections/gitea#schema-reference) Sourcebot can sync code from Gitea Cloud, and self-hosted. If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/gitea#examples) Examples --------------------------------------------------------------------------- Sync individual repos { "type": "gitea", "repos": [\ "sourcebot-dev/sourcebot",\ "getsentry/sentry",\ "torvalds/linux"\ ] } Sync all repos in a organization { "type": "gitea", "orgs": [\ "sourcebot-dev",\ "getsentry",\ "vercel"\ ] } Sync all repos owned by a user { "type": "gitea", "users": [\ "torvalds",\ "ggerganov"\ ] } Exclude repos from syncing { "type": "gitea", // Include all repos in my-org... "orgs": [\ "my-org"\ ], // ...except: "exclude": { // repos that are archived "archived": true, // repos that are forks "forks": true, // repos that match these glob patterns "repos": [\ "my-org/repo1",\ "my-org/repo2",\ "my-org/sub-org-1/**",\ "my-org/sub-org-*/**"\ ] } } [​](https://docs.sourcebot.dev/docs/connections/gitea#authenticating-with-gitea) Authenticating with Gitea ------------------------------------------------------------------------------------------------------------- In order to index private repositories, you’ll need to generate a Gitea access token. Generate a Gitea access token [here](http://gitea.com/user/settings/applications) . At minimum, you’ll need to select the `read:repository` scope. `read:user` and `read:organization` are required for the `user` and `org` fields of your config file: ![Gitea Access token creation](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/gitea_pat_creation.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=43e75fbc00c0cc5bcb8c9d0d10e1f68f) Next, provide the access token via an environment variable [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) which is referenced in the `token` property: * Environment Variable 1. Add the `token` property to your connection config: { "type": "gitea", "token": { // note: this env var can be named anything. It // doesn't need to be `GITEA_TOKEN`. "env": "GITEA_TOKEN" }, // At least one of the following is required to specify which repos to sync: "repos": ["my-org/myRepo"], // "orgs": ["my-org"], // "users": ["my-user"] } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e GITEA_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/gitea#connecting-to-a-custom-gitea) Connecting to a custom Gitea ------------------------------------------------------------------------------------------------------------------- To connect to a custom Gitea deployment, provide the `url` property to your config: { "type": "gitea", "url": "https://gitea.example.com", // At least one of the following is required to specify which repos to sync: "repos": ["my-org/myRepo"], // "orgs": ["my-org"], // "users": ["my-user"] } [​](https://docs.sourcebot.dev/docs/connections/gitea#schema-reference) Schema reference ------------------------------------------------------------------------------------------- Reference [schemas/v3/gitea.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/gitea.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GiteaConnectionConfig", "properties": { "type": { "const": "gitea", "description": "Gitea Configuration" }, "token": { "description": "A Personal Access Token (PAT).", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://gitea.com", "description": "The URL of the Gitea host. Defaults to https://gitea.com", "examples": [\ "https://gitea.com",\ "https://gitea.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "orgs": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "my-org-name"\ ]\ ], "description": "List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:organization scope." }, "repos": { "type": "array", "items": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'." }, "users": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "username-1",\ "username-2"\ ]\ ], "description": "List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:user scope." }, "exclude": { "type": "object", "properties": { "forks": { "type": "boolean", "default": false, "description": "Exclude forked repositories from syncing." }, "archived": { "type": "boolean", "default": false, "description": "Exclude archived repositories from syncing." }, "repos": { "type": "array", "items": { "type": "string" }, "default": [], "description": "List of individual repositories to exclude from syncing. Glob patterns are supported." } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/gitea.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/gitea) [Linking code from Azure Devops Server\ \ Previous](https://docs.sourcebot.dev/docs/connections/ado-server) [Linking code from Gerrit\ \ Next](https://docs.sourcebot.dev/docs/connections/gerrit) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Linking code from GitLab - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/gitlab#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Linking code from GitLab [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Examples](https://docs.sourcebot.dev/docs/connections/gitlab#examples) * [Authenticating with GitLab](https://docs.sourcebot.dev/docs/connections/gitlab#authenticating-with-gitlab) * [Connecting to a custom GitLab host](https://docs.sourcebot.dev/docs/connections/gitlab#connecting-to-a-custom-gitlab-host) * [Troubleshooting](https://docs.sourcebot.dev/docs/connections/gitlab#troubleshooting) * [Schema reference](https://docs.sourcebot.dev/docs/connections/gitlab#schema-reference) Sourcebot can sync code from GitLab.com, Self Managed (CE & EE), and Dedicated. If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/gitlab#examples) Examples ---------------------------------------------------------------------------- Sync individual projects { "type": "gitlab", "projects": [\ "my-group/foo",\ "my-group/subgroup/bar"\ ] } Sync all projects in a group/subgroup { "type": "gitlab", "groups": [\ "my-group",\ "my-other-group/sub-group"\ ] } Sync all projects in a self managed instance This option is ignored if `url` is unset. See [connecting to a custom gitlab host](https://docs.sourcebot.dev/docs/connections/gitlab#connecting-to-a-custom-gitlab-host) . { "type": "gitlab", "url": "https://gitlab.example.com", // Index all projects in this self-managed instance "all": true } Sync all projects owned by a user { "type": "gitlab", "users": [\ "user-1",\ "user-2"\ ] } Filter projects by topic { "type": "gitlab", // Sync all projects in `my-group` that have a topic that... "groups": [\ "my-group"\ ], // ...match one of these glob patterns. "topics": [\ "test-*",\ "ci-*",\ "k8s"\ ] } Exclude projects from syncing { "type": "gitlab", // Include all projects in these groups... "groups": [\ "my-group",\ "my-other-group/sub-group"\ ] // ...except: "exclude": { // projects that are archived "archived": true, // projects that are forks "forks": true, // projects that are owned by users (not groups) "userOwnedProjects": true, // projects that match these glob patterns "projects": [\ "my-group/foo/**",\ "my-group/bar/**",\ "my-other-group/sub-group/specific-project"\ ], // repos with topics that match these glob patterns "topics": [\ "test-*",\ "ci"\ ] } } [​](https://docs.sourcebot.dev/docs/connections/gitlab#authenticating-with-gitlab) Authenticating with GitLab ---------------------------------------------------------------------------------------------------------------- In order to index private projects, you’ll need to generate a GitLab Personal Access Token (PAT). Create a new PAT [here](https://gitlab.com/-/user_settings/personal_access_tokens) and make sure you select the `read_api` scope: ![GitLab PAT Scope](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/gitlab_pat_scopes.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=d15f3f3827427a74f7078b43566fae84) Next, provide the PAT via an environment variable [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) which is referenced in the `token` property: * Environment Variable 1. Add the `token` property to your connection config: { "type": "gitlab", "token": { // note: this env var can be named anything. It // doesn't need to be `GITLAB_TOKEN`. "env": "GITLAB_TOKEN" }, // At least one of the following is required to specify which projects to sync: "projects": ["my-group/myProject"], // "groups": ["my-group"], // "users": ["my-user"], // "all": true (self-managed only) } 2. Pass this environment variable each time you run Sourcebot: docker run \ -e GITLAB_TOKEN= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/connections/gitlab#connecting-to-a-custom-gitlab-host) Connecting to a custom GitLab host -------------------------------------------------------------------------------------------------------------------------------- To connect to a GitLab host other than `gitlab.com`, provide the `url` property to your config: { "type": "gitlab", "url": "https://gitlab.example.com", // At least one of the following is required to specify which projects to sync: "projects": ["my-group/myProject"], // "groups": ["my-group"], // "users": ["my-user"], // "all": true } [​](https://docs.sourcebot.dev/docs/connections/gitlab#troubleshooting) Troubleshooting ------------------------------------------------------------------------------------------ * If you’re seeing errors like `GitbeakerTimeoutError: Query timeout was reached` when syncing a large number of projects, you can increase the client’s timeout by setting the `GITLAB_CLIENT_QUERY_TIMEOUT_SECONDS` environment variable. [#162](https://github.com/sourcebot-dev/sourcebot/issues/162) * If you’re seeing errors like `TypeError: fetch failed` when fetching user/project info, it may be that Sourcebot is refusing to connect to your self-hosted GitLab instance due to unrecognized SSL certs. Try setting the `NODE_TLS_REJECT_UNAUTHORIZED=0` environment variable or providing Sourcebot your certs through the `NODE_EXTRA_CA_CERTS` environment variable. [​](https://docs.sourcebot.dev/docs/connections/gitlab#schema-reference) Schema reference -------------------------------------------------------------------------------------------- Reference [schemas/v3/gitlab.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/gitlab.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GitlabConnectionConfig", "properties": { "type": { "const": "gitlab", "description": "GitLab Configuration" }, "token": { "description": "An authentication token.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "url": { "type": "string", "format": "url", "default": "https://gitlab.com", "description": "The URL of the GitLab host. Defaults to https://gitlab.com", "examples": [\ "https://gitlab.com",\ "https://gitlab.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "all": { "type": "boolean", "default": false, "description": "Sync all projects visible to the provided `token` (if any) in the GitLab instance. This option is ignored if `url` is either unset or set to https://gitlab.com ." }, "users": { "type": "array", "items": { "type": "string" }, "description": "List of users to sync with. All projects owned by the user and visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property." }, "groups": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "my-group"\ ],\ [\ "my-group/sub-group-a",\ "my-group/sub-group-b"\ ]\ ], "description": "List of groups to sync with. All projects in the group (and recursive subgroups) visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. Subgroups can be specified by providing the path to the subgroup (e.g. `my-group/sub-group-a`)." }, "projects": { "type": "array", "items": { "type": "string" }, "examples": [\ [\ "my-group/my-project"\ ],\ [\ "my-group/my-sub-group/my-project"\ ]\ ], "description": "List of individual projects to sync with. The project's namespace must be specified. See: https://docs.gitlab.com/ee/user/namespace/" }, "topics": { "type": "array", "items": { "type": "string" }, "minItems": 1, "description": "List of project topics to include when syncing. Only projects that match at least one of the provided `topics` will be synced. If not specified, all projects will be synced, unless explicitly defined in the `exclude` property. Glob patterns are supported.", "examples": [\ [\ "docs",\ "core"\ ]\ ] }, "exclude": { "type": "object", "properties": { "forks": { "type": "boolean", "default": false, "description": "Exclude forked projects from syncing." }, "archived": { "type": "boolean", "default": false, "description": "Exclude archived projects from syncing." }, "userOwnedProjects": { "type": "boolean", "default": false, "description": "Exclude user-owned projects from syncing." }, "projects": { "type": "array", "items": { "type": "string" }, "default": [], "examples": [\ [\ "my-group/my-project"\ ]\ ], "description": "List of projects to exclude from syncing. Glob patterns are supported. The project's namespace must be specified, see: https://docs.gitlab.com/ee/user/namespace/" }, "topics": { "type": "array", "items": { "type": "string" }, "description": "List of project topics to exclude when syncing. Projects that match one of the provided `topics` will be excluded from syncing. Glob patterns are supported.", "examples": [\ [\ "tests",\ "ci"\ ]\ ] } }, "additionalProperties": false }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/gitlab.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/gitlab) [Linking code from GitHub\ \ Previous](https://docs.sourcebot.dev/docs/connections/github) [Linking code from Bitbucket Cloud\ \ Next](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # AI Code Review Agent - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/agents/review-agent#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Agents AI Code Review Agent [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental * [Overview](https://docs.sourcebot.dev/docs/features/agents/overview) * [AI code review agent](https://docs.sourcebot.dev/docs/features/agents/review-agent) ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Language model](https://docs.sourcebot.dev/docs/features/agents/review-agent#language-model) * [GitHub](https://docs.sourcebot.dev/docs/features/agents/review-agent#github) * [GitLab](https://docs.sourcebot.dev/docs/features/agents/review-agent#gitlab) * [Using the agent](https://docs.sourcebot.dev/docs/features/agents/review-agent#using-the-agent) * [Environment variable reference](https://docs.sourcebot.dev/docs/features/agents/review-agent#environment-variable-reference) This agent provides codebase-aware reviews for your GitHub PRs and GitLab MRs. For each diff, the agent fetches relevant context from your indexed codebase and feeds it into a configured language model for a detailed review. The AI Code Review Agent is [fair source](https://github.com/sourcebot-dev/sourcebot/tree/main/packages/web/src/features/agents/review-agent) and packaged in [Sourcebot](https://github.com/sourcebot-dev/sourcebot) . To get started, [deploy Sourcebot](https://docs.sourcebot.dev/docs/deployment/docker-compose) and follow the configuration instructions below. ![AI Code Review Agent Example](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/review_agent_example.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=ce803508c3e3768a78f6b989bff9bc67) [​](https://docs.sourcebot.dev/docs/features/agents/review-agent#language-model) Language model ================================================================================================== The review agent uses whichever language model you have configured in your `config.json`. All providers supported by Sourcebot (OpenAI, Anthropic, AWS Bedrock, Azure OpenAI, and others) work out of the box. If you have multiple models configured, set `REVIEW_AGENT_MODEL` to the `displayName` of the model you want the agent to use. If this variable is unset, the agent uses the first configured model. [​](https://docs.sourcebot.dev/docs/features/agents/review-agent#github) GitHub ================================================================================== 1 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Register a GitHub app Follow the official GitHub guide for [registering a GitHub app](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) . * **GitHub App name**: Any name you choose (e.g. Sourcebot Review Agent) * **Homepage URL**: Any URL you choose (e.g. `https://www.sourcebot.dev/`) * **Webhook URL** (required): Your Sourcebot deployment URL at `/api/webhook` (e.g. `https://sourcebot.example.com/api/webhook`). Your deployment must be reachable from GitHub. If you are running Sourcebot locally, use [smee](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/quickstart#step-2-get-a-webhook-proxy-url) to [forward webhooks](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/quickstart#step-6-start-your-server) to your local deployment. * **Webhook Secret**: Any string (e.g. generate one with `python -c "import secrets; print(secrets.token_hex(10))"`) * **Permissions** * Pull requests: Read & Write * Issues: Read & Write * Contents: Read * **Events** * Pull request * Issue comment 2 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Install the GitHub app in your organization Navigate to your new [GitHub app’s page](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/quickstart#navigate-to-your-app-settings) and press **Install**. 3 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Configure environment variables Set the following environment variables in your Sourcebot deployment: | Variable | Description | | --- | --- | | `GITHUB_REVIEW_AGENT_APP_ID` | The client ID of your GitHub app, found in your [app settings](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/quickstart#navigate-to-your-app-settings) | | `GITHUB_REVIEW_AGENT_APP_WEBHOOK_SECRET` | The webhook secret you set when registering the app | | `GITHUB_REVIEW_AGENT_APP_PRIVATE_KEY_PATH` | Path to your app’s private key file inside the container (e.g. `/data/review-agent-key.pem`). Copy the key file into the directory you mount to Sourcebot. | You can generate a private key in your [app settings](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/quickstart#navigate-to-your-app-settings) . ![GitHub App Private Key](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/github_app_private_key.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=f25f44a6b59f8a28216ab987f8f9a8bb) Example `docker-compose.yml`: services: sourcebot: image: ghcr.io/sourcebot-dev/sourcebot:latest pull_policy: always container_name: sourcebot ports: - "3000:3000" volumes: - "/home/user/sourcebot_workspace:/data" environment: CONFIG_PATH: "/data/config.json" GITHUB_REVIEW_AGENT_APP_ID: "my-github-app-id" GITHUB_REVIEW_AGENT_APP_WEBHOOK_SECRET: "my-webhook-secret" GITHUB_REVIEW_AGENT_APP_PRIVATE_KEY_PATH: "/data/review-agent-key.pem" 4 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Verify configuration Navigate to **Agents** in the Sourcebot nav menu. If your environment variables are set correctly, the GitHub Review Agent card shows a confirmation that the agent is configured and accepting requests. ![Review Agent Configured](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/review_agent_configured.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=b8a496fb185b55ad7145162494b49526) [​](https://docs.sourcebot.dev/docs/features/agents/review-agent#gitlab) GitLab ================================================================================== 1 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Create a GitLab access token Create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) or [project access token](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html) with the following scope: * `api` Keep a note of the token value — you will need it in the next step. 2 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Configure a webhook in GitLab In your GitLab project, go to **Settings → Webhooks** and add a new webhook: * **URL**: Your Sourcebot deployment URL at `/api/webhook` (e.g. `https://sourcebot.example.com/api/webhook`) * **Secret token**: Any string (e.g. generate one with `python -c "import secrets; print(secrets.token_hex(10))"`) * **Trigger events**: Merge request events, Comments Save the webhook. 3 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Configure environment variables Set the following environment variables in your Sourcebot deployment: | Variable | Description | | --- | --- | | `GITLAB_REVIEW_AGENT_WEBHOOK_SECRET` | The secret token you set on the GitLab webhook | | `GITLAB_REVIEW_AGENT_TOKEN` | The GitLab personal or project access token | | `GITLAB_REVIEW_AGENT_HOST` | Your GitLab hostname. Defaults to `gitlab.com`. Set this for self-hosted GitLab instances (e.g. `gitlab.example.com`). | Example `docker-compose.yml`: services: sourcebot: image: ghcr.io/sourcebot-dev/sourcebot:latest pull_policy: always container_name: sourcebot ports: - "3000:3000" volumes: - "/home/user/sourcebot_workspace:/data" environment: CONFIG_PATH: "/data/config.json" GITLAB_REVIEW_AGENT_WEBHOOK_SECRET: "my-webhook-secret" GITLAB_REVIEW_AGENT_TOKEN: "glpat-my-token" GITLAB_REVIEW_AGENT_HOST: "gitlab.example.com" 4 [](https://docs.sourcebot.dev/docs/features/agents/review-agent#) Verify configuration Navigate to **Agents** in the Sourcebot nav menu. If your environment variables are set correctly, the GitLab Review Agent card shows a confirmation that the agent is configured and accepting requests. [​](https://docs.sourcebot.dev/docs/features/agents/review-agent#using-the-agent) Using the agent ==================================================================================================== By default, the agent does not review PRs and MRs automatically. To enable automatic reviews on every new or updated PR/MR, set `REVIEW_AGENT_AUTO_REVIEW_ENABLED` to `true`. You can also trigger a review manually by commenting `/review` on any PR or MR. To use a different command, set `REVIEW_AGENT_REVIEW_COMMAND` to your preferred value (without the leading slash). [​](https://docs.sourcebot.dev/docs/features/agents/review-agent#environment-variable-reference) Environment variable reference ================================================================================================================================== | Variable | Default | Description | | --- | --- | --- | | `REVIEW_AGENT_AUTO_REVIEW_ENABLED` | `false` | Automatically review new and updated PRs/MRs | | `REVIEW_AGENT_REVIEW_COMMAND` | `review` | Comment command that triggers a manual review (without the `/`) | | `REVIEW_AGENT_MODEL` | first configured model | `displayName` of the language model to use for reviews | | `REVIEW_AGENT_LOGGING_ENABLED` | unset | Write prompt and response logs to disk for debugging | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/agents/review-agent.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/agents/review-agent) [Agents Overview\ \ Previous](https://docs.sourcebot.dev/docs/features/agents/overview) [Config File\ \ Next](https://docs.sourcebot.dev/docs/configuration/config-file) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # V2 to V3 Guide - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Upgrade V2 to V3 Guide [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Troubleshooting](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#troubleshooting) This guide will walk you through upgrading your Sourcebot deployment from v2 to v3. Please note that the following features are no longer supported in v3: * Local file indexing * Raw remote `.git` repo indexing (i.e. not through a supported code host) If your deployment is dependent on these features, please [reach out](https://github.com/sourcebot-dev/sourcebot/discussions) . This migration will require you to reindex all your repos 1 [](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#) Spin down deployment 2 [](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#) Delete Sourcebot cache (.sourcebot directory) 3 [](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#) Migrate your configuration file to the v3 schema The main change between the v3 and v2 schemas is how the data is structured. In v2, you defined a `repos` array which contained unnamed config objects: { "$schema": "./schemas/v2/index.json", "repos": [\ {\ "type": "github",\ "repos": [\ "sourcebot-dev/sourcebot"\ ]\ },\ {\ "type": "gitlab":\ "groups": [\ "wireshark"\ ]\ }\ ] } In v3, you define a `connections` map which contains named `connection` objects: { "$schema": "./schemas/v3/index.json", "connections": { "sourcebot-connection": { "type": "github", "repos": [\ "sourcebot-dev/sourcebot"\ ] }, "wireshark-connection": { "type": "gitlab": "groups": [\ "wireshark\ ] } } } The schema of the connections defined here is the same as the “repos” you defined in the v2 schema. Some helpful notes: * The name of the connection (`sourcebot-connection` and `wireshark-connection` above) is only used to identify the connection in Sourcebot. It can be any string that contains letters, digits, hyphens, or underscores * A connection is associated with one and only one code host platform, and this must be specified in the connections `type` field * Make sure you update the `$schema` field to point to the v3 schema * The `settings` object doesn’t need to be changed. We’ve added new settings params (check out the v3 schema for more details) 4 [](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#) Start your Sourcebot deployment When you start up your Sourcebot deployment, it will create a fresh cache and begin indexing against your new v3 configuration file.If there are issues with your configuration file it will provide an error in the console. After updating your configuration file, restart your Sourcebot deployment to pick up the new changes. 5 [](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#) You're done! Congrats, you’ve successfully migrated to v3! Please let us know what you think of the new features by reaching out on our [discord](https://discord.gg/HDScTs3ptP) or on [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) . [​](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide#troubleshooting) Troubleshooting ---------------------------------------------------------------------------------------------- Some things to check: * Make sure you update the `$schema` field in the configuration file to point to the v3 schema * Make sure you have a name for each `connection`, and that the name only contains letters, digits, hyphens, or underscores * Make sure each `connection` has a `type` field with a valid value (`gitlab`, `github`, `gitea`, `gerrit`) Having troubles migrating from v2 to v3? Reach out to us on [discord](https://discord.gg/HDScTs3ptP) or [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) and we’ll try our best to help Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/upgrade/v2-to-v3-guide.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/upgrade/v2-to-v3-guide) [V3 to V4 Guide\ \ Previous](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Audit Logs - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/audit-logs#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration Audit Logs [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Enabling/Disabling Audit Logs](https://docs.sourcebot.dev/docs/configuration/audit-logs#enabling%2Fdisabling-audit-logs) * [Retention Policy](https://docs.sourcebot.dev/docs/configuration/audit-logs#retention-policy) * [Fetching Audit Logs](https://docs.sourcebot.dev/docs/configuration/audit-logs#fetching-audit-logs) * [Audit action types](https://docs.sourcebot.dev/docs/configuration/audit-logs#audit-action-types) * [Response schema](https://docs.sourcebot.dev/docs/configuration/audit-logs#response-schema) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. Audit logs are a collection of notable events performed by users within a Sourcebot deployment. Each audit log records information on the action taken, the user who performed the action, and when the action took place. This feature gives security and compliance teams the necessary information to ensure proper governance and administration of your Sourcebot deployment. [​](https://docs.sourcebot.dev/docs/configuration/audit-logs#enabling/disabling-audit-logs) Enabling/Disabling Audit Logs ---------------------------------------------------------------------------------------------------------------------------- Audit logs are enabled by default and can be controlled with the `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` [environment variable](https://docs.sourcebot.dev/docs/configuration/environment-variables) . [​](https://docs.sourcebot.dev/docs/configuration/audit-logs#retention-policy) Retention Policy -------------------------------------------------------------------------------------------------- By default, audit logs older than 180 days are automatically pruned daily. You can configure the retention period using the `SOURCEBOT_EE_AUDIT_RETENTION_DAYS` [environment variable](https://docs.sourcebot.dev/docs/configuration/environment-variables) . Set it to `0` to disable automatic pruning and retain logs indefinitely. [​](https://docs.sourcebot.dev/docs/configuration/audit-logs#fetching-audit-logs) Fetching Audit Logs -------------------------------------------------------------------------------------------------------- Audit logs are stored in the [postgres database](https://docs.sourcebot.dev/docs/overview#architecture) connected to Sourcebot. To fetch all of the audit logs, you can use the following API: Fetch audit logs curl --request GET '$SOURCEBOT_URL/api/ee/audit' \ --header 'X-Org-Domain: ~' \ --header 'X-Sourcebot-Api-Key: $SOURCEBOT_OWNER_API_KEY' Fetch audit logs example response [\ {\ "id": "cmc146k7m0003xgo2tri5t4br",\ "timestamp": "2025-06-17T22:48:08.914Z",\ "action": "api_key.created",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "205d1da1c6c3772b81d4ad697f5851fa11195176c211055ff0c1509772645d6d",\ "targetType": "api_key",\ "sourcebotVersion": "unknown",\ "orgId": 1\ },\ {\ "id": "cmc146c8r0001xgo2xyu0p463",\ "timestamp": "2025-06-17T22:47:58.587Z",\ "action": "user.performed_code_search",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "1",\ "targetType": "org",\ "sourcebotVersion": "unknown",\ "metadata": {\ "message": "render branch:HEAD"\ },\ "orgId": 1\ },\ {\ "id": "cmc12vqgb0008xgn5nv5hl9y5",\ "timestamp": "2025-06-17T22:11:44.171Z",\ "action": "user.performed_code_search",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "1",\ "targetType": "org",\ "sourcebotVersion": "unknown",\ "metadata": {\ "message": "render branch:HEAD"\ },\ "orgId": 1\ },\ {\ "id": "cmc12txwn0006xgn51ow1odid",\ "timestamp": "2025-06-17T22:10:20.519Z",\ "action": "user.performed_code_search",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "1",\ "targetType": "org",\ "sourcebotVersion": "unknown",\ "metadata": {\ "message": "render branch:HEAD"\ },\ "orgId": 1\ },\ {\ "id": "cmc12tnjx0004xgn5qqeiv1ao",\ "timestamp": "2025-06-17T22:10:07.101Z",\ "action": "user.owner_created",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "1",\ "targetType": "org",\ "sourcebotVersion": "unknown",\ "metadata": null,\ "orgId": 1\ },\ {\ "id": "cmc12tnjh0002xgn5h6vzu3rl",\ "timestamp": "2025-06-17T22:10:07.086Z",\ "action": "user.signed_in",\ "actorId": "cmc12tnje0000xgn58jj8655h",\ "actorType": "user",\ "targetId": "cmc12tnje0000xgn58jj8655h",\ "targetType": "user",\ "sourcebotVersion": "unknown",\ "metadata": null,\ "orgId": 1\ }\ ] See all 79 lines [​](https://docs.sourcebot.dev/docs/configuration/audit-logs#audit-action-types) Audit action types ------------------------------------------------------------------------------------------------------ | Action | Actor Type | Target Type | | --- | --- | --- | | `api_key.created` | `user` | `api_key` | | `api_key.creation_failed` | `user` | `org` | | `api_key.deleted` | `user` | `api_key` | | `api_key.deletion_failed` | `user` | `org` | | `audit.fetch` | `user` | `org` | | `chat.deleted` | `user` | `chat` | | `chat.shared_with_users` | `user` | `chat` | | `chat.unshared_with_user` | `user` | `chat` | | `chat.visibility_updated` | `user` | `chat` | | `user.created_ask_chat` | `user` | `org` | | `user.creation_failed` | `user` | `user` | | `user.delete` | `user` | `user` | | `user.fetched_file_source` | `user` | `org` | | `user.fetched_file_tree` | `user` | `org` | | `user.invite_accept_failed` | `user` | `invite` | | `user.invite_accepted` | `user` | `invite` | | `user.invite_failed` | `user` | `org` | | `user.invites_created` | `user` | `org` | | `user.join_request_approve_failed` | `user` | `account_join_request` | | `user.join_request_approved` | `user` | `account_join_request` | | `user.list` | `user` | `org` | | `user.listed_repos` | `user` | `org` | | `user.owner_created` | `user` | `org` | | `user.performed_code_search` | `user` | `org` | | `user.performed_find_references` | `user` | `org` | | `user.performed_goto_definition` | `user` | `org` | | `user.read` | `user` | `user` | | `user.signed_in` | `user` | `user` | | `user.signed_out` | `user` | `user` | | `org.member_promoted_to_owner` | `user` | `user` | | `org.owner_demoted_to_member` | `user` | `user` | [​](https://docs.sourcebot.dev/docs/configuration/audit-logs#response-schema) Response schema ------------------------------------------------------------------------------------------------ Audit log fetch response schema { "$schema": "http://json-schema.org/draft-07/schema#", "title": "FetchAuditLogsResponse", "type": "array", "items": { "type": "object", "required": [\ "id",\ "timestamp",\ "action",\ "actorId",\ "actorType",\ "targetId",\ "targetType",\ "sourcebotVersion",\ "metadata",\ "orgId"\ ], "properties": { "id": { "type": "string" }, "timestamp": { "type": "string", "format": "date-time" }, "action": { "type": "string" }, "actorId": { "type": "string" }, "actorType": { "type": "string", "enum": ["user", "api_key"] }, "targetId": { "type": "string" }, "targetType": { "type": "string", "enum": ["user", "org", "file", "api_key", "account_join_request", "invite", "chat"] }, "sourcebotVersion": { "type": "string" }, "metadata": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "message": { "type": "string" },\ "api_key": { "type": "string" },\ "emails": { "type": "string" },\ "source": { "type": "string" }\ },\ "additionalProperties": false\ },\ {\ "type": "null"\ }\ ] }, "orgId": { "type": "integer" } }, "additionalProperties": false } } See all 71 lines Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/audit-logs.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/audit-logs) [Structured Logging\ \ Previous](https://docs.sourcebot.dev/docs/configuration/structured-logging) [V3 to V4 Guide\ \ Next](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Structured Logging - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/structured-logging#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration Structured Logging [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Structured log schema](https://docs.sourcebot.dev/docs/configuration/structured-logging#structured-log-schema) By default, Sourcebot will output logs to the console in a human readable format. If you’d like Sourcebot to output structured JSON logs, set the following env vars: * `SOURCEBOT_STRUCTURED_LOGGING_ENABLED` (default: `false`): Controls whether logs are in a structured JSON format * `SOURCEBOT_STRUCTURED_LOGGING_FILE`: If structured logging is enabled and this env var is set, structured logs will be written to this file (ex. `/data/sourcebot.log`) ### [​](https://docs.sourcebot.dev/docs/configuration/structured-logging#structured-log-schema) Structured log schema { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SourcebotLog", "properties": { "level": { "type": "string", "description": "The log level (error, warning, info, debug)" }, "service": { "type": "string", "description": "The Sourcebot component that generated the log" }, "message": { "type": "string", "description": "The log message" }, "status": { "type": "string", "description": "The same value as the level field added for datadog support" }, "timestamp": { "type": "string", "description": "The timestamp of the log in ISO 8061 format" } } } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/structured-logging.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/structured-logging) [Transactional Email\ \ Previous](https://docs.sourcebot.dev/docs/configuration/transactional-emails) [Audit Logs\ \ Next](https://docs.sourcebot.dev/docs/configuration/audit-logs) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # V3 to V4 Guide - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Upgrade V3 to V4 Guide [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [If your deployment doesn’t have authentication enabled](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-doesn%E2%80%99t-have-authentication-enabled) * [If your deployment has authentication enabled](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-has-authentication-enabled) * [If your deployment uses multi-tenancy mode](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-uses-multi-tenancy-mode) * [Troubleshooting](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#troubleshooting) This guide will walk you through upgrading your Sourcebot deployment from v3 to v4. Please note that the following features are no longer supported in v4: * Multi-tenancy mode * Unauthenticated access to a Sourcebot deployment - authentication is now built in by default. Unauthenticated access to a organization can be enabled with an unlimited seat [enterprise license](https://docs.sourcebot.dev/docs/license-key) ### [​](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-doesn%E2%80%99t-have-authentication-enabled) If your deployment doesn’t have authentication enabled 1 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) Spin down deployment 2 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) Set AUTH\_URL environment variable if needed If your Sourcebot instance is deployed behind a domain (ex. `https://sourcebot.yourcompany.com`) you **must** set the `AUTH_URL` environment variable to your deployment domain. 3 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) Spin up v4 deployment and create owner account When you visit your new deployment you’ll be presented with a sign-in page. Sourcebot now requires authentication, and all users must register and sign-in to the deployment.The first account that’s registered will be made the owner. By default, you can register using basic credentials which will be stored encrypted within the postgres DB connected to Sourcebot. Check out the [auth docs](https://docs.sourcebot.dev/docs/configuration/auth/overview) to setup additional auth providers.![](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/login_basic.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=e95119282d202095d83dad91a2f24e70) 4 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) (Optional) Configure transactional emails Emails can be sent on organization join request/approval by configuring [transactional emails](https://docs.sourcebot.dev/docs/configuration/transactional-emails) ![](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/join_request_email.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=9846158755528649c8081644a438dd55) 5 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) Approve additional users onto your deployment After the first account is created, all new account registrations must be approved by the owner. When new users register onto the deployment they’ll be presented with the following request approval page:![Pending Approval Page](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/pending_approval.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=577252fe724bb12c91aefc7f4fca2644)The owner can view and approve join requests by navigating to **Settings -> Members**. Automatic provisioning of accounts is supported when using SSO/Oauth providers, check out the [auth docs](https://docs.sourcebot.dev/docs/configuration/auth/providers#enterprise-authentication-providers) for more info 6 [](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#) You're done! Congrats, you’ve successfully migrated to v4! Please let us know what you think of the new features by reaching out on our [discord](https://discord.gg/HDScTs3ptP) or [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) ### [​](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-has-authentication-enabled) If your deployment has authentication enabled The only change that’s required if your deployment has authentication enabled is to unset the `SOURCEBOT_AUTH_ENABLED` environment variable. New user registrations will now submit a request to join the organization which can be approved by the owner by navigating to **Settings -> Members**. Emails can be sent on organization join request/approval by configuring [transactional emails](https://docs.sourcebot.dev/docs/configuration/transactional-emails) ### [​](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-uses-multi-tenancy-mode) If your deployment uses multi-tenancy mode Unfortunately, multi-tenancy mode is no longer officially supported in v4. To upgrade to v4, you’ll need to unset the `SOURCEBOT_TENANCY_MODE` environment variable and wipe your Sourcebot cache. You can then follow the [instructions above](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#if-your-deployment-doesnt-have-authentication-enabled) to finish upgrading to v4 in single-tenant mode. [​](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide#troubleshooting) Troubleshooting ---------------------------------------------------------------------------------------------- * If you’re hitting issues with signing into your Sourcebot instance, make sure you’re setting `AUTH_URL` correctly to your deployment domain (ex. `https://sourcebot.yourcompany.com`) Having troubles migrating from v3 to v4? Reach out to us on [discord](https://discord.gg/HDScTs3ptP) or [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) and we’ll try our best to help Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/upgrade/v3-to-v4-guide.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/upgrade/v3-to-v4-guide) [Audit Logs\ \ Previous](https://docs.sourcebot.dev/docs/configuration/audit-logs) [V2 to V3 Guide\ \ Next](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Transactional Email - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/transactional-emails#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... Ctrl KAsk AI Search... Navigation Configuration Transactional Email [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) To enable transactional emails in your deployment, set the following environment variables. We recommend using [Resend](https://resend.com/) , but you can use any provider. Setting this enables you to: * Send emails when new members are invited * Send emails when organization join requests are created/accepted * Log into the Sourcebot deployment using [email codes](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-codes) | Variable | Description | | --- | --- | | `SMTP_CONNECTION_URL` | SMTP server connection (`smtp://[user[:password]@]host[:port]`) | | `EMAIL_FROM_ADDRESS` | The sender’s email address | You can also provide the SMTP connection details as individual environment variables instead of a full URL. | Variable | Description | | --- | --- | | `SMTP_HOST` | The hostname of the SMTP server | | `SMTP_PORT` | The port of the SMTP server | | `SMTP_USERNAME` | The username for SMTP authentication | | `SMTP_PASSWORD` | The password for SMTP authentication | | `EMAIL_FROM_ADDRESS` | The sender’s email address | If `SMTP_CONNECTION_URL` is set, it takes precedence over the individual variables. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/transactional-emails.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/transactional-emails) [License key\ \ Previous](https://docs.sourcebot.dev/docs/license-key) [Structured Logging\ \ Next](https://docs.sourcebot.dev/docs/configuration/structured-logging) Ctrl+I Assistant Responses are generated using AI and may contain mistakes. --- # Sourcebot MCP server - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/mcp-server#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Features Sourcebot MCP server [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Use cases](https://docs.sourcebot.dev/docs/features/mcp-server#use-cases) * [Getting Started](https://docs.sourcebot.dev/docs/features/mcp-server#getting-started) * [Authorization](https://docs.sourcebot.dev/docs/features/mcp-server#authorization) * [OAuth 2.0](https://docs.sourcebot.dev/docs/features/mcp-server#oauth-2-0) * [API Key (Bearer token)](https://docs.sourcebot.dev/docs/features/mcp-server#api-key-bearer-token) * [Available Tools](https://docs.sourcebot.dev/docs/features/mcp-server#available-tools) * [grep](https://docs.sourcebot.dev/docs/features/mcp-server#grep) * [list\_repos](https://docs.sourcebot.dev/docs/features/mcp-server#list_repos) * [read\_file](https://docs.sourcebot.dev/docs/features/mcp-server#read_file) * [list\_tree](https://docs.sourcebot.dev/docs/features/mcp-server#list_tree) * [list\_commits](https://docs.sourcebot.dev/docs/features/mcp-server#list_commits) * [glob](https://docs.sourcebot.dev/docs/features/mcp-server#glob) * [get\_diff](https://docs.sourcebot.dev/docs/features/mcp-server#get_diff) * [find\_symbol\_definitions](https://docs.sourcebot.dev/docs/features/mcp-server#find_symbol_definitions) * [find\_symbol\_references](https://docs.sourcebot.dev/docs/features/mcp-server#find_symbol_references) * [list\_language\_models](https://docs.sourcebot.dev/docs/features/mcp-server#list_language_models) * [ask\_codebase](https://docs.sourcebot.dev/docs/features/mcp-server#ask_codebase) The [@sourcebot/mcp](https://www.npmjs.com/package/@sourcebot/mcp) npm package has been deprecated as of 2026-03-04. Please migrate to using the streamable http transport. The Sourcebot MCP Server connects AI tools to your [Sourcebot deployment](https://docs.sourcebot.dev/docs/deployment/docker-compose) . This gives AI agents and automations the ability to search, read files, resolve references & definitions, and more across all of your code hosted on Sourcebot. [​](https://docs.sourcebot.dev/docs/features/mcp-server#use-cases) Use cases ------------------------------------------------------------------------------- * **Context for local agents:** Plug the MCP into coding agents like Cursor, Claude Code, or Copilot to give them context across your entire codebase, not just the open workspace. * **Building autonomous AI agents:** Use Sourcebot as a code context layer for multi-agent systems that review PRs, auto-fix bugs, and answer questions across the company. [​](https://docs.sourcebot.dev/docs/features/mcp-server#getting-started) Getting Started ------------------------------------------------------------------------------------------- Sourcebot MCP uses a [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport hosted at the `/api/mcp` route. Two authorization mechanisms are supported: * **OAuth (preferred)**: MCP clients that support OAuth 2.0 will automatically handle the authorization flow and issue a short lived access token. No API key or manual token management required. Only available with an active [Enterprise license](https://docs.sourcebot.dev/docs/license-key) . * **API key**: Any MCP client can authorize using a Sourcebot API key passed as a `Authorization: Bearer ` header. Create one in **Settings → API Keys**. You can read more about the options in the [authorization](https://docs.sourcebot.dev/docs/features/mcp-server#authorization) section. If [anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access) is enabled on your Sourcebot instance, no OAuth token or API key is required. You can connect directly to the MCP endpoint without any authorization. Claude Code [Claude Code MCP docs](https://code.claude.com/docs/en/mcp#connect-claude-code-to-tools-via-mcp) Run the following command: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. claude mcp add --transport http sourcebot https://sb.example.com/api/mcp Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. Claude Code will automatically handle the OAuth 2.0 authorization flow the first time you connect. claude mcp add --transport http sourcebot https://sb.example.com/api/mcp \ --header "Authorization: Bearer " Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, and `` with an API key generated in **Settings → API Keys**. Cursor [Cursor MCP docs](https://cursor.com/docs/context/mcp) Go to: `Settings` -> `Cursor Settings` -> `Tools & MCP` -> `New MCP Server`Paste the following into your `~/.cursor/mcp.json` file: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. { "mcpServers": { "sourcebot": { "type": "http", "url": "https://sb.example.com/api/mcp" } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. Cursor will automatically handle the OAuth 2.0 authorization flow the first time you connect. { "mcpServers": { "sourcebot": { "type": "http", "url": "https://sb.example.com/api/mcp", "headers": { "Authorization": "Bearer " } } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, and `` with an API key generated in **Settings → API Keys**. VS Code [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) Add the following to your [.vscode/mcp.json](https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_add-an-mcp-server-to-your-workspace) file: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. { "servers": { "sourcebot": { "type": "http", "url": "https://sb.example.com/api/mcp" } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. VS Code will automatically handle the OAuth 2.0 authorization flow the first time you connect. { "servers": { "sourcebot": { "type": "http", "url": "https://sb.example.com/api/mcp", "headers": { "Authorization": "Bearer " } } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, and `` with an API key generated in **Settings → API Keys**. Codex [Codex MCP docs](https://developers.openai.com/codex/mcp) Add the following to your `~/.codex/config.toml` file: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. [mcp_servers.sourcebot] url = "https://sb.example.com/api/mcp" Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. Then run the following to authenticate: codex mcp login sourcebot [mcp_servers.sourcebot] url = "https://sb.example.com/api/mcp" bearer_token_env_var = "SOURCEBOT_API_KEY" Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, then set your API key as an environment variable: export SOURCEBOT_API_KEY= Generate an API key in **Settings → API Keys**. OpenCode [OpenCode MCP docs](https://opencode.ai/docs/mcp-servers) Add the following to your `opencode.jsonc` file: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. { "$schema": "https://opencode.ai/config.json", "mcp": { "sourcebot": { "type": "remote", "url": "https://sb.example.com/api/mcp" } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. OpenCode will automatically handle the OAuth 2.0 authorization flow the first time you connect. You can also manually trigger it with: opencode mcp auth sourcebot { "$schema": "https://opencode.ai/config.json", "mcp": { "sourcebot": { "type": "remote", "url": "https://sb.example.com/api/mcp", "oauth": false, "headers": { "Authorization": "Bearer " } } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, and `` with an API key generated in **Settings → API Keys**. Windsurf [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) Go to: `Windsurf Settings` -> `Cascade` -> `Add Server` -> `Add Custom Server`Paste the following into your `~/.codeium/windsurf/mcp_config.json` file: * OAuth * API Key is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. { "mcpServers": { "sourcebot": { "serverUrl": "https://sb.example.com/api/mcp" } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted. Windsurf will automatically handle the OAuth 2.0 authorization flow the first time you connect. { "mcpServers": { "sourcebot": { "serverUrl": "https://sb.example.com/api/mcp", "headers": { "Authorization": "Bearer " } } } } Replace `https://sb.example.com` with wherever your Sourcebot instance is hosted, and `` with an API key generated in **Settings → API Keys**. [​](https://docs.sourcebot.dev/docs/features/mcp-server#authorization) Authorization --------------------------------------------------------------------------------------- The Sourcebot MCP server supports two authorization methods, OAuth and API keys. If [anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access) is enabled on your instance, no authorization is required. Regardless of which method you use, all MCP requests are scoped to the associated Sourcebot user and inherit the [user’s role and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) . When [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) is configured, this includes repository permissions - the MCP server will only surface results from repositories the user has access to. ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#oauth-2-0) OAuth 2.0 is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. Sourcebot implements an OAuth 2.0 authorization server with support for dynamic client registration (RFC 7591). This means MCP clients can register themselves automatically without any manual setup. Just point your client at the MCP endpoint and it will handle the full authorization flow, prompting you to log in and approve access in your browser the first time you connect. No API key or manual token management is required. Once authorized, Sourcebot issues a short-lived access token (valid for 1 hour) and a refresh token (valid for 90 days). The MCP client handles token refresh automatically, so you stay connected without needing to re-authorize. ![OAuth authorization prompt showing Cursor requesting access to a Sourcebot account](https://mintcdn.com/sourcebot/ex_m8h1jdSrDJGnh/images/mcp_oauth_authorize.png?w=2500&fit=max&auto=format&n=ex_m8h1jdSrDJGnh&q=85&s=bca0869e441c0be4e8e2064c48a1c9c1) ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#api-key-bearer-token) API Key (Bearer token) API keys provide a simpler alternative to OAuth that works with any MCP client. Each key is scoped to the user who created it and inherits their permissions. To create one, navigate to **Settings → API Keys** and click **Create API Key**. Pass the key as an `Authorization: Bearer ` header when connecting to the MCP server. ![API Keys page in Sourcebot Settings](https://mintcdn.com/sourcebot/ex_m8h1jdSrDJGnh/images/mcp_api_key_settings.png?w=2500&fit=max&auto=format&n=ex_m8h1jdSrDJGnh&q=85&s=8d6c5d1e82457e48e907842469984e44) [​](https://docs.sourcebot.dev/docs/features/mcp-server#available-tools) Available Tools ------------------------------------------------------------------------------------------- ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#grep) `grep` Searches for code matching a regular expression pattern across repositories, similar to `grep`/`ripgrep`. Always case-sensitive. Results are grouped by file and include line numbers. Parameters: | Name | Required | Description | | --- | --- | --- | | `pattern` | yes | The regex pattern to search for in file contents. | | `path` | no | Directory path to scope the search to. Defaults to the repository root. | | `include` | no | File glob pattern to include in the search (e.g. `*.ts`, `*.{ts,tsx}`). | | `repo` | no | Repository name to search in. If not provided, searches all repositories. Use the full name including host (e.g. `github.com/org/repo`). | | `ref` | no | Commit SHA, branch or tag name to search on. If not provided, defaults to the default branch. | | `limit` | no | Maximum number of matching files to return (default: 100). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#list_repos) `list_repos` Lists repositories indexed by Sourcebot with optional filtering and pagination. Parameters: | Name | Required | Description | | --- | --- | --- | | `query` | no | Filter repositories by name (case-insensitive). | | `page` | no | Page number for pagination (min 1, default: 1). | | `perPage` | no | Results per page for pagination (min 1, max 100, default: 30). | | `sort` | no | Sort repositories by ‘name’ or ‘pushed’ (most recent commit). Default: ‘name’. | | `direction` | no | Sort direction: ‘asc’ or ‘desc’ (default: ‘asc’). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#read_file) `read_file` Reads the source code for a given file, with optional line range control for large files. Parameters: | Name | Required | Description | | --- | --- | --- | | `repo` | yes | The repository name. | | `path` | yes | The path to the file. | | `ref` | no | Commit SHA, branch or tag name to fetch the source code for. If not provided, uses the default branch. | | `offset` | no | Line number to start reading from (1-indexed). Omit to start from the beginning. | | `limit` | no | Maximum number of lines to read (max: 500). Omit to read up to 500 lines. | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#list_tree) `list_tree` Lists files and directories from a repository path. Directories are shown before files at each level. Parameters: | Name | Required | Description | | --- | --- | --- | | `repo` | yes | The name of the repository to list files from. | | `path` | no | Directory path (relative to repo root). If omitted, the repo root is used. | | `ref` | no | Commit SHA, branch or tag name to list files from. If not provided, uses the default branch. | | `depth` | no | Number of directory levels to traverse below `path` (min 1, max 10, default: 1). | | `includeFiles` | no | Whether to include file entries in the output (default: true). | | `includeDirectories` | no | Whether to include directory entries in the output (default: true). | | `maxEntries` | no | Maximum number of entries to return before truncating (min 1, max 10000, default: 1000). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#list_commits) `list_commits` Get a list of commits for a given repository. Parameters: | Name | Required | Description | | --- | --- | --- | | `repo` | yes | The name of the repository to list commits for. | | `query` | no | Search query to filter commits by message content (case-insensitive). | | `since` | no | Show commits more recent than this date. Supports ISO 8601 (e.g., ‘2024-01-01’) or relative formats (e.g., ‘30 days ago’). | | `until` | no | Show commits older than this date. Supports ISO 8601 (e.g., ‘2024-12-31’) or relative formats (e.g., ‘yesterday’). | | `author` | no | Filter commits by author name or email (case-insensitive). | | `ref` | no | Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch. | | `page` | no | Page number for pagination (min 1, default: 1). | | `perPage` | no | Results per page for pagination (min 1, max 100, default: 50). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#glob) `glob` Finds files whose paths match a glob pattern across repositories (e.g. `**/*.ts`, `src/**/*.test.{ts,tsx}`). Results are grouped by repository. Parameters: | Name | Required | Description | | --- | --- | --- | | `pattern` | yes | Glob pattern to match file paths against (e.g. `**/*.ts`, `src/**/*.test.{ts,tsx}`). | | `path` | no | Restrict results to files under this subdirectory. | | `repo` | no | Repository name to search in. If not provided, searches all repositories. Use the full name including host (e.g. `github.com/org/repo`). | | `ref` | no | Commit SHA, branch or tag name to search on. If not provided, defaults to the default branch. | | `limit` | no | Maximum number of files to return (default: 100). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#get_diff) `get_diff` Returns a structured diff between two refs in a repository using a two-dot comparison. Parameters: | Name | Required | Description | | --- | --- | --- | | `repo` | yes | The fully-qualified repository name. | | `base` | yes | The base git ref (branch, tag, or commit SHA) to diff from. | | `head` | yes | The head git ref (branch, tag, or commit SHA) to diff to. | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#find_symbol_definitions) `find_symbol_definitions` Finds where a symbol (function, class, variable, etc.) is defined in a repository. Parameters: | Name | Required | Description | | --- | --- | --- | | `symbol` | yes | The symbol name to find definitions of. | | `repo` | yes | Repository name to scope the search to. Use the full name including host (e.g. `github.com/org/repo`). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#find_symbol_references) `find_symbol_references` Finds all usages of a symbol (function, class, variable, etc.) across a repository. Parameters: | Name | Required | Description | | --- | --- | --- | | `symbol` | yes | The symbol name to find references to. | | `repo` | yes | Repository name to scope the search to. Use the full name including host (e.g. `github.com/org/repo`). | ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#list_language_models) `list_language_models` Lists the available language models configured on the Sourcebot instance. Use this to discover which models can be specified when calling `ask_codebase`. Parameters: This tool takes no parameters. ### [​](https://docs.sourcebot.dev/docs/features/mcp-server#ask_codebase) `ask_codebase` Ask a natural language question about the codebase. This tool uses an AI agent to autonomously search code, read files, and find symbol references/definitions to answer your question. Returns a detailed answer in markdown format with code references, plus a link to view the full research session in the Sourcebot web UI. Parameters: | Name | Required | Description | | --- | --- | --- | | `query` | yes | The query to ask about the codebase. | | `repos` | no | The repositories that are accessible to the agent during the chat. If not provided, all repositories are accessible. | | `languageModel` | no | The language model to use for answering the question. Object with `provider` and `model`. If not provided, defaults to the first model in the config. Use `list_language_models` to see available options. | | `visibility` | no | The visibility of the chat session (`'PRIVATE'` or `'PUBLIC'`). Defaults to `PRIVATE` for authenticated users and `PUBLIC` for anonymous users. Set to `PUBLIC` to make the chat viewable by anyone with the link (useful in shared environments like Slack). | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/mcp-server.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/mcp-server) [Configure Language Models\ \ Previous](https://docs.sourcebot.dev/docs/features/ask/add-model-providers) [Code navigation\ \ Next](https://docs.sourcebot.dev/docs/features/code-navigation) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/ask/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Ask Sourcebot Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Overview](https://docs.sourcebot.dev/docs/features/ask/overview) * [Chat Sharing](https://docs.sourcebot.dev/docs/features/ask/chat-sharing) * [Configure language models](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Why do we need another AI dev tool?](https://docs.sourcebot.dev/docs/features/ask/overview#why-do-we-need-another-ai-dev-tool) * [Troubleshooting](https://docs.sourcebot.dev/docs/features/ask/overview#troubleshooting) Ask Sourcebot gives you the ability to ask complex questions about your entire codebase in natural language. It uses Sourcebot’s existing [code search](https://docs.sourcebot.dev/docs/features/search/overview) and [navigation](https://docs.sourcebot.dev/docs/features/code-navigation) tools to allow reasoning models to search your code, follow code nav references, and provide an answer that’s rich with inline citations and navigable code snippets. Ask Sourcebot **uses an LLM provider you configure with Sourcebot**, ensuring you have full control over where your data is sent. Deployment guide ---------------- Learn how to self-host Sourcebot in a few simple steps. Public demo ----------- Try it out for free in our public demo. Configure language models ------------------------- Learn how to connect your language model to Sourcebot Index repos ----------- Learn how to index your repos so you can ask questions about them [​](https://docs.sourcebot.dev/docs/features/ask/overview#why-do-we-need-another-ai-dev-tool) Why do we need another AI dev tool? ==================================================================================================================================== Existing AI dev tools (Cursor, Claude Code, Copilot) are great at generating code. However, we believe one of the hardest parts of being a software engineer is **understanding code**. In this domain, these tools fall short: * You can only ask questions about the code you have checked out locally * You get a wall of text that’s difficult to parse, requiring you to go back and forth through different code snippets in the response * The richness of the explanation is limited by the fact that you’re in your IDE We built Ask Sourcebot to address these problems. With Ask Sourcebot, you can: * Ask questions about your teams entire codebase (even on repos you don’t have locally) * Easily parse the response with side-by-side citations and code navigation * Share answers with your team to spread the knowledge Being a web app is less convenient than being in your IDE, but it allows Sourcebot to provide responses in a richer UI that isn’t constrained by the IDE. We believe this experience of understanding your codebase is superior, and we hope you find it useful. We’d love to know what you think! Feel free to join the discussion on our [GitHub](https://github.com/sourcebot-dev/sourcebot/discussions) . [​](https://docs.sourcebot.dev/docs/features/ask/overview#troubleshooting) Troubleshooting ============================================================================================= * **Network timeouts**: If you are hitting generic “network error” message while the answer is streaming when Sourcebot is deployed in a production environment, it may be due to your load balancer or proxy not being configured to handle long-lived connections. The timeout should be configured to a sufficiently large value (e.g., 5 minutes). Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/ask/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/ask/overview) [Search contexts\ \ Previous](https://docs.sourcebot.dev/docs/features/search/search-contexts) [Chat Sharing\ \ Next](https://docs.sourcebot.dev/docs/features/ask/chat-sharing) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Config File - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/config-file#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration Config File [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Config File Schema](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-schema) * [Config File Syncing](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-syncing) * [Settings](https://docs.sourcebot.dev/docs/configuration/config-file#settings) * [Tokens](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) * [Overriding environment variables from the config](https://docs.sourcebot.dev/docs/configuration/config-file#overriding-environment-variables-from-the-config) When self-hosting Sourcebot, you **must** provide it a config file. This is done by defining a config file in a volume that’s mounted to Sourcebot, and providing the path to this file in the `CONFIG_PATH` environment variable. For example: Passing in a CONFIG\_PATH to Sourcebot docker run \ -v $(pwd)/config.json:/data/config.json \ -e CONFIG_PATH=/data/config.json \ ... \ # other options ghcr.io/sourcebot-dev/sourcebot:latest The config file tells Sourcebot which repos to index, what language models to use, and various other settings as defined in the [schema](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-schema) . [​](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-schema) Config File Schema ======================================================================================================= The config file you provide Sourcebot must follow the [schema](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/index.json) . This schema consists of the following properties: * [Connections](https://docs.sourcebot.dev/docs/connections/overview) (`connections`): Defines a set of connections that tell Sourcebot which repos to index and from where * [Language Models](https://docs.sourcebot.dev/docs/configuration/language-model-providers) (`models`): Defines a set of language model providers for use with [Ask Sourcebot](https://docs.sourcebot.dev/docs/features/ask) * [Settings](https://docs.sourcebot.dev/docs/configuration/config-file#settings) (`settings`): Additional settings to tweak your Sourcebot deployment * [Search Contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) (`contexts`): Groupings of repos that you can search against [​](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-syncing) Config File Syncing ========================================================================================================= Sourcebot syncs the config file on startup, and automatically whenever a change is detected. [​](https://docs.sourcebot.dev/docs/configuration/config-file#settings) Settings =================================================================================== The following are settings that can be provided in your config file to modify Sourcebot’s behavior | Setting | Type | Default | Minimum | Description / Notes | | --- | --- | --- | --- | --- | | `maxFileSize` | number | 2 MB | 1 | Maximum size (bytes) of a file to index. Files exceeding this are skipped. | | `maxTrigramCount` | number | 20 000 | 1 | Maximum trigrams per document. Larger files are skipped. | | `reindexIntervalMs` | number | 1 hour | 1 | Interval at which all repositories are re‑indexed. | | `resyncConnectionIntervalMs` | number | 24 hours | 1 | Interval for checking connections that need re‑syncing. | | `resyncConnectionPollingIntervalMs` | number | 1 second | 1 | DB polling rate for connections that need re‑syncing. | | `reindexRepoPollingIntervalMs` | number | 1 second | 1 | DB polling rate for repos that should be re‑indexed. | | `maxConnectionSyncJobConcurrency` | number | 8 | 1 | Concurrent connection‑sync jobs. | | `maxRepoIndexingJobConcurrency` | number | 8 | 1 | Concurrent repo‑indexing jobs. | | `maxRepoGarbageCollectionJobConcurrency` | number | 8 | 1 | Concurrent repo‑garbage‑collection jobs. | | `repoGarbageCollectionGracePeriodMs` | number | 10 seconds | 1 | Grace period to avoid deleting shards while loading. | | `repoIndexTimeoutMs` | number | 2 hours | 1 | Timeout for a single repo‑indexing run. | | `enablePublicAccess` **(deprecated)** | boolean | false | — | Use the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable instead. | | `repoDrivenPermissionSyncIntervalMs` | number | 24 hours | 1 | Interval at which the repo permission syncer should run. | | `userDrivenPermissionSyncIntervalMs` | number | 24 hours | 1 | Interval at which the user permission syncer should run. | | `experiment_repoDrivenPermissionSyncIntervalMs` **(deprecated)** | number | 24 hours | 1 | Use `repoDrivenPermissionSyncIntervalMs` instead. | | `experiment_userDrivenPermissionSyncIntervalMs` **(deprecated)** | number | 24 hours | 1 | Use `userDrivenPermissionSyncIntervalMs` instead. | | `maxAccountPermissionSyncJobConcurrency` | number | 8 | 1 | Concurrent account permission sync jobs. | | `maxRepoPermissionSyncJobConcurrency` | number | 8 | 1 | Concurrent repo permission sync jobs. | [​](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) Tokens =============================================================================== Tokens are used to securely pass secrets to Sourcebot in a config file. They are used in various places, including connections, language model providers, auth providers, etc. Tokens can be passed as either environment variables or Google Cloud secrets: Environment Variables { "token": { "env": "TOKEN_NAME" } } Google Cloud Secrets { "token": { "googleCloudSecret": "projects//secrets//versions/" } } [​](https://docs.sourcebot.dev/docs/configuration/config-file#overriding-environment-variables-from-the-config) Overriding environment variables from the config =================================================================================================================================================================== You can override / set environment variables from the config file by using the `environmentOverrides` property. Overrides can be of type `string`, `number`, `boolean`, or a [token](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) . Tokens are useful when you want to configure a environment variable using a Google Cloud Secret or other supported secret management service. Token { "environmentOverrides": { "DATABASE_URL": { "type": "token", "value": { "googleCloudSecret": "projects//secrets/postgres-connection-string/versions/latest" } }, "REDIS_URL": { "type": "token", "value": { "googleCloudSecret": "projects//secrets/redis-connection-string/versions/latest" } } }, } String { "environmentOverrides": { "EMAIL_FROM_ADDRESS": { "type": "string", "value": "hello@sourcebot.dev" } } } Number { "environmentOverrides": { "SOURCEBOT_CHAT_MODEL_TEMPERATURE": { "type": "number", "value": 0.5 } } } Boolean { "environmentOverrides": { "SOURCEBOT_TELEMETRY_DISABLED": { "type": "boolean", "value": false } } } **Note:** Overrides are **not** set as system environment variables, and instead are resolved at runtime on startup and stored in memory.Schema reference [schemas/v3/environmentOverrides.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/environmentOverrides.json) { "type": "object", "description": "Environment variable overrides.", "title": "EnvironmentOverrides", "not": { "$comment": "List of environment variables that are not allowed to be overridden.", "anyOf": [\ {\ "required": [\ "CONFIG_PATH"\ ]\ }\ ] }, "patternProperties": { "^[a-zA-Z0-9_-]+$": { "oneOf": [\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "token"\ },\ "value": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "string"\ },\ "value": {\ "type": "string"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "number"\ },\ "value": {\ "type": "number"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "boolean"\ },\ "value": {\ "type": "boolean"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ }\ ] } } } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/config-file.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/config-file) [AI Code Review Agent\ \ Previous](https://docs.sourcebot.dev/docs/features/agents/review-agent) [Environment variables\ \ Next](https://docs.sourcebot.dev/docs/configuration/environment-variables) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Access Settings - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Authentication Access Settings [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [Overview](https://docs.sourcebot.dev/docs/configuration/auth/overview) * [Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers) * [Access settings](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) * [Roles and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) * [FAQ](https://docs.sourcebot.dev/docs/configuration/auth/faq) * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access) * [Member Approval](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#member-approval) * [Configuration](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#configuration) * [Managing Requests](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#managing-requests) * [Invite link](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#invite-link) There are various settings to control how users access your Sourcebot deployment. [​](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access) Anonymous access ============================================================================================================ Anonymous access cannot be enabled if you have an enterprise license. If you have any questions about this restriction [reach out to us](https://www.sourcebot.dev/contact) . By default, your Sourcebot deployment is gated with a login page. If you’d like users to access the deployment anonymously, you can enable anonymous access. This can be enabled by navigating to **Settings -> Access** or by setting the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable. When accessing Sourcebot anonymously, a user’s permissions are limited to that of the [Guest](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) role. [​](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#member-approval) Member Approval ========================================================================================================== By default, Sourcebot requires new members to be approved by an owner of the deployment. This section explains how approvals work and how to configure this behavior. ### [​](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#configuration) Configuration Member approval can be configured by an owner of the deployment by navigating to **Settings -> Access**, or by setting the `REQUIRE_APPROVAL_NEW_MEMBERS` environment variable. When the environment variable is set, the UI toggle is disabled and the setting is controlled by the environment variable. ![Member Approval Toggle](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/member_approval_toggle.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=e05f070bde0f734f3ff8c6d329df3d10) ### [​](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#managing-requests) Managing Requests If member approval is enabled, new members will be asked to submit a join request after signing up. They will not have access to the Sourcebot deployment until this request is approved by an owner. Owners can see and manage all pending join requests by navigating to **Settings -> Members**. [​](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#invite-link) Invite link -------------------------------------------------------------------------------------------------- If member approval is required, an owner of the deployment can enable an invite link. When enabled, users can use this invite link to register and be automatically added to the organization without approval: ![Invite Link Toggle](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/invite_link_toggle.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=55fd81390f3f1d05a9593d88dd6e72cd) Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/auth/access-settings.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/auth/access-settings) [Providers\ \ Previous](https://docs.sourcebot.dev/docs/configuration/auth/providers) [Roles and Permissions\ \ Next](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # FAQ - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/auth/faq#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Authentication FAQ [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [Overview](https://docs.sourcebot.dev/docs/configuration/auth/overview) * [Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers) * [Access settings](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) * [Roles and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) * [FAQ](https://docs.sourcebot.dev/docs/configuration/auth/faq) * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) This page covers a range of frequently asked questions about Sourcebot’s built-in authentication system. Can I disable the authentication system? No, at this time it’s not possible to disable the authentication system. If this is preventing you from deploying Sourcebot within your organization please [reach out](https://www.sourcebot.dev/contact) I don't want to restrict access to my Sourcebot deployment, what should I do? Every user must register an account within your Sourcebot deployment. However, this doesn’t mean their access is restricted.Unless member approval is required, anyone can sign up for an account on your deployment and immediately be granted access. Does any data related to authentication (emails, passwords, etc) leave my deployment? **No data related to authentication (or your code) leaves your deployment**. Authentication is handled purely by your deployment and the authentication providers you configure.This data does not leave your device and is stored within in the database managed by your deployment. If you’re using credential login, passwords are encrypted at rest and in transit. I'm deploying Sourcebot behind an identity proxy, do I still need to create an account in Sourcebot? Please note that IAP bridges are an enterprise feature Sourcebot supports connecting your identity proxy directly into the built-in auth system using an IAP bridge. This allows Sourcebot to register and authenticate automatically on a successful identity proxy log in.Sourcebot currently supports [GCP IAP](https://docs.sourcebot.dev/docs/configuration/idp) . If you’re using a different IAP and require support, please [reach out](https://www.sourcebot.dev/contact) How does Sourcebot implement authentication? Sourcebot uses [Auth.js](https://authjs.dev/) as its underlying authentication framework. Auth.js provides authentication providers (credentials, Google, GitHub, etc) and an interface to enable user registration and log in. Internally, Auth.js uses JWT to provide Sourcebot secure and reliable information about user authentication. Have a question that’s not answered here? Submit an issue on [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) and we’ll get back to you as soon as we can. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/auth/faq.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/auth/faq) [Roles and Permissions\ \ Previous](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) [License key\ \ Next](https://docs.sourcebot.dev/docs/license-key) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/auth/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Authentication Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [Overview](https://docs.sourcebot.dev/docs/configuration/auth/overview) * [Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers) * [Access settings](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) * [Roles and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) * [FAQ](https://docs.sourcebot.dev/docs/configuration/auth/faq) * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Troubleshooting](https://docs.sourcebot.dev/docs/configuration/auth/overview#troubleshooting) If you’re deploying Sourcebot behind a domain, you must set the [AUTH\_URL](https://docs.sourcebot.dev/docs/configuration/environment-variables) environment variable. Sourcebot’s built-in authentication system gates your deployment, and allows administrators to manage users and their permissions. Authentication providers ------------------------ Configure additional authentication providers for your deployment. Access settings --------------- Learn how to configure how members join your deployment. Roles and permissions --------------------- Learn more about the different roles and permissions in Sourcebot. FAQ --- Have a question about Sourcebot’s auth system? We might have the answers here. [​](https://docs.sourcebot.dev/docs/configuration/auth/overview#troubleshooting) Troubleshooting =================================================================================================== * If you experience issues logging in, logging out, or accessing an organization you should have access to, try clearing your cookies & performing a full page refresh (`Cmd/Ctrl + Shift + R` on most browsers). * Still not working? Reach out to us on our [discord](https://discord.gg/HDScTs3ptP) or [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose) Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/auth/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/auth/overview) [External Identity Providers\ \ Previous](https://docs.sourcebot.dev/docs/configuration/idp) [Providers\ \ Next](https://docs.sourcebot.dev/docs/configuration/auth/providers) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Writing search queries - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/search/syntax-reference#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Code Search Writing search queries [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * [Overview](https://docs.sourcebot.dev/docs/features/search/overview) * [Writing search queries](https://docs.sourcebot.dev/docs/features/search/syntax-reference) * [AI Search Assist](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) * [Searching multiple branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) * [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Syntax reference guide](https://docs.sourcebot.dev/docs/features/search/syntax-reference#syntax-reference-guide) * [Keyword search (default)](https://docs.sourcebot.dev/docs/features/search/syntax-reference#keyword-search-default) * [Regex search](https://docs.sourcebot.dev/docs/features/search/syntax-reference#regex-search) * [Search filters](https://docs.sourcebot.dev/docs/features/search/syntax-reference#search-filters) * [Boolean operators & grouping](https://docs.sourcebot.dev/docs/features/search/syntax-reference#boolean-operators-%26-grouping) Sourcebot uses a powerful regex-based query language that enabled precise code search within large codebases. [​](https://docs.sourcebot.dev/docs/features/search/syntax-reference#syntax-reference-guide) Syntax reference guide ---------------------------------------------------------------------------------------------------------------------- Queries consist of space-separated search patterns that are matched against file contents. A file must have at least one match for each expression to be included. Queries can optionally contain search filters to further refine the search results. [​](https://docs.sourcebot.dev/docs/features/search/syntax-reference#keyword-search-default) Keyword search (default) ------------------------------------------------------------------------------------------------------------------------ Keyword search matches search patterns exactly in file contents. Wrapping search patterns in `""` combines them as a single expression. | Example | Explanation | | --- | --- | | `foo` | Match files containing the keyword `foo` | | `foo bar` | Match files containing both `foo` **and** `bar` | | `"foo bar"` | Match files containing the phrase `foo bar` | | `"foo \"bar\""` | Match files containing `foo "bar"` exactly (escaped quotes) | [​](https://docs.sourcebot.dev/docs/features/search/syntax-reference#regex-search) Regex search -------------------------------------------------------------------------------------------------- Toggle the regex button (`.*`) in the search bar to interpret search patterns as regular expressions. | Example | Explanation | | --- | --- | | `foo` | Match files with regex `/foo/` | | `foo.*bar` | Match files with regex `/foo.*bar/` (foo followed by any characters, then bar) | | `^function\s+\w+` | Match files with regex `/^function\s+\w+/` (function at start of line, followed by whitespace and word characters) | | `"foo bar"` | Match files with regex `/foo bar/`. Quotes are not matched. | [​](https://docs.sourcebot.dev/docs/features/search/syntax-reference#search-filters) Search filters ------------------------------------------------------------------------------------------------------ Search queries (keyword or regex) can include multiple search filters to further refine the search results. Some filters can be negated using the `-` prefix. | Prefix | Description | Example | | --- | --- | --- | | `file:` | Filter results from filepaths that match the regex. By default all files are searched. | `file:README` - Filter results to filepaths that match regex `/README/`
`file:"my file"` - Filter results to filepaths that match regex `/my file/`
`-file:test\.ts$` - Ignore results from filepaths match regex `/test\.ts$/` | | `repo:` | Filter results from repos that match the regex. By default all repos are searched. | `repo:linux` - Filter results to repos that match regex `/linux/`
`-repo:^web/.*` - Ignore results from repos that match regex `/^web\/.*/` | | `rev:` | Filter results from a specific branch or tag. By default **only** the default branch is searched. | `rev:beta` - Filter results to branches that match regex `/beta/` | | `lang:` | Filter results by language (as defined by [linguist](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml)
). By default all languages are searched. | `lang:TypeScript` - Filter results to TypeScript files
`-lang:YAML` - Ignore results from YAML files | | `sym:` | Match symbol definitions created by [universal ctags](https://ctags.io/)
at index time. | `sym:\bmain\b` - Filter results to symbols that match regex `/\bmain\b/` | | `context:` | Filter results to a predefined [search context](https://docs.sourcebot.dev/docs/features/search/search-contexts)
. | `context:web` - Filter results to the web context
`-context:pipelines` - Ignore results from the pipelines context | [​](https://docs.sourcebot.dev/docs/features/search/syntax-reference#boolean-operators-&-grouping) Boolean operators & grouping ---------------------------------------------------------------------------------------------------------------------------------- By default, space-separated expressions are and’d together. Using the `or` keyword as well as parentheses `()` can be used to create more complex boolean logic. Parentheses can be negated using the `-` prefix. | Example | Explanation | | --- | --- | | `foo or bar` | Match files containing `foo` **or** `bar` | | `foo (bar or baz)` | Match files containing `foo` **and** either `bar` **or** `baz`. | | `-(foo) bar` | Match files containing `bar` **and not** `foo`. | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/search/syntax-reference.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/search/syntax-reference) [Overview\ \ Previous](https://docs.sourcebot.dev/docs/features/search/overview) [AI Search Assist\ \ Next](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Providers - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/auth/providers#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Authentication Providers [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [Overview](https://docs.sourcebot.dev/docs/configuration/auth/overview) * [Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers) * [Access settings](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) * [Roles and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) * [FAQ](https://docs.sourcebot.dev/docs/configuration/auth/faq) * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Core Authentication Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers#core-authentication-providers) * [Email / Password](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-%2F-password) * [Email codes](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-codes) * [Enterprise Authentication Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers#enterprise-authentication-providers) Sourcebot supports a wide range of different authentication providers through it’s integration with [Auth.js](https://authjs.dev/) . This page highlights how to configure the various supported providers. If there’s an authentication provider you’d like us to support, please [reach out](https://www.sourcebot.dev/contact) . [​](https://docs.sourcebot.dev/docs/configuration/auth/providers#core-authentication-providers) Core Authentication Providers ================================================================================================================================ ### [​](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-/-password) Email / Password * * * Email / password authentication is enabled by default. It can be **disabled** by setting `AUTH_CREDENTIALS_LOGIN_ENABLED` to `false`. ### [​](https://docs.sourcebot.dev/docs/configuration/auth/providers#email-codes) Email codes * * * Email codes are 6 digit codes sent to a provided email. Email codes are enabled when transactional emails are configured using the following environment variables: * `AUTH_EMAIL_CODE_LOGIN_ENABLED` * `SMTP_CONNECTION_URL` * `EMAIL_FROM_ADDRESS` See [transactional emails](https://docs.sourcebot.dev/docs/configuration/transactional-emails) for more details. [​](https://docs.sourcebot.dev/docs/configuration/auth/providers#enterprise-authentication-providers) Enterprise Authentication Providers ============================================================================================================================================ Sourcebot supports authentication using several different [external identity providers](https://docs.sourcebot.dev/docs/configuration/idp) as well. These identity providers require an [enterprise license](https://docs.sourcebot.dev/docs/license-key) Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/auth/providers.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/auth/providers) [Overview\ \ Previous](https://docs.sourcebot.dev/docs/configuration/auth/overview) [Access Settings\ \ Next](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Roles and Permissions - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Authentication Roles and Permissions [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [Overview](https://docs.sourcebot.dev/docs/configuration/auth/overview) * [Providers](https://docs.sourcebot.dev/docs/configuration/auth/providers) * [Access settings](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) * [Roles and permissions](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions) * [FAQ](https://docs.sourcebot.dev/docs/configuration/auth/faq) * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Managing owners](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#managing-owners) * [Promoting a member to owner](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#promoting-a-member-to-owner) * [Demoting an owner to member](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#demoting-an-owner-to-member) * [Leaving an organization as an owner](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#leaving-an-organization-as-an-owner) Each member has a role which defines their permissions within an organization: | Role | Permission | | --- | --- | | `Owner` | An organization can have one or more `Owner`s. Owners have full access rights, including: connection management, organization management, and inviting new members. | | `Member` | Read-only access to the organization. A `Member` can search across the repos indexed by an organization’s connections, as well as view the organizations configuration and member list. However, they cannot modify this configuration or invite new members. | | `Guest` | When accessing Sourcebot [anonymously](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access)
, a user has the `Guest` role. `Guest`’s can search across repos indexed by an organization’s connections, but cannot view any information regarding the organizations configuration or members. | [​](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#managing-owners) Managing owners ---------------------------------------------------------------------------------------------------------------- is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. organizations support multiple owners, allowing you to share administrative responsibilities across your team. Owners can promote members to owner and demote other owners back to member from **Settings -> Members**. ![Members settings page showing team members and their roles](https://mintcdn.com/sourcebot/sq5lDYGG4Mp5G6DK/images/managing_owners.png?w=2500&fit=max&auto=format&n=sq5lDYGG4Mp5G6DK&q=85&s=98f98e97f4dd7155bad5b009a07f047d) ### [​](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#promoting-a-member-to-owner) Promoting a member to owner To promote a member, click the action menu (three dots) next to their name in the members list and select **Promote to owner**. The member will immediately gain full administrative access. ![Dropdown menu showing Promote to owner option for a member](https://mintcdn.com/sourcebot/XOfuZQzkSK-Qeawa/images/promote_to_owner.png?w=2500&fit=max&auto=format&n=XOfuZQzkSK-Qeawa&q=85&s=dc085156446deaabe765e716898dbd67) ### [​](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#demoting-an-owner-to-member) Demoting an owner to member To demote an owner, click the action menu next to their name and select **Demote to member**. Owners can also demote themselves to step down from the role. The last remaining owner of an organization cannot be demoted - at least one owner must exist at all times. ![Dropdown menu showing Demote to member option for an owner](https://mintcdn.com/sourcebot/sq5lDYGG4Mp5G6DK/images/demote_to_member.png?w=2500&fit=max&auto=format&n=sq5lDYGG4Mp5G6DK&q=85&s=84066002fa210f53bbf7e86ceb1a4f41) ### [​](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#leaving-an-organization-as-an-owner) Leaving an organization as an owner An owner can leave the organization as long as at least one other owner exists. If you are the last owner, you must promote another member to owner before leaving. ![Dropdown menu showing Leave organization option for an owner](https://mintcdn.com/sourcebot/sq5lDYGG4Mp5G6DK/images/owner_leave_org.png?w=2500&fit=max&auto=format&n=sq5lDYGG4Mp5G6DK&q=85&s=98365edb6884fa590c0bae1ded794f37) Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/auth/roles-and-permissions.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/auth/roles-and-permissions) [Access Settings\ \ Previous](https://docs.sourcebot.dev/docs/configuration/auth/access-settings) [FAQ\ \ Next](https://docs.sourcebot.dev/docs/configuration/auth/faq) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Sizing Guide - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/deployment/sizing-guide#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Deployment Sizing Guide [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment * [Docker Compose](https://docs.sourcebot.dev/docs/deployment/docker-compose) * [Kubernetes (Helm)](https://github.com/sourcebot-dev/sourcebot-helm-chart) * [Sizing Guide](https://docs.sourcebot.dev/docs/deployment/sizing-guide) * Infrastructure ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Recommendations](https://docs.sourcebot.dev/docs/deployment/sizing-guide#recommendations) * [Disk usage](https://docs.sourcebot.dev/docs/deployment/sizing-guide#disk-usage) * [Tuning concurrency](https://docs.sourcebot.dev/docs/deployment/sizing-guide#tuning-concurrency) * [Audit log storage](https://docs.sourcebot.dev/docs/deployment/sizing-guide#audit-log-storage) * [Retention policy](https://docs.sourcebot.dev/docs/deployment/sizing-guide#retention-policy) * [Monitoring](https://docs.sourcebot.dev/docs/deployment/sizing-guide#monitoring) Sourcebot runs as a single container (vertical scaling). This guide helps you choose the right CPU, memory, and disk allocation based on the number of repositories you plan to index. These recommendations are based on real-world deployments. Your results may vary depending on repository sizes, search patterns, and whether you use features like [multi-branch indexing](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) or [Ask Sourcebot](https://docs.sourcebot.dev/docs/features/ask/overview) . [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#recommendations) Recommendations ----------------------------------------------------------------------------------------------- | | Small | Medium | Large | Extra Large | | --- | --- | --- | --- | --- | | **Repos** | Up to 100 | 100 – 500 | 500 – 2,000 | 2,000+ | | **CPU** | 2 cores | 4 cores | 8 cores | 16+ cores | | **Memory** | 4 GB | 8 GB | 32 GB | 64+ GB | | **Disk** | 50 GB | 100 GB | 250 GB | 500+ GB | We recommend using external managed Postgres and Redis instances rather than the ones embedded in the Sourcebot container, as this adds stability to your deployment. You can configure these with the `DATABASE_URL` and `REDIS_URL` [environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) . Of all resources, **memory has the most direct impact on search performance**. Sourcebot uses [Zoekt](https://github.com/sourcegraph/zoekt) for search indexing, and the OS page cache keeps frequently accessed index data in memory. More memory means more of the index stays cached, which translates directly to faster searches and less disk I/O. [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#disk-usage) Disk usage ------------------------------------------------------------------------------------- Disk is consumed by two things: 1. **Cloned repositories** stored in the `.sourcebot/` cache directory 2. **Zoekt search indexes** built from those repositories As a rule of thumb, plan for **2 – 3x the total size of the source code** you intend to index. For example, if your repositories total 50 GB, allocate at least 100 – 150 GB of disk. [Multi-branch indexing](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) significantly increases disk usage since each indexed branch produces its own search index. In testing, enabling branch indexing across all branches can **triple** storage requirements. Start with a subset of branches (e.g., release branches) and monitor disk usage before expanding. [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#tuning-concurrency) Tuning concurrency ----------------------------------------------------------------------------------------------------- If your instance is resource-constrained, you can reduce the concurrency of background jobs to lower CPU and memory pressure during indexing. These are configured in your [config file](https://docs.sourcebot.dev/docs/configuration/config-file#settings) : | Setting | Default | Description | | --- | --- | --- | | `maxRepoIndexingJobConcurrency` | 8 | Number of repos indexed in parallel | | `maxConnectionSyncJobConcurrency` | 8 | Number of connections synced in parallel | Lowering these values reduces peak resource usage at the cost of slower initial indexing. [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#audit-log-storage) Audit log storage --------------------------------------------------------------------------------------------------- Audit logging is an enterprise feature and is only available with an [enterprise license](https://docs.sourcebot.dev/docs/overview#license-key) . If you are not on an enterprise plan, audit logs are not stored and this section does not apply. [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) are stored in the Postgres database connected to your Sourcebot deployment. Each audit record captures the action performed, the actor, the target, a timestamp, and optional metadata (e.g., request source). There are three database indexes on the audit table to support analytics and lookup queries. **Estimated storage per audit event: ~350 bytes** (including row data and indexes). The table below assumes 50 events per user per day. The actual number depends on usage patterns — each user action (code search, file view, navigation, Ask chat, etc.) creates one audit event. Users who interact via [MCP](https://docs.sourcebot.dev/docs/features/mcp-server) or the API tend to generate significantly more events than web-only users, so your real usage may vary. | Team size | Avg events / user / day | Daily events | Monthly storage | 6-month storage | | --- | --- | --- | --- | --- | | 10 users | 50 | 500 | ~5 MB | ~30 MB | | 50 users | 50 | 2,500 | ~25 MB | ~150 MB | | 100 users | 50 | 5,000 | ~50 MB | ~300 MB | | 500 users | 50 | 25,000 | ~250 MB | ~1.5 GB | | 1,000 users | 50 | 50,000 | ~500 MB | ~3 GB | ### [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#retention-policy) Retention policy By default, audit logs older than **180 days** are automatically pruned daily by a background job. You can adjust this with the `SOURCEBOT_EE_AUDIT_RETENTION_DAYS` [environment variable](https://docs.sourcebot.dev/docs/configuration/environment-variables) . Set it to `0` to disable pruning and retain logs indefinitely. For most deployments, the default 180-day retention keeps database size manageable. If you have a large team with heavy MCP/API usage and need longer retention, plan your Postgres disk allocation accordingly using the estimates above. [​](https://docs.sourcebot.dev/docs/deployment/sizing-guide#monitoring) Monitoring ------------------------------------------------------------------------------------- We recommend monitoring the following metrics after deployment to validate your sizing: * **Memory utilization**: sustained usage near the limit suggests you should scale up memory. High memory usage is expected and healthy since the OS page cache will use available memory. * **CPU utilization**: sustained high CPU during searches (not just during indexing) indicates you may need more cores. * **Disk usage**: monitor disk consumption as you add repositories. Running out of disk will cause indexing failures. * **Search response times**: if searches are consistently slow, try increasing memory first, then CPU. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/deployment/sizing-guide.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/deployment/sizing-guide) [Kubernetes (Helm)\ \ Previous](https://docs.sourcebot.dev/docs/deployment/k8s) [Architecture Overview\ \ Next](https://docs.sourcebot.dev/docs/deployment/infrastructure/architecture) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Permission syncing - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/permission-syncing#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Features Permission syncing [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Overview](https://docs.sourcebot.dev/docs/features/permission-syncing#overview) * [Platform support](https://docs.sourcebot.dev/docs/features/permission-syncing#platform-support) * [Getting started](https://docs.sourcebot.dev/docs/features/permission-syncing#getting-started) * [GitHub](https://docs.sourcebot.dev/docs/features/permission-syncing#github) * [GitLab](https://docs.sourcebot.dev/docs/features/permission-syncing#gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-data-center) * [Manually refreshing permissions](https://docs.sourcebot.dev/docs/features/permission-syncing#manually-refreshing-permissions) * [Overriding enforcement per connection](https://docs.sourcebot.dev/docs/features/permission-syncing#overriding-enforcement-per-connection) * [How it works](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. [​](https://docs.sourcebot.dev/docs/features/permission-syncing#overview) Overview ===================================================================================== Permission syncing allows you to sync Access Permission Lists (ACLs) from a code host to Sourcebot. When configured, users signed into Sourcebot will only be able to access repositories that they have access to on the code host. Practically, this means: * Code Search results will only include repositories that the user has access to. * Code navigation results will only include repositories that the user has access to. * MCP results will only include results from repositories the user has access to. * Ask Sourcebot (and the underlying LLM) will only have access to repositories that the user has access to. * File browsing is scoped to the repositories that the user has access to. Permission syncing can be enabled by setting the `PERMISSION_SYNC_ENABLED` environment variable to `true`. docker run \ -e PERMISSION_SYNC_ENABLED=true \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest Enabling permission syncing on an **existing** deployment may result in errors that look like **“User does not have an OAuth access token…”**. This is because the OAuth access token associated with the user’s existing account does not have the correct scopes necessary for permission syncing. To fix, have the user re-authenticate to refresh their access token by either logging out of Sourcebot and logging in again or unlinking and re-linking their account. [​](https://docs.sourcebot.dev/docs/features/permission-syncing#platform-support) Platform support ----------------------------------------------------------------------------------------------------- We are actively working on supporting more code hosts. If you’d like to see a specific code host supported, please [reach out](https://www.sourcebot.dev/contact) . | Platform | Permission syncing | | --- | --- | | [GitHub (GHEC & GHEC Server)](https://docs.sourcebot.dev/docs/features/permission-syncing#github) | ✅ | | [GitLab (Self-managed & Cloud)](https://docs.sourcebot.dev/docs/features/permission-syncing#gitlab) | ✅ | | [Bitbucket Cloud](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-cloud) | 🟠 Partial | | [Bitbucket Data Center](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-data-center) | 🟠 Partial | | Azure DevOps Cloud | 🛑 | | Azure DevOps Server | 🛑 | | Gitea | 🛑 | | Gerrit | 🛑 | | Generic git host | 🛑 | [​](https://docs.sourcebot.dev/docs/features/permission-syncing#getting-started) Getting started =================================================================================================== ### [​](https://docs.sourcebot.dev/docs/features/permission-syncing#github) GitHub Prerequisites: * Configure a [GitHub connection](https://docs.sourcebot.dev/docs/connections/github) . * Configure GitHub as an [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#github) . * **If you are using a self-hosted GitHub instance**, you must also set the `baseUrl` property of the `github` identity provider in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) to the base URL of your GitHub instance (e.g. `https://github.example.com`). Permission syncing works with **GitHub.com**, **GitHub Enterprise Cloud**, and **GitHub Enterprise Server**. For organization-owned repositories, users that have **read-only** access (or above) via the following methods will have their access synced to Sourcebot: * Outside collaborators * Organization members that are direct collaborators * Organization members with access through team memberships * Organization members with access through default organization permissions * Organization owners. **Notes:** * A GitHub [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#github) must be configured to (1) correlate a Sourcebot user with a GitHub user, and (2) to list repositories that the user has access to for [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * OAuth tokens must assume the `repo` scope in order to use the [List repositories for the authenticated user API](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-the-authenticated-user) during [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . Sourcebot **will only** use this token for **reads**. ### [​](https://docs.sourcebot.dev/docs/features/permission-syncing#gitlab) GitLab Prerequisites: * Configure a [GitLab connection](https://docs.sourcebot.dev/docs/connections/gitlab) . * Configure GitLab as an [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#gitlab) . * **If you are using a self-hosted GitLab instance**, you must also set the `baseUrl` property of the `gitlab` identity provider in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) to the base URL of your GitLab instance (e.g. `https://gitlab.example.com`). Permission syncing works with **GitLab Self-managed** and **GitLab Cloud**. Users with **Guest** role or above with membership to a group or project will have their access synced to Sourcebot. Both direct and indirect membership to a group or project will be synced with Sourcebot. For more details, see the [GitLab docs](https://docs.gitlab.com/user/project/members/#membership-types) . **Notes:** * A GitLab [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#gitlab) must be configured to (1) correlate a Sourcebot user with a GitLab user, and (2) to list repositories that the user has access to for [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * OAuth tokens require the `read_api` scope in order to use the [List projects for the authenticated user API](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) during [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * [Internal GitLab projects](https://docs.gitlab.com/user/public_access/#internal-projects-and-groups) are **not** enforced by permission syncing and therefore are visible to all users. Only [private projects](https://docs.gitlab.com/user/public_access/#private-projects-and-groups) are enforced. ### [​](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-cloud) Bitbucket Cloud Prerequisites: * Configure a [Bitbucket Cloud connection](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) . * Configure Bitbucket Cloud as an [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-cloud) . Permission syncing works with **Bitbucket Cloud**. OAuth tokens must assume the `account` and `repository` scopes. **Partial coverage for repo-driven syncing.** Bitbucket Cloud’s [repository user permissions API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-permissions-config-users-get) only returns users who have been **directly and explicitly** granted access to a repository. Users who have access via any of the following are **not** captured by repo-driven syncing: * Membership in a [group that is added to the repository](https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/) * Membership in the [project that contains the repository](https://support.atlassian.com/bitbucket-cloud/docs/configure-project-permissions-for-users-and-groups/) * Membership in a group that is part of a project containing the repository These users **will** still gain access via [user-driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) , which fetches all private repositories accessible to each authenticated user. However, there may be a delay between when a repository is added and when affected users gain access in Sourcebot (up to the `userDrivenPermissionSyncIntervalMs` interval, which defaults to 24 hours).If your workspace relies heavily on group or project-level permissions rather than direct user grants, we recommend reducing the `userDrivenPermissionSyncIntervalMs` interval to limit the window of delay. **Notes:** * A Bitbucket Cloud [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-cloud) must be configured to (1) correlate a Sourcebot user with a Bitbucket Cloud user, and (2) to list repositories that the user has access to for [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * OAuth tokens require the `account` and `repository` scopes. The `repository` scope is required to list private repositories during [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . ### [​](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-data-center) Bitbucket Data Center Prerequisites: * Configure a [Bitbucket Data Center connection](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) . * Configure Bitbucket Data Center as an [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-server) . Permission syncing works with **Bitbucket Data Center**. OAuth tokens must assume the `PUBLIC_REPOS` and `REPO_READ` scopes. **Partial coverage for repo-driven syncing.** Repo-driven syncing only captures users who have been **directly and explicitly** granted access to the repository. Users who have access via any of the following are **not** captured by repo-driven syncing: * Project-level permissions (inherited by all repos in the project) * Group membership These users **will** still gain access via [user-driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) , which fetches all repositories accessible to each authenticated user using the `REPO_READ` scope. However, there may be a delay between when access is granted and when affected users see the repository in Sourcebot (up to the `userDrivenPermissionSyncIntervalMs` interval, which defaults to 24 hours).If your instance relies heavily on project or group-level permissions, we recommend reducing the `userDrivenPermissionSyncIntervalMs` interval to limit the window of delay. **Notes:** * A Bitbucket Data Center [external identity provider](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-server) must be configured to (1) correlate a Sourcebot user with a Bitbucket Data Center user, and (2) to list repositories that the user has access to for [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * The connection token must have **Repository Read** permissions so Sourcebot can read repository-level user permissions for [Repo driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . * OAuth tokens require the `REPO_READ` scope to list accessible repositories during [User driven syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) . [​](https://docs.sourcebot.dev/docs/features/permission-syncing#manually-refreshing-permissions) Manually refreshing permissions =================================================================================================================================== If a user’s permissions have changed and they need access updated immediately (without waiting for the next scheduled sync), they can trigger a manual refresh from the **Linked Accounts** page: 1. Navigate to **Settings → Linked Accounts**. 2. Click the **Connected** button next to the relevant code host account. 3. Select **Refresh Permissions** from the dropdown. ![Linked Accounts - Refresh Permissions](https://mintcdn.com/sourcebot/j5qUGHI8436rhzmJ/images/linked_accounts_refresh_permissions.png?w=2500&fit=max&auto=format&n=j5qUGHI8436rhzmJ&q=85&s=8faf349759055da9102d69c1c8ad99a2) The button will show a spinner while the sync is in progress and display a confirmation once it completes. [​](https://docs.sourcebot.dev/docs/features/permission-syncing#overriding-enforcement-per-connection) Overriding enforcement per connection =============================================================================================================================================== Each [connection](https://docs.sourcebot.dev/docs/connections/overview) supports two flags that control permission enforcement for that connection’s repositories: * **`enforcePermissions`**: Controls whether repository permissions are enforced for the connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. * **`enforcePermissionsForPublicRepos`**: Controls whether repository permissions are enforced for public repositories in the connection. When true, public repositories are only visible to users with a linked account for the connection’s code host. When false, public repositories are visible to all users. Has no effect when `enforcePermissions` is false. Defaults to false. These flags are useful when you want different enforcement behavior across connections. For example, you may want to enforce permissions on an internal GitHub Enterprise connection while leaving a public-facing Gerrit mirror open to all users. Or, you can use `enforcePermissionsForPublicRepos` to restrict public repositories on a Bitbucket connection so that only users who have authenticated with that host can browse them. { "connections": { "my-github": { "type": "github", "enforcePermissions": true }, "my-bitbucket": { "type": "bitbucket", "enforcePermissions": true, "enforcePermissionsForPublicRepos": true }, "my-gerrit": { "type": "gerrit", "url": "https://gerrit.example.com", "enforcePermissions": false } } } The table below shows when permissions are enforced based on the combination of `PERMISSION_SYNC_ENABLED`, `enforcePermissions`, and `enforcePermissionsForPublicRepos`: | `PERMISSION_SYNC_ENABLED` | `enforcePermissions` | `enforcePermissionsForPublicRepos` | Private repos enforced? | Public repos enforced? | | --- | --- | --- | --- | --- | | `true` | `true` | `false` | Yes | No | | `true` | `true` | `true` | Yes | Yes | | `true` | `false` | any | No | No | | `false` | any | any | No | No | [​](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works) How it works ============================================================================================= Permission syncing works by periodically syncing ACLs from the code host(s) to Sourcebot to build an internal mapping between Users and Repositories. This mapping is hydrated in two directions: * **User driven** : fetches the list of all repositories that a given user has access to. * **Repo driven** : fetches the list of all users that have access to a given repository. User driven and repo driven syncing occurs every 24 hours by default. Repo-driven syncing can be disabled independently using the following environment variable: | Environment variable | Default | Description | | --- | --- | --- | | `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` | `true` | Enables/disables repo-driven syncing. | The sync intervals can be configured using the following settings in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : | Setting | Type | Default | Minimum | | --- | --- | --- | --- | | `repoDrivenPermissionSyncIntervalMs` | number | 24 hours | 1 | | `userDrivenPermissionSyncIntervalMs` | number | 24 hours | 1 | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/permission-syncing.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/permission-syncing) [Analytics\ \ Previous](https://docs.sourcebot.dev/docs/features/analytics) [Agents Overview\ \ Next](https://docs.sourcebot.dev/docs/features/agents/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Searching multiple branches and tags - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Code Search Searching multiple branches and tags [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * [Overview](https://docs.sourcebot.dev/docs/features/search/overview) * [Writing search queries](https://docs.sourcebot.dev/docs/features/search/syntax-reference) * [AI Search Assist](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) * [Searching multiple branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) * [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Configuration](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#configuration) * [Search syntax](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#search-syntax) * [Platform support](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#platform-support) By default, only the default branch of a repository is indexed and can be searched. Sourcebot can be configured to index additional branches (or tags) enabling multi-branch search. This is useful for scenarios such as: * Searching across different releases * Searching through feature branches during development * Tracking changes across multiple maintenance branches simultaneously [​](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#configuration) Configuration --------------------------------------------------------------------------------------------------------- Multi-branch indexing is currently limited to 64 branches and tags. Please see [this issue](https://github.com/sourcebot-dev/sourcebot/issues/461) for more details. Multi-branch indexing is configured in the [connection](https://docs.sourcebot.dev/docs/connections/overview) using the `revisions.branches` and `revisions.tags` arrays. Glob patterns are supported. For example: { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "connections": { "my-connection": { "type": "github", // For each of the repositories defined in this connection... "repos": [\ "org/repo1",\ "org/repo2"\ ], // ... index the default branch, as well as... "revisions": { // These branches (if they exist): "branches": [\ // Exact matches\ "dev",\ "staging",\ \ // Glob patterns\ "feature/*" // Matches: feature/auth, feature/ui, etc.\ ], // These tags (if they exist): "tags": [\ // Exact matches\ "v4.0.0-dev",\ \ // Glob patterns\ "v3.*.*", // Matches: v3.0.0, v3.0.1, etc.\ "rc-*" // Matches: rc-1, rc-2, etc.\ ] } } } } For each repo defined in the connection, any branches or tags matching the patterns in `branches` and `tags` array will be indexed. [​](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#search-syntax) Search syntax --------------------------------------------------------------------------------------------------------- To search branches other than the default, the `rev:` prefix can be used followed by the branch (or tag) name: | Example | Explanation | | --- | --- | | `rev:feature/foo repo:A useEffect` | Search for `/useEffect/` on branch `feature/foo` in repo `A` | | `rev:feature/foo useEffect` | Search for `/useEffect/` on branch `feature/foo` across all repos | | `rev:feature/ useEffect` | Search for `/useEffect/` on branches that contain `feature/` across all repos | | `rev:feature/a rev:feature/b foo` | Search for `/foo/` on branches `feature/a` and `feature/b` | | `rev:feature/ -rev:feature/a foo` | Search for `/foo/` on branches that contain `feature/` _except_ for `feature/a` across all repos | To search across **all** branches, `rev:*`: | Example | Explanation | | --- | --- | | `rev:* repo:A "error message"` | Search for `/error message/` across **all** branches in repo `A` | | `rev:* "error message"` | Search for `/error message/` across **all** branches and **all** repos | Additional info: * `refs/heads/` or `refs/tags/` can be included to fully qualify a branch or a tag, respectively. E.g., `rev:refs/heads/foo` will search the branch `foo`, while `rev:refs/tags/foo` will search the tag `foo`. * `rev:` does **not** support regular expressions or glob patterns. It uses a simple `contains` call between the branch name and the pattern. See [here](https://github.com/sourcebot-dev/zoekt/blob/7d1896215eea6f97af66c9549c9ec70436356b51/matchtree.go#L1067) . [​](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#platform-support) Platform support --------------------------------------------------------------------------------------------------------------- | Platform | Multi-branch indexing support | | --- | --- | | GitHub | ✅ | | GitLab | ✅ | | Bitbucket Cloud | ✅ | | Bitbucket Data Center | ✅ | | Gitea | ✅ | | Gerrit | ✅ | | Generic git host | ✅ | Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/search/multi-branch-indexing.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/search/multi-branch-indexing) [AI Search Assist\ \ Previous](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) [Search contexts\ \ Next](https://docs.sourcebot.dev/docs/features/search/search-contexts) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # License key - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/license-key#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration License key [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Activating a license key](https://docs.sourcebot.dev/docs/license-key#activating-a-license-key) * [Feature availability](https://docs.sourcebot.dev/docs/license-key#feature-availability) * [Questions?](https://docs.sourcebot.dev/docs/license-key#questions) If you’d like a trial license, [reach out](https://www.sourcebot.dev/contact) and we’ll send one over within 24 hours All core Sourcebot features are available under the [FSL license](https://github.com/sourcebot-dev/sourcebot/blob/main/LICENSE.md#functional-source-license-version-11-alv2-future-license) . Some additional features require a license key. See the [pricing page](https://www.sourcebot.dev/pricing) for more details. [​](https://docs.sourcebot.dev/docs/license-key#activating-a-license-key) Activating a license key ----------------------------------------------------------------------------------------------------- * * * After purchasing a license key, you can activate it by setting the `SOURCEBOT_EE_LICENSE_KEY` environment variable. docker run \ -e SOURCEBOT_EE_LICENSE_KEY= \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest [​](https://docs.sourcebot.dev/docs/license-key#feature-availability) Feature availability --------------------------------------------------------------------------------------------- * * * | Feature | [FSL](https://github.com/sourcebot-dev/sourcebot/blob/main/LICENSE.md#functional-source-license-version-11-alv2-future-license) | [Enterprise](https://github.com/sourcebot-dev/sourcebot/blob/main/ee/LICENSE) | | --- | --- | --- | | [Search](https://docs.sourcebot.dev/docs/features/search/syntax-reference) | ✅ | ✅ | | [Full code host support](https://docs.sourcebot.dev/docs/connections/overview) | ✅ | ✅ | | [MCP Server](https://docs.sourcebot.dev/docs/features/mcp-server) | ✅ | ✅ | | [Agents](https://docs.sourcebot.dev/docs/features/agents/overview) | ✅ | ✅ | | [Login with credentials](https://docs.sourcebot.dev/docs/configuration/auth/overview) | ✅ | ✅ | | [Login with email codes](https://docs.sourcebot.dev/docs/configuration/auth/overview) | ✅ | ✅ | | [Login with SSO](https://docs.sourcebot.dev/docs/configuration/auth/providers#enterprise-authentication-providers) | 🛑 | ✅ | | [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) | 🛑 | ✅ | | [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) | 🛑 | ✅ | | [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) | 🛑 | ✅ | | [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) | 🛑 | ✅ | | [Analytics](https://docs.sourcebot.dev/docs/features/analytics) | 🛑 | ✅ | | [MCP OAuth](https://docs.sourcebot.dev/docs/features/mcp-server#oauth-2-0) | 🛑 | ✅ | | [Multiple owners](https://docs.sourcebot.dev/docs/configuration/auth/roles-and-permissions#managing-owners) | 🛑 | ✅ | [​](https://docs.sourcebot.dev/docs/license-key#questions) Questions? ------------------------------------------------------------------------ If you have any questions regarding licensing, please [contact us](https://www.sourcebot.dev/contact) . Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/license-key.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/license-key) [FAQ\ \ Previous](https://docs.sourcebot.dev/docs/configuration/auth/faq) [Transactional Email\ \ Next](https://docs.sourcebot.dev/docs/configuration/transactional-emails) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Search contexts - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/search/search-contexts#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Code Search Search contexts [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * [Overview](https://docs.sourcebot.dev/docs/features/search/overview) * [Writing search queries](https://docs.sourcebot.dev/docs/features/search/syntax-reference) * [AI Search Assist](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) * [Searching multiple branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) * [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Example](https://docs.sourcebot.dev/docs/features/search/search-contexts#example) * [Filtering by topic](https://docs.sourcebot.dev/docs/features/search/search-contexts#filtering-by-topic) * [Schema reference](https://docs.sourcebot.dev/docs/features/search/search-contexts#schema-reference) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. A **search context** is a user-defined grouping of repositories that helps focus searches on specific areas of your codebase, like frontend, backend, or infrastructure code. Some example queries using search contexts: * `context:data_engineering userId` - search for `userId` across all repos related to Data Engineering. * `context:k8s ingress` - search for anything related to ingresses in your k8’s configs. * `( context:project1 or context:project2 ) logger\.debug` - search for debug log calls in project1 and project2 Search contexts are defined in the `context` object inside of a [declarative config](https://docs.sourcebot.dev/docs/configuration/declarative-config) . Repositories can be included / excluded from a search context by specifying the repo’s URL in either the `include` array or `exclude` array. Glob patterns are supported. [​](https://docs.sourcebot.dev/docs/features/search/search-contexts#example) Example --------------------------------------------------------------------------------------- Let’s assume we have a GitLab instance hosted at `https://gitlab.example.com` with three top-level groups, `web`, `backend`, and `shared`: web/ ├─ admin_panel/ ├─ customer_portal/ ├─ pipelines/ ├─ ... backend/ ├─ billing_server/ ├─ auth_server/ ├─ db_migrations/ ├─ pipelines/ ├─ ... shared/ ├─ protobufs/ ├─ react/ ├─ pipelines/ ├─ ... To make searching easier, we can create three search contexts in our [config.json](https://docs.sourcebot.dev/docs/configuration/declarative-config) : * `web`: For all frontend-related code * `backend`: For backend services and shared APIs * `pipelines`: For all CI/CD configurations { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "contexts": { "web": { // To include repositories in a search context, // you can reference them... "include": [\ // ... individually by specifying the repo URL.\ "gitlab.example.com/web/admin_panel/core",\ \ \ // ... or as groups using glob patterns. This is\ // particularly useful for including entire "sub-folders"\ // of repositories in one go.\ "gitlab.example.com/web/customer_portal/**",\ "gitlab.example.com/shared/react/**",\ "gitlab.example.com/shared/protobufs/**"\ ], // Same with excluding repositories. "exclude": [\ "gitlab.example.com/web/customer_portal/pipelines",\ "gitlab.example.com/shared/react/hooks/**",\ ], // Optional description of the search context // that surfaces in the UI. "description": "Web related repos." }, "backend": { /* ... specifies backend replated repos ... */}, "pipelines": { /* ... specifies pipeline related repos ... */ } }, "connections": { /* ...connection definitions... */ } } Repository URL details Repo URLs are expected to be formatted without the leading http(s):// prefix. For example: * `github.com/sourcebot-dev/sourcebot` ([link](https://github.com/sourcebot-dev/sourcebot) ) * `gitlab.com/gitlab-org/gitlab` ([link](https://gitlab.com/gitlab-org/gitlab) ) * `chromium.googlesource.com/chromium` ([link](https://chromium-review.googlesource.com/admin/repos/chromium,general) ) Once configured, you can use these contexts in the search bar by prefixing your query with the context name. For example: * `context:web login form` searches for login form code in frontend repositories * `context:backend auth` searches for authentication code in backend services * `context:pipelines deploy` searches for deployment configurations ![Example](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/images/search_contexts_example.png?w=2500&fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=d0ed706b153b37858a2321494063096f) Like other prefixes, contexts can be negated using `-` or combined using `or`: * `-context:web` excludes frontend repositories from results * `( context:web or context:backend )` searches across both frontend and backend code See [this doc](https://docs.sourcebot.dev/docs/features/search/syntax-reference) for more details on the search query syntax. [​](https://docs.sourcebot.dev/docs/features/search/search-contexts#filtering-by-topic) Filtering by topic ------------------------------------------------------------------------------------------------------------- If your repositories are tagged with topics on [GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics) or [GitLab](https://docs.gitlab.com/ee/user/project/topics.html) , you can use `includeTopics` and `excludeTopics` to filter repositories by topic instead of (or in addition to) specifying individual repo URLs. Glob patterns are supported. { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "contexts": { "backend": { "includeTopics": ["backend", "core-*"], "excludeTopics": ["deprecated", "archived-*"], "description": "Active backend services." } }, "connections": { /* ...connection definitions... */ } } `includeTopics` and `excludeTopics` follow the same additive semantics as `include` and `exclude`: * `includeTopics` adds all repos tagged with a matching topic to the context. * `excludeTopics` removes repos tagged with a matching topic from the context. * Both can be freely combined with `include`, `includeConnections`, `exclude`, and `excludeConnections`. Topic matching is case-insensitive, so `"Backend"` matches the pattern `"backend"`. Topics are populated when a connection syncs. If you add topics to your repositories after the last sync, trigger a re-sync for the new topics to take effect. [​](https://docs.sourcebot.dev/docs/features/search/search-contexts#schema-reference) Schema reference --------------------------------------------------------------------------------------------------------- Reference [schemas/v3/searchContext.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/searchContext.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SearchContext", "description": "Search context", "properties": { "include": { "type": "array", "description": "List of repositories to include in the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/**",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "includeConnections": { "type": "array", "description": "List of connections to include in the search context.", "items": { "type": "string" } }, "exclude": { "type": "array", "description": "List of repositories to exclude from the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/sourcebot",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "excludeConnections": { "type": "array", "description": "List of connections to exclude from the search context.", "items": { "type": "string" } }, "includeTopics": { "type": "array", "description": "List of repository topics to include in the search context. Only repositories matching at least one topic are included. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "backend",\ "core-*"\ ]\ ] }, "excludeTopics": { "type": "array", "description": "List of repository topics to exclude from the search context. Repositories matching any of these topics are excluded. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "deprecated",\ "archived-*"\ ]\ ] }, "description": { "type": "string", "description": "Optional description of the search context that surfaces in the UI." } }, "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/search/search-contexts.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/search/search-contexts) [Searching multiple branches and tags\ \ Previous](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) [Overview\ \ Next](https://docs.sourcebot.dev/docs/features/ask/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # External Identity Providers - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/idp#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration External Identity Providers [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Supported External Identity Providers](https://docs.sourcebot.dev/docs/configuration/idp#supported-external-identity-providers) * [GitHub](https://docs.sourcebot.dev/docs/configuration/idp#github) * [GitLab](https://docs.sourcebot.dev/docs/configuration/idp#gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-cloud) * [Bitbucket Server](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-server) * [Google](https://docs.sourcebot.dev/docs/configuration/idp#google) * [Okta](https://docs.sourcebot.dev/docs/configuration/idp#okta) * [Keycloak](https://docs.sourcebot.dev/docs/configuration/idp#keycloak) * [Microsoft Entra ID (Azure AD)](https://docs.sourcebot.dev/docs/configuration/idp#microsoft-entra-id-azure-ad) * [Authentik](https://docs.sourcebot.dev/docs/configuration/idp#authentik) * [JumpCloud](https://docs.sourcebot.dev/docs/configuration/idp#jumpcloud) * [Google Cloud IAP](https://docs.sourcebot.dev/docs/configuration/idp#google-cloud-iap) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. You can connect Sourcebot to various **external identity providers** to associate a Sourcebot user with one or more external service accounts (ex. Google, GitHub, etc). External identity providers can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) and/or [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) . They’re defined in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) in the top-level `identityProviders` object: Example config with both google and github identity providers defined { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "github",\ "purpose": "account_linking",\ "accountLinkingRequired": true,\ "clientId": {\ "env": "GITHUB_IDENTITY_PROVIDER_CLIENT_ID"\ },\ "clientSecret": {\ "env": "GITHUB_IDENTITY_PROVIDER_CLIENT_SECRET"\ }\ },\ {\ "provider": "google",\ "clientId": {\ "env": "GOOGLE_IDENTITY_PROVIDER_CLIENT_ID"\ },\ "clientSecret": {\ "env": "GOOGLE_IDENTITY_PROVIDER_CLIENT_SECRET"\ }\ }\ ] } Secret values (such as `clientId` and `clientSecret`) can be provided as environment variables or Google Cloud secrets via [tokens](https://docs.sourcebot.dev/docs/configuration/config-file#tokens) . [​](https://docs.sourcebot.dev/docs/configuration/idp#supported-external-identity-providers) Supported External Identity Providers ===================================================================================================================================== Sourcebot uses [Auth.js](https://authjs.dev/) to connect to external identity providers. If there’s a provider supported by Auth.js that you don’t see below, please submit a [feature request](https://github.com/sourcebot-dev/sourcebot/issues) to have it added. ### [​](https://docs.sourcebot.dev/docs/configuration/idp#github) GitHub [Auth.js GitHub Provider Docs](https://authjs.dev/getting-started/providers/github) A GitHub connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) and/or [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) . This is controlled using the `purpose` field in the GitHub identity provider config.instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an Oauth Client To begin, you must register an Oauth client in GitHub to facilitate the identity provider connection. You can do this by creating a **GitHub App** or a **GitHub OAuth App**. Either one works, but the **GitHub App** is the [recommended mechanism](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps) .The result of registering an OAuth client is a `CLIENT_ID` and `CLIENT_SECRET` which you’ll provide to Sourcebot. * GitHub App * GitHub OAuth App You don’t need to install the app to use it as an external identity provider Follow [this guide](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) to register a new GitHub App.When asked to provide a callback url, provide `/api/auth/callback/github` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/github](https://sourcebot.coolcorp.com/api/auth/callback/github) )Set the following fine-grained permissions in the GitHub App: * `“Email addresses” account permissions (read)` * `"Metadata" repository permissions (read)` (only needed if using permission syncing) Follow [this guide](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) by GitHub to create an OAuth App.When asked to provide a callback url, provide `/api/auth/callback/github` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/github](https://sourcebot.coolcorp.com/api/auth/callback/github) )If [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#github) is enabled, also enable the `repo` scope. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id and secret for your OAuth client you must set them as environment variables. These can be named whatever you like (ex. `GITHUB_IDENTITY_PROVIDER_CLIENT_ID` and `GITHUB_IDENTITY_PROVIDER_CLIENT_SECRET`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id and secret to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "github",\ // "sso" for auth + perm sync, "account_linking" for only perm sync\ "purpose": "account_linking",\ // if purpose == "account_linking" this controls if a user must connect to the IdP\ "accountLinkingRequired": true,\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#gitlab) GitLab [Auth.js GitLab Provider Docs](https://authjs.dev/getting-started/providers/gitlab) A GitLab connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) and/or [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) . This is controlled using the `purpose` field in the GitLab identity provider config.instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Application To begin, you must register an OAuth application in GitLab to facilitate the identity provider connection.Follow [this guide](https://docs.gitlab.com/integration/oauth_provider/) by GitLab to create an OAuth application.When configuring your application: * Set the callback URL to `/api/auth/callback/gitlab` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/gitlab](https://sourcebot.coolcorp.com/api/auth/callback/gitlab) ) * Enable the `read_user` scope * If [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#gitlab) is enabled, also enable the `read_api` scope The result of registering an OAuth application is an `APPLICATION_ID` (`CLIENT_ID`) and `SECRET` (`CLIENT_SECRET`) which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id and secret for your OAuth application you must set them as environment variables. These can be named whatever you like (ex. `GITLAB_IDENTITY_PROVIDER_CLIENT_ID` and `GITLAB_IDENTITY_PROVIDER_CLIENT_SECRET`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id and secret to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "gitlab",\ // "sso" for auth + perm sync, "account_linking" for only perm sync\ "purpose": "account_linking",\ // if purpose == "account_linking" this controls if a user must connect to the IdP\ "accountLinkingRequired": true,\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ },\ // Optional: for self-hosted GitLab instances\ "baseUrl": "https://gitlab.example.com"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-cloud) Bitbucket Cloud [Auth.js Bitbucket Provider Docs](https://authjs.dev/getting-started/providers/bitbucket) A Bitbucket Cloud connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) and/or [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) . This is controlled using the `purpose` field in the Bitbucket Cloud identity provider config.instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Consumer To begin, you must register an OAuth consumer in Bitbucket to facilitate the identity provider connection.Navigate to your Bitbucket workspace settings at `https://bitbucket.org//workspace/settings/api` and create a new **OAuth consumer** under the **OAuth consumers** section.When configuring your consumer: * Set the callback URL to `/api/auth/callback/bitbucket-cloud` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/bitbucket-cloud](https://sourcebot.coolcorp.com/api/auth/callback/bitbucket-cloud) ) * Enable **Account: Read** * If [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-cloud) is enabled, also enable **Repositories: Read** The result of creating an OAuth consumer is a `Key` (`CLIENT_ID`) and `Secret` (`CLIENT_SECRET`) which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id and secret for your OAuth consumer you must set them as environment variables. These can be named whatever you like (ex. `BITBUCKET_CLOUD_IDENTITY_PROVIDER_CLIENT_ID` and `BITBUCKET_CLOUD_IDENTITY_PROVIDER_CLIENT_SECRET`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id and secret to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "bitbucket-cloud",\ // "sso" for auth + perm sync, "account_linking" for only perm sync\ "purpose": "account_linking",\ // if purpose == "account_linking" this controls if a user must connect to the IdP\ "accountLinkingRequired": true,\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#bitbucket-server) Bitbucket Server A Bitbucket Server (Data Center) connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) and/or [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) . This is controlled using the `purpose` field in the Bitbucket Server identity provider config.instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth 2.0 Application To begin, you must register an OAuth 2.0 application in your Bitbucket Server instance to facilitate the identity provider connection.In your Bitbucket Server admin panel, navigate to **Administration → Application Links** and create a new incoming external application link.When configuring your application: * Set the redirect URL to `/api/auth/callback/bitbucket-server` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/bitbucket-server](https://sourcebot.coolcorp.com/api/auth/callback/bitbucket-server) ) * If [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#bitbucket-data-center) is enabled, also enable the `REPO_READ` scope The result of creating the application is a `CLIENT_ID` and `CLIENT_SECRET` which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id and secret for your OAuth application you must set them as environment variables. These can be named whatever you like (ex. `BITBUCKET_SERVER_IDENTITY_PROVIDER_CLIENT_ID` and `BITBUCKET_SERVER_IDENTITY_PROVIDER_CLIENT_SECRET`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id, client secret, and your Bitbucket Server base URL to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "bitbucket-server",\ // "sso" for auth + perm sync, "account_linking" for only perm sync\ "purpose": "account_linking",\ // if purpose == "account_linking" this controls if a user must connect to the IdP\ "accountLinkingRequired": true,\ "baseUrl": "https://bitbucket.example.com",\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#google) Google [Auth.js Google Provider Docs](https://authjs.dev/getting-started/providers/google) A Google connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) .instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Client To begin, you must register an OAuth client in Google Cloud Console to facilitate the identity provider connection.Follow [this guide](https://support.google.com/cloud/answer/6158849) by Google to create OAuth 2.0 credentials.When configuring your OAuth client: * Set the application type to “Web application” * Add `/api/auth/callback/google` to the authorized redirect URIs (ex. [https://sourcebot.coolcorp.com/api/auth/callback/google](https://sourcebot.coolcorp.com/api/auth/callback/google) ) The result of creating OAuth credentials is a `CLIENT_ID` and `CLIENT_SECRET` which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id and secret for your OAuth client you must set them as environment variables. These can be named whatever you like (ex. `GOOGLE_IDENTITY_PROVIDER_CLIENT_ID` and `GOOGLE_IDENTITY_PROVIDER_CLIENT_SECRET`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id and secret to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "google",\ "purpose": "sso",\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#okta) Okta [Auth.js Okta Provider Docs](https://authjs.dev/getting-started/providers/okta) An Okta connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) .instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Application To begin, you must register an OAuth application in Okta to facilitate the identity provider connection.Follow [this guide](https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/) by Okta to create an OAuth application.When configuring your application: * Set the application type to “Web Application” * Add `/api/auth/callback/okta` to the sign-in redirect URIs (ex. [https://sourcebot.coolcorp.com/api/auth/callback/okta](https://sourcebot.coolcorp.com/api/auth/callback/okta) ) The result of creating an OAuth application is a `CLIENT_ID`, `CLIENT_SECRET`, and `ISSUER` URL which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id, client secret, and issuer for your OAuth application you must set them as environment variables. These can be named whatever you like (ex. `OKTA_IDENTITY_PROVIDER_CLIENT_ID`, `OKTA_IDENTITY_PROVIDER_CLIENT_SECRET`, and `OKTA_IDENTITY_PROVIDER_ISSUER`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id, client secret, and issuer to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "okta",\ "purpose": "sso",\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ },\ "issuer": {\ "env": "YOUR_ISSUER_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#keycloak) Keycloak [Auth.js Keycloak Provider Docs](https://authjs.dev/getting-started/providers/keycloak) A Keycloak connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) .instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Client To begin, you must register an OAuth client in Keycloak to facilitate the identity provider connection.Follow [this guide](https://www.keycloak.org/docs/latest/server_admin/#_oidc_clients) by Keycloak to create an OpenID Connect client.When configuring your client: * Set the client protocol to “openid-connect” * Set the access type to “confidential” * Add `/api/auth/callback/keycloak` to the valid redirect URIs (ex. [https://sourcebot.coolcorp.com/api/auth/callback/keycloak](https://sourcebot.coolcorp.com/api/auth/callback/keycloak) ) The result of creating an OAuth client is a `CLIENT_ID`, `CLIENT_SECRET`, and an `ISSUER` URL (typically in the format `https:///realms/`) which you’ll provide to Sourcebot. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id, client secret, and issuer for your OAuth client you must set them as environment variables. These can be named whatever you like (ex. `KEYCLOAK_IDENTITY_PROVIDER_CLIENT_ID`, `KEYCLOAK_IDENTITY_PROVIDER_CLIENT_SECRET`, and `KEYCLOAK_IDENTITY_PROVIDER_ISSUER`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id, client secret, and issuer to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "keycloak",\ "purpose": "sso",\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ },\ "issuer": {\ "env": "YOUR_ISSUER_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#microsoft-entra-id-azure-ad) Microsoft Entra ID (Azure AD) [Auth.js Microsoft Entra ID Provider Docs](https://authjs.dev/getting-started/providers/microsoft-entra-id) A Microsoft Entra ID connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) . Microsoft renamed Azure Active Directory (Azure AD) to Microsoft Entra ID in 2023. If you have an existing Azure AD setup, these instructions will work for you. The underlying authentication infrastructure is the same. instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Register an OAuth Application To begin, you must register an OAuth application in Microsoft Entra ID (formerly Azure Active Directory) to facilitate the identity provider connection.Follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) by Microsoft to register an application.When configuring your application: * Under “Authentication”, add a platform and select “Web” * Set the redirect URI to `/api/auth/callback/microsoft-entra-id` (ex. [https://sourcebot.coolcorp.com/api/auth/callback/microsoft-entra-id](https://sourcebot.coolcorp.com/api/auth/callback/microsoft-entra-id) ) * Under “Certificates & secrets”, create a new client secret The result of registering an application is a `CLIENT_ID` (Application ID), `CLIENT_SECRET`, and `TENANT_ID` which you’ll use to construct the issuer URL. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables To provide Sourcebot the client id, client secret, and issuer for your OAuth application you must set them as environment variables. These can be named whatever you like (ex. `MICROSOFT_ENTRA_ID_IDENTITY_PROVIDER_CLIENT_ID`, `MICROSOFT_ENTRA_ID_IDENTITY_PROVIDER_CLIENT_SECRET`, and `MICROSOFT_ENTRA_ID_IDENTITY_PROVIDER_ISSUER`)The issuer URL should be in the format: `https://login.microsoftonline.com//v2.0` 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Finally, pass the client id, client secret, and issuer to Sourcebot by defining a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) : { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "microsoft-entra-id",\ "purpose": "sso",\ "clientId": {\ "env": "YOUR_CLIENT_ID_ENV_VAR"\ },\ "clientSecret": {\ "env": "YOUR_CLIENT_SECRET_ENV_VAR"\ },\ "issuer": {\ "env": "YOUR_ISSUER_ENV_VAR"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#authentik) Authentik [Auth.js Authentik Provider Docs](https://authjs.dev/getting-started/providers/authentik) An Authentik connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) .instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Create a OAuth2/OpenID Connect application To begin, you must create a OAuth2/OpenID Connect application in Authentik. For more information, see the [Authentik documentation](https://docs.goauthentik.io/add-secure-apps/applications/manage_apps/#create-an-application-and-provider-pair) .When configuring your application: * Set the provider type to “OAuth2/OpenID Connect” * Set the client type to “Confidential” * Add `/api/auth/callback/authentik` to the redirect URIs (ex. [https://sourcebot.coolcorp.com/api/auth/callback/authentik](https://sourcebot.coolcorp.com/api/auth/callback/authentik) ) After creating the application, open the application details to obtain the client id, client secret, and issuer URL (typically in the format `https:///application/o//`). 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables The client id, secret, and issuer URL are provided to Sourcebot via environment variables. These can be named whatever you like (ex. `AUTHENTIK_IDENTITY_PROVIDER_CLIENT_ID`, `AUTHENTIK_IDENTITY_PROVIDER_CLIENT_SECRET`, and `AUTHENTIK_IDENTITY_PROVIDER_ISSUER`) 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Create a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) with the following fields: { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "authentik",\ "purpose": "sso",\ "clientId": {\ "env": "AUTHENTIK_IDENTITY_PROVIDER_CLIENT_ID"\ },\ "clientSecret": {\ "env": "AUTHENTIK_IDENTITY_PROVIDER_CLIENT_SECRET"\ },\ "issuer": {\ "env": "AUTHENTIK_IDENTITY_PROVIDER_ISSUER"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#jumpcloud) JumpCloud A JumpCloud connection can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) . JumpCloud supports OIDC (OpenID Connect), which Sourcebot uses to authenticate users.instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Create an SSO Application in JumpCloud To begin, you must create an SSO application in JumpCloud to facilitate the identity provider connection. For more information, see the [JumpCloud OIDC documentation](https://jumpcloud.com/support/sso-with-oidc) .When configuring your application: * Set the SSO type to “OIDC” * Set the **Token Endpoint Authentication Method** to `client_secret_basic`. JumpCloud defaults to `client_secret_post`, but Sourcebot requires `client_secret_basic`. * Add `/api/auth/callback/jumpcloud` to the redirect URIs (ex. [https://sourcebot.coolcorp.com/api/auth/callback/jumpcloud](https://sourcebot.coolcorp.com/api/auth/callback/jumpcloud) ) * Set the login URL to `/login` After creating the application, note the `CLIENT_ID` and `CLIENT_SECRET`. The issuer URL is typically `https://oauth.id.jumpcloud.com`. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables The client id, secret, and issuer URL are provided to Sourcebot via environment variables. These can be named whatever you like (ex. `JUMPCLOUD_IDENTITY_PROVIDER_CLIENT_ID`, `JUMPCLOUD_IDENTITY_PROVIDER_CLIENT_SECRET`, and `JUMPCLOUD_IDENTITY_PROVIDER_ISSUER`)You must also set the `AUTH_SECRET` environment variable. Generate one with `openssl rand -base64 33` and pass it to your Sourcebot deployment. While `AUTH_SECRET` is auto-generated if not provided, it must be explicitly set for SSO to work reliably across restarts. 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Create a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) with the following fields: { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "jumpcloud",\ "purpose": "sso",\ "clientId": {\ "env": "JUMPCLOUD_IDENTITY_PROVIDER_CLIENT_ID"\ },\ "clientSecret": {\ "env": "JUMPCLOUD_IDENTITY_PROVIDER_CLIENT_SECRET"\ },\ "issuer": {\ "env": "JUMPCLOUD_IDENTITY_PROVIDER_ISSUER"\ }\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/idp#google-cloud-iap) Google Cloud IAP [Google Cloud IAP Documentation](https://cloud.google.com/iap/docs) Google Cloud Identity-Aware Proxy (IAP) can be used for [authentication](https://docs.sourcebot.dev/docs/configuration/auth) . IAP provides a layer of security for applications deployed on Google Cloud, allowing you to control access based on user identity and context. GCP IAP works differently from other identity providers. Instead of redirecting users to an OAuth flow, IAP intercepts requests at the infrastructure level and adds a signed JWT header that Sourcebot validates. This means users are automatically authenticated when accessing Sourcebot through an IAP-protected endpoint. instructions 1 [](https://docs.sourcebot.dev/docs/configuration/idp#) Enable IAP for your application Your Sourcebot deployment must be behind Google Cloud IAP. Follow [this guide](https://cloud.google.com/iap/docs/enabling-on-premises-howto) by Google to enable IAP for your application.After enabling IAP, note the **Signed Header JWT Audience**. You can find this in the Google Cloud Console under **Security → Identity-Aware Proxy → (your application) → Edit OAuth Client → Application settings**.The audience will be in the format: `/projects//global/backendServices/` or `/projects//apps/`. 2 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define environment variables Set the IAP audience as an environment variable. This can be named whatever you like (ex. `GCP_IAP_AUDIENCE`). 3 [](https://docs.sourcebot.dev/docs/configuration/idp#) Define the identity provider config Create a `identityProvider` object in the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) with the following fields: { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "identityProviders": [\ {\ "provider": "gcp-iap",\ "purpose": "sso",\ "audience": {\ "env": "GCP_IAP_AUDIENCE"\ }\ }\ ] } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/idp.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/idp) [Language Model Providers\ \ Previous](https://docs.sourcebot.dev/docs/configuration/language-model-providers) [Overview\ \ Next](https://docs.sourcebot.dev/docs/configuration/auth/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Environment variables - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/environment-variables#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration Environment variables [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Core Environment Variables](https://docs.sourcebot.dev/docs/configuration/environment-variables#core-environment-variables) * [Review Agent Environment Variables](https://docs.sourcebot.dev/docs/configuration/environment-variables#review-agent-environment-variables) * [Overriding environment variables from the config](https://docs.sourcebot.dev/docs/configuration/environment-variables#overriding-environment-variables-from-the-config) This page provides a detailed reference of all environment variables supported by Sourcebot. If you’re just looking to get up and running, we recommend starting with the [deployment guides](https://docs.sourcebot.dev/docs/deployment/docker-compose) instead. ### [​](https://docs.sourcebot.dev/docs/configuration/environment-variables#core-environment-variables) Core Environment Variables The following environment variables allow you to configure your Sourcebot deployment. | Variable | Default | Description | | --- | --- | --- | | `AUTH_CREDENTIALS_LOGIN_ENABLED` | `true` | Enables/disables authentication with basic credentials. Username and passwords are stored encrypted at rest within the postgres database. Checkout the [auth docs](https://docs.sourcebot.dev/docs/configuration/auth/overview)
for more info | | `AUTH_EMAIL_CODE_LOGIN_ENABLED` | `false` | Enables/disables authentication with a login code that’s sent to a users email. `SMTP_CONNECTION_URL` and `EMAIL_FROM_ADDRESS` must also be set. Checkout the [auth docs](https://docs.sourcebot.dev/docs/configuration/auth/overview)
for more info | | `AUTH_SECRET` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 33` | Used to validate login session cookies | | `AUTH_URL` | \- | URL of your Sourcebot deployment, e.g., `https://example.com` or `http://localhost:3000`. | | `CONFIG_PATH` | `-` | The container relative path to the declarative configuration file. See [this doc](https://docs.sourcebot.dev/docs/configuration/declarative-config)
for more info. | | `DATA_CACHE_DIR` | `$DATA_DIR/.sourcebot` | The root data directory in which all data written to disk by Sourcebot will be located. | | `DATA_DIR` | `/data` | The directory within the container to store all persistent data. Typically, this directory will be volume mapped such that data is persisted across container restarts (e.g., `docker run -v $(pwd):/data`) | | `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` | The data directory for the default Postgres database. | | `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` | Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.

If you’d like to use a non-default schema, you can provide it as a parameter in the database url.

You can also use `DATABASE_HOST`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE_NAME`, and `DATABASE_ARGS` to construct the database url. | | `EMAIL_FROM_ADDRESS` | `-` | The email address that transactional emails will be sent from. See [this doc](https://docs.sourcebot.dev/docs/configuration/transactional-emails)
for more info. | | `FORCE_ENABLE_ANONYMOUS_ACCESS` | `false` | When enabled, [anonymous access](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#anonymous-access)
to the organization will always be enabled | | `REQUIRE_APPROVAL_NEW_MEMBERS` | \- | When set, controls whether new users require approval before accessing your deployment. If not set, the setting can be configured via the UI. See [member approval](https://docs.sourcebot.dev/docs/configuration/auth/access-settings#member-approval)
for more info. | | `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` | The data directory for the default Redis instance. | | `REDIS_URL` | `redis://localhost:6379` | Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.

To enable TLS, see [this doc](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis#tls)
. | | `REDIS_REMOVE_ON_COMPLETE` | `0` | Controls how many completed jobs are allowed to remain in Redis queues | | `REDIS_REMOVE_ON_FAIL` | `100` | Controls how many failed jobs are allowed to remain in Redis queues | | `REPO_SYNC_RETRY_BASE_SLEEP_SECONDS` | `60` | The base sleep duration (in seconds) for exponential backoff when retrying repository sync operations that fail | | `GITLAB_CLIENT_QUERY_TIMEOUT_SECONDS` | `600` | The timeout duration (in seconds) for GitLab client queries | | `SMTP_CONNECTION_URL` | `-` | The url to the SMTP service used for sending transactional emails. See [this doc](https://docs.sourcebot.dev/docs/configuration/transactional-emails)
for more info.

You can also use `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, and `SMTP_PASSWORD` to construct the SMTP connection url. | | `SMTP_HOST` | `-` | The hostname of the SMTP server. Used to construct `SMTP_CONNECTION_URL` when individual SMTP variables are provided. | | `SMTP_PORT` | `-` | The port of the SMTP server. | | `SMTP_USERNAME` | `-` | The username for SMTP authentication. | | `SMTP_PASSWORD` | `-` | The password for SMTP authentication. | | `SOURCEBOT_ENCRYPTION_KEY` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 24` | Used to encrypt connection secrets and generate API keys. | | `SOURCEBOT_PUBLIC_KEY_PATH` | `/app/public.pem` | Sourcebot’s public key that’s used to verify encrypted license key signatures. | | `SOURCEBOT_LOG_LEVEL` | `info` | The Sourcebot logging level. Valid values are `debug`, `info`, `warn`, `error`, in order of severity. | | `SOURCEBOT_STRUCTURED_LOGGING_ENABLED` | `false` | Enables/disable structured JSON logging. See [this doc](https://docs.sourcebot.dev/docs/configuration/structured-logging)
for more info. | | `SOURCEBOT_STRUCTURED_LOGGING_FILE` | \- | Optional file to log to if structured logging is enabled | | `SOURCEBOT_TELEMETRY_DISABLED` | `false` | Enables/disables telemetry collection in Sourcebot. See [this doc](https://docs.sourcebot.dev/docs/overview#telemetry)
for more info. | | `DEFAULT_MAX_MATCH_COUNT` | `10000` | The default maximum number of search results to return when using search in the web app. | | `ALWAYS_INDEX_FILE_PATTERNS` | \- | A comma separated list of glob patterns matching file paths that should always be indexed, regardless of size or number of trigrams. | | `NODE_USE_ENV_PROXY` | `0` | Enables Node.js to automatically use `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables for network requests. Set to `1` to enable or `0` to disable. See [this doc](https://nodejs.org/en/learn/http/enterprise-network-configuration)
for more info. | | `HTTP_PROXY` | \- | HTTP proxy URL for routing non-SSL requests through a proxy server (e.g., `http://proxy.company.com:8080`). Requires `NODE_USE_ENV_PROXY=1`. | | `HTTPS_PROXY` | \- | HTTPS proxy URL for routing SSL requests through a proxy server (e.g., `http://proxy.company.com:8080`). Requires `NODE_USE_ENV_PROXY=1`. | | `NO_PROXY` | \- | Comma-separated list of hostnames or domains that should bypass the proxy (e.g., `localhost,127.0.0.1,.internal.domain`). Requires `NODE_USE_ENV_PROXY=1`. | | `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` | `true` | Enables/disables audit logging | | `SOURCEBOT_EE_AUDIT_RETENTION_DAYS` | `180` | The number of days to retain audit logs. Audit log records older than this will be automatically pruned daily. Set to `0` to disable pruning and retain logs indefinitely. | | `AUTH_EE_GCP_IAP_ENABLED` | `false` | When enabled, allows Sourcebot to automatically register/login from a successful GCP IAP redirect | | `AUTH_EE_GCP_IAP_AUDIENCE` | \- | The GCP IAP audience to use when verifying JWT tokens. Must be set to enable GCP IAP JIT provisioning | | `PERMISSION_SYNC_ENABLED` | `false` | Enables [permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing)
. | | `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` | `true` | Enables/disables [repo-driven permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing#how-it-works)
. Only applies when `PERMISSION_SYNC_ENABLED` is `true`. | | `EXPERIMENT_EE_PERMISSION_SYNC_ENABLED` **(deprecated)** | `false` | Deprecated. Use `PERMISSION_SYNC_ENABLED` instead. | | `AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING` | `true` | When enabled, different SSO accounts with the same email address will automatically be linked. | | `DISABLE_API_KEY_CREATION_FOR_NON_OWNER_USERS` | `false` | When enabled, only organization owners can create API keys. Non-owner members will receive a `403` error if they attempt to create one. | | `EXPERIMENT_DISABLE_API_KEY_CREATION_FOR_NON_ADMIN_USERS` **(deprecated)** | `false` | Deprecated. Use `DISABLE_API_KEY_CREATION_FOR_NON_OWNER_USERS` instead. | | `DISABLE_API_KEY_USAGE_FOR_NON_OWNER_USERS` | `false` | When enabled, only organization owners can create or use API keys. Non-owner members will receive a `403` error if they attempt to create or authenticate with an API key. If you only want to restrict creation (not usage), use `DISABLE_API_KEY_CREATION_FOR_NON_OWNER_USERS` instead. | ### [​](https://docs.sourcebot.dev/docs/configuration/environment-variables#review-agent-environment-variables) Review Agent Environment Variables | Variable | Default | Description | | --- | --- | --- | | `GITHUB_REVIEW_AGENT_APP_ID` | `-` | The GitHub App ID used for review agent authentication. | | `GITHUB_REVIEW_AGENT_APP_PRIVATE_KEY_PATH` | `-` | The container relative path to the private key file for the GitHub App used by the review agent. | | `GITHUB_REVIEW_AGENT_APP_WEBHOOK_SECRET` | `-` | The webhook secret for the GitHub App used by the review agent. | | `OPENAI_API_KEY` | `-` | The OpenAI API key used by the review agent. | | `REVIEW_AGENT_API_KEY` | `-` | The Sourcebot API key used by the review agent. | | `REVIEW_AGENT_AUTO_REVIEW_ENABLED` | `false` | Enables/disables automatic code reviews by the review agent. | | `REVIEW_AGENT_LOGGING_ENABLED` | `true` | Enables/disables logging for the review agent. Logs are saved in `DATA_CACHE_DIR/review-agent` | | `REVIEW_AGENT_REVIEW_COMMAND` | `review` | The command used to trigger a code review by the review agent. | ### [​](https://docs.sourcebot.dev/docs/configuration/environment-variables#overriding-environment-variables-from-the-config) Overriding environment variables from the config You can override environment variables from the config file by using the `environmentOverrides` property. See [this doc](https://docs.sourcebot.dev/docs/configuration/config-file#overriding-environment-variables-from-the-config) for more info. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/environment-variables.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/environment-variables) [Config File\ \ Previous](https://docs.sourcebot.dev/docs/configuration/config-file) [Overview\ \ Next](https://docs.sourcebot.dev/docs/connections/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Local Git repositories - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/local-repos#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Local Git repositories [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Getting Started](https://docs.sourcebot.dev/docs/connections/local-repos#getting-started) * [Examples](https://docs.sourcebot.dev/docs/connections/local-repos#examples) * [Optimizing git operations](https://docs.sourcebot.dev/docs/connections/local-repos#optimizing-git-operations) * [Schema reference](https://docs.sourcebot.dev/docs/connections/local-repos#schema-reference) Sourcebot can sync code from generic git repositories stored in a local directory. This can be helpful in scenarios where you already have a large number of repos already checked out. Local repositories are treated as **read-only**, meaning Sourcebot will **not** `git fetch` new revisions. If you’re not familiar with Sourcebot [connections](https://docs.sourcebot.dev/docs/connections/overview) , please read that overview first. [​](https://docs.sourcebot.dev/docs/connections/local-repos#getting-started) Getting Started ----------------------------------------------------------------------------------------------- Only folders containing git repositories at their root **and** have a `remote.origin.url` set in their git config are supported at this time. All other folders will be skipped. Let’s assume we have a `repos` directory located at `$(PWD)` with a collection of git repositories: repos/ ├─ repo_1/ ├─ repo_2/ ├─ repo_3/ ├─ ... To get Sourcebot to index these repositories: 1 [](https://docs.sourcebot.dev/docs/connections/local-repos#) Mount a volume We need to mount a docker volume to the `repos` directory so Sourcebot can read it’s contents. Sourcebot will **not** write to local repositories, so we can mount a separate **read-only** volume: docker run \ -v $(pwd)/repos:/repos:ro \ /* additional args */ \ ghcr.io/sourcebot-dev/sourcebot:latest 2 [](https://docs.sourcebot.dev/docs/connections/local-repos#) Create a connection We can now create a new git [connection](https://docs.sourcebot.dev/docs/connections/overview) , specifying local paths with the `file://` prefix. Glob patterns are supported. For example: { "type": "git", "url": "file:///repos/*" } Sourcebot will expand this glob pattern into paths `/repos/repo_1`, `/repos/repo_2`, etc. and index all valid git repositories. [​](https://docs.sourcebot.dev/docs/connections/local-repos#examples) Examples --------------------------------------------------------------------------------- Sync individual repo { "type": "git", "url": "file:///path/to/git_repo" } Sync multiple repos using glob patterns // Attempt to sync directories contained in `repos/` (non-recursive) { "type": "git", "url": "file:///repos/*" } [​](https://docs.sourcebot.dev/docs/connections/local-repos#optimizing-git-operations) Optimizing git operations ------------------------------------------------------------------------------------------------------------------- Sourcebot performs a number of operations that require traversing a repository’s entire commit history (e.g., `git rev-list --count HEAD`). These operations can be slow in repositories with a large number of commits. Typically, a [commit graph](https://git-scm.com/docs/commit-graph) is generated to speed up these operations (see [#791](https://github.com/sourcebot-dev/sourcebot/pull/791) ). However, since local repositories are treated as read-only, Sourcebot **will not** generate a commit graph for them. A commit graph can be manually generated by running the following command in the repository’s root directory: git commit-graph write --reachable The commit graph can be updated when fetching with `--write-commit-graph`: git fetch --write-commit-graph [​](https://docs.sourcebot.dev/docs/connections/local-repos#schema-reference) Schema reference ------------------------------------------------------------------------------------------------- Reference [schemas/v3/genericGitHost.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/genericGitHost.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "GenericGitHostConnectionConfig", "properties": { "type": { "const": "git", "description": "Generic Git host configuration" }, "url": { "type": "string", "format": "url", "description": "The URL to the git repository. This can either be a remote URL (prefixed with `http://` or `https://`) or a absolute path to a directory on the local machine (prefixed with `file://`). If a local directory is specified, it must point to the root of a git repository. Local directories are treated as read-only modified. Local directories support glob patterns.", "pattern": "^(https?:\\/\\/[^\\s/$.?#].[^\\s]*|file:\\/\\/\\/[^\\s]+)$", "examples": [\ "https://github.com/sourcebot-dev/sourcebot",\ "file:///path/to/repo",\ "file:///repos/*"\ ] }, "revisions": { "type": "object", "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.", "properties": { "branches": { "type": "array", "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.", "items": { "type": "string" }, "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ], "default": [] }, "tags": { "type": "array", "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.", "items": { "type": "string" }, "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ], "default": [] } }, "additionalProperties": false }, "enforcePermissions": { "type": "boolean", "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing" }, "enforcePermissionsForPublicRepos": { "type": "boolean", "default": false, "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing" } }, "required": [\ "type",\ "url"\ ], "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/local-repos.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/local-repos) [Other Git hosts\ \ Previous](https://docs.sourcebot.dev/docs/connections/generic-git-host) [Request another code host\ \ Next](https://docs.sourcebot.dev/docs/connections/request-new) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Analytics - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/analytics#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Features Analytics [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Overview](https://docs.sourcebot.dev/docs/features/analytics#overview) * [Global](https://docs.sourcebot.dev/docs/features/analytics#global) * [Active Users](https://docs.sourcebot.dev/docs/features/analytics#active-users) * [Web App](https://docs.sourcebot.dev/docs/features/analytics#web-app) * [Web Active Users](https://docs.sourcebot.dev/docs/features/analytics#web-active-users) * [Web Activity](https://docs.sourcebot.dev/docs/features/analytics#web-activity) * [API](https://docs.sourcebot.dev/docs/features/analytics#api) * [API Active Users](https://docs.sourcebot.dev/docs/features/analytics#api-active-users) * [API Requests](https://docs.sourcebot.dev/docs/features/analytics#api-requests) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. [​](https://docs.sourcebot.dev/docs/features/analytics#overview) Overview ---------------------------------------------------------------------------- Analytics provides comprehensive insights into your organization’s usage of Sourcebot, helping you understand adoption patterns and quantify the value of time saved. This dashboard is backed by [audit log](https://docs.sourcebot.dev/docs/configuration/audit-logs) events. Please ensure you have audit logging enabled in order to see these insights. Analytics data is subject to the audit log [retention policy](https://docs.sourcebot.dev/docs/configuration/audit-logs#retention-policy) . By default, data older than 180 days is automatically pruned. The analytics dashboard segments usage by source so you can understand how your team interacts with Sourcebot across different interfaces. Each chart supports daily, weekly, and monthly time periods. [​](https://docs.sourcebot.dev/docs/features/analytics#global) Global ------------------------------------------------------------------------ ### [​](https://docs.sourcebot.dev/docs/features/analytics#active-users) Active Users Tracks the number of unique users who performed any tracked action across all sources (web app, MCP, and API). This includes code searches, navigations, Ask chats, file views, and tree browsing. Web repo listings are excluded to reduce noise from passive page loads. [​](https://docs.sourcebot.dev/docs/features/analytics#web-app) Web App -------------------------------------------------------------------------- Metrics from the Sourcebot web interface. ### [​](https://docs.sourcebot.dev/docs/features/analytics#web-active-users) Web Active Users Shows unique users who interacted with the web interface, broken down by activity type: * **All**: Users who performed any web action (code searches, navigations, Ask chats, or file views), excluding repo listings. * **Search**: The subset of users who performed code searches. * **Ask**: The subset of users who created Ask chat sessions. ### [​](https://docs.sourcebot.dev/docs/features/analytics#web-activity) Web Activity Total event counts for web interface activity: * **Code Searches**: Searches performed in the web search bar. * **Ask Chats**: Conversations created through the web interface. * **Navigations**: “Go to Definition” and “Find All References” actions in the code viewer. [​](https://docs.sourcebot.dev/docs/features/analytics#api) API ------------------------------------------------------------------ Metrics from MCP integrations and direct API access. ### [​](https://docs.sourcebot.dev/docs/features/analytics#api-active-users) API Active Users Shows unique users who interacted via non-web sources: * **Any**: Users who used either MCP or the API. * **MCP**: Users from IDE extensions and other MCP clients. * **API**: Users from direct HTTP API access (e.g., via API keys), excluding web app and MCP traffic. ### [​](https://docs.sourcebot.dev/docs/features/analytics#api-requests) API Requests Total request counts: * **MCP**: Code searches, file reads, tree listings, repo listings, and Ask chats from MCP clients. * **API**: Direct HTTP API requests, excluding web app and MCP traffic. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/analytics.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/analytics) [Code navigation\ \ Previous](https://docs.sourcebot.dev/docs/features/code-navigation) [Permission syncing\ \ Next](https://docs.sourcebot.dev/docs/features/permission-syncing) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # AI Search Assist - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/search/ai-search-assist#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Code Search AI Search Assist [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * [Overview](https://docs.sourcebot.dev/docs/features/search/overview) * [Writing search queries](https://docs.sourcebot.dev/docs/features/search/syntax-reference) * [AI Search Assist](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) * [Searching multiple branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) * [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [How it works](https://docs.sourcebot.dev/docs/features/search/ai-search-assist#how-it-works) * [Requirements](https://docs.sourcebot.dev/docs/features/search/ai-search-assist#requirements) AI Search Assist lets you describe what you’re looking for in natural language and automatically generates a search query for you. [​](https://docs.sourcebot.dev/docs/features/search/ai-search-assist#how-it-works) How it works -------------------------------------------------------------------------------------------------- 1. Click the wand icon () in the search bar to open the AI Search Assist panel. 2. Describe what you’re looking for in natural language. 3. Click **Generate** or press ↵ to generate the query. 4. The generated query is inserted into the search bar. [​](https://docs.sourcebot.dev/docs/features/search/ai-search-assist#requirements) Requirements -------------------------------------------------------------------------------------------------- AI Search Assist requires a language model to be configured. See [Configure Language Models](https://docs.sourcebot.dev/docs/configuration/language-model-providers) for setup instructions. Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/search/ai-search-assist.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/search/ai-search-assist) [Writing search queries\ \ Previous](https://docs.sourcebot.dev/docs/features/search/syntax-reference) [Searching multiple branches and tags\ \ Next](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Code navigation - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/code-navigation#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Features Code navigation [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Features](https://docs.sourcebot.dev/docs/features/code-navigation#features) * [How does it work?](https://docs.sourcebot.dev/docs/features/code-navigation#how-does-it-work) * [Find references](https://docs.sourcebot.dev/docs/features/code-navigation#find-references) * [Find definitions](https://docs.sourcebot.dev/docs/features/code-navigation#find-definitions) is only available with an active Enterprise license. Please add your [license key](https://docs.sourcebot.dev/docs/license-key) to activate it. **Code navigation** allows you to jump between symbol definition and references when viewing source files in Sourcebot. This feature is enabled **automatically** when a valid license key is present and works with all popular programming languages. [​](https://docs.sourcebot.dev/docs/features/code-navigation#features) Features ---------------------------------------------------------------------------------- | Feature | Description | | --- | --- | | **Hover popover** | Hovering over a symbol reveals the symbol’s definition signature as a inline preview. | | **Go to definition** | Clicking the “go to definition” button in the popover or clicking the symbol name navigates to the symbol’s definition. | | **Find references** | Clicking the “find all references” button in the popover lists all references in the explore panel. | | **Explore panel** | Lists all references and definitions for the symbol selected in the popover. | | **Cross-repository navigation** | You can search across all repositories by clicking the globe icon in the explore panel. By default, references and definitions are scoped to the repository where the symbol is being resolved. | [​](https://docs.sourcebot.dev/docs/features/code-navigation#how-does-it-work) How does it work? --------------------------------------------------------------------------------------------------- Code navigation is **search-based**, meaning it uses the same code search engine and [query language](https://docs.sourcebot.dev/docs/features/search/syntax-reference) to estimate a symbol’s references and definitions. We refer to these estimations as “search heuristics”. We have two search heuristics to enable the following operations: ### [​](https://docs.sourcebot.dev/docs/features/code-navigation#find-references) Find references Given a `symbolName`, along with information about the file the symbol is contained within (`git_revision`, and `language`), runs the following search: \\b{symbolName}\\b rev:{git_revision} lang:{language} case:yes ### [​](https://docs.sourcebot.dev/docs/features/code-navigation#find-definitions) Find definitions Given a `symbolName`, along with information about the file the symbol is contained within (`git_revision`, and `language`), runs the following search: sym:\\b{symbolName}\\b rev:{git_revision} lang:{language} Note that the `sym:` prefix is used to filter the search by symbol definitions. These are created at index time by [universal ctags](https://ctags.io/) . Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/code-navigation.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/code-navigation) [Sourcebot MCP server\ \ Previous](https://docs.sourcebot.dev/docs/features/mcp-server) [Analytics\ \ Next](https://docs.sourcebot.dev/docs/features/analytics) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/features/search/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Code Search Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * [Overview](https://docs.sourcebot.dev/docs/features/search/overview) * [Writing search queries](https://docs.sourcebot.dev/docs/features/search/syntax-reference) * [AI Search Assist](https://docs.sourcebot.dev/docs/features/search/ai-search-assist) * [Searching multiple branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) * [Search contexts](https://docs.sourcebot.dev/docs/features/search/search-contexts) * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) Search across all your repos/branches across any code host platform. Blazingly fast, and supports regular expressions, repo/language search filters, boolean logic, and more. Key benefits * **Regex support:** Use regular expressions to find code with precision. * **Query language:** Scope searches to specific files, repos, languages, symbol definitions and more using a rich [query language](https://docs.sourcebot.dev/docs/features/search/syntax-reference) . * **Branch search:** Specify a list of branches to search across ([docs](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) ). * **Fast & scalable:** Sourcebot uses [trigram indexing](https://en.wikipedia.org/wiki/Trigram_search) , allowing it to scale to massive codebases. * **Syntax highlighting:** Syntax highlighting support for over [100+ languages](https://github.com/sourcebot-dev/sourcebot/blob/57724689303f351c279d37f45b6406f1d5d5d5ab/packages/web/src/lib/codemirrorLanguage.ts#L125) . * **Multi-repository:** Search across all of your repositories in a single search. * **Search suggestions:** Get search suggestions as you craft your query. * **Filter panel:** Filter results by repository or by language. Deployment guides ----------------- Learn how to self-host Sourcebot in a few simple steps. Index repos ----------- Learn how to index your repos so you can ask questions about them Branches -------- Learn how to index and search through your branches Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/features/search/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/features/search/overview) [Redis\ \ Previous](https://docs.sourcebot.dev/docs/deployment/infrastructure/redis) [Writing search queries\ \ Next](https://docs.sourcebot.dev/docs/features/search/syntax-reference) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Language Model Providers - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/configuration/language-model-providers#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Configuration Language Model Providers [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Supported Providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers#supported-providers) * [Amazon Bedrock](https://docs.sourcebot.dev/docs/configuration/language-model-providers#amazon-bedrock) * [Anthropic](https://docs.sourcebot.dev/docs/configuration/language-model-providers#anthropic) * [Azure OpenAI](https://docs.sourcebot.dev/docs/configuration/language-model-providers#azure-openai) * [Deepseek](https://docs.sourcebot.dev/docs/configuration/language-model-providers#deepseek) * [Google Generative AI](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-generative-ai) * [Google Vertex](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-vertex) * [Google Vertex Anthropic](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-vertex-anthropic) * [Mistral](https://docs.sourcebot.dev/docs/configuration/language-model-providers#mistral) * [OpenAI](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openai) * [OpenAI Compatible](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openai-compatible) * [OpenRouter](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openrouter) * [xAI](https://docs.sourcebot.dev/docs/configuration/language-model-providers#xai) * [Custom headers](https://docs.sourcebot.dev/docs/configuration/language-model-providers#custom-headers) * [Schema reference](https://docs.sourcebot.dev/docs/configuration/language-model-providers#schema-reference) Looking to self-host your own model? Check out the [OpenAI Compatible](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openai-compatible) provider. To use [Ask Sourcebot](https://docs.sourcebot.dev/docs/features/ask) you must define at least one Language Model Provider. These providers are defined within the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) you provide Sourcebot. Example config with language model provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ // 1. Google Vertex config for Gemini 2.5 Pro\ {\ "provider": "google-vertex",\ "model": "gemini-2.5-pro",\ "displayName": "Gemini 2.5 Pro",\ "project": "sourcebot",\ "credentials": {\ "env": "GOOGLE_APPLICATION_CREDENTIALS"\ }\ },\ // 2. OpenAI config for o3 \ {\ "provider": "openai",\ "model": "o3",\ "displayName": "o3",\ "token": {\ "env": "OPENAI_API_KEY"\ }\ }\ ] } [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#supported-providers) Supported Providers ====================================================================================================================== Sourcebot uses the [Vercel AI SDK](https://ai-sdk.dev/docs/introduction) , so it can integrate with any provider the SDK supports. If you don’t see your provider below please submit a [feature request](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) . For a detailed description of all the providers, please refer to the [schema](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/languageModel.json) . Any parameter defined using `env` will read the value from the corresponding environment variable you provide Sourcebot ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#amazon-bedrock) Amazon Bedrock [Vercel AI SDK Amazon Bedrock Docs](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock) Example config with Amazon Bedrock provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "amazon-bedrock",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "accessKeyId": {\ "env": "AWS_ACCESS_KEY_ID"\ },\ "accessKeySecret": {\ "env": "AWS_SECRET_ACCESS_KEY"\ },\ "sessionToken": {\ "env": "AWS_SESSION_TOKEN"\ },\ "region": "YOUR_REGION_HERE", // defaults to the AWS_REGION env var if not set\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#anthropic) Anthropic [Vercel AI SDK Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic) Example config with Anthropic provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "anthropic",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ // Auth can be provided via a API key that is sent using the `x-api-key` header...\ "token": {\ "env": "ANTHROPIC_API_KEY"\ },\ // ...or via a auth token sent using the `Authorization: Bearer` header.\ "authToken": {\ "env": "ANTHROPIC_AUTH_TOKEN"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#azure-openai) Azure OpenAI [Vercel AI SDK Azure OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/azure) The `model` field should be set to your Azure OpenAI deployment name. Either `resourceName` or `baseUrl` must be set. The `resourceName` is used to construct the URL `https://{resourceName}.openai.azure.com/openai/v1{path}`. If `baseUrl` is provided, `resourceName` is ignored. The `reasoningSummary` field controls whether the model returns its reasoning process. Set to `auto` for a condensed summary, `detailed` for more comprehensive reasoning, or `none` to disable. Defaults to `auto`. Example config with Azure AI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "azure",\ "model": "YOUR_DEPLOYMENT_NAME",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "resourceName": "YOUR_RESOURCE_NAME", // defaults to the AZURE_RESOURCE_NAME env var if not set\ "apiVersion": "OPTIONAL_API_VERSION",\ "token": {\ "env": "AZURE_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL", // use instead of resourceName for custom endpoints\ "reasoningEffort": "OPTIONAL_REASONING_EFFORT", // defaults to "medium"\ "reasoningSummary": "auto" // "auto" | "detailed" | "none". Defaults to "auto"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#deepseek) Deepseek [Vercel AI SDK Deepseek Docs](https://ai-sdk.dev/providers/ai-sdk-providers/deepseek) Example config with Deepseek provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "deepseek",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "DEEPSEEK_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-generative-ai) Google Generative AI [Vercel AI SDK Google Generative AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai) The `thinkingLevel` field controls the depth of reasoning for Gemini 3 models. Valid values are `minimal`, `low`, `medium`, and `high`. See [thinking levels](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels) . The `thinkingBudget` field sets the number of thinking tokens for Gemini 2.5 models. Set to `-1` for dynamic thinking. See [thinking budget](https://ai.google.dev/gemini-api/docs/thinking#set-budget) . Example config with Google Generative AI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "google-generative-ai",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "GOOGLE_GENERATIVE_AI_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL",\ "thinkingLevel": "high", // "minimal" | "low" | "medium" | "high" (Gemini 3 models)\ "thinkingBudget": -1 // number of thinking tokens, -1 for dynamic (Gemini 2.5 models)\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-vertex) Google Vertex If you’re using an Anthropic model on Google Vertex, you must define a [Google Vertex Anthropic](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-vertex-anthropic) provider instead The `credentials` parameter here expects a **path** to a [credentials](https://console.cloud.google.com/apis/credentials) file. This file **must be in a volume mounted by Sourcebot** for it to be readable. [Vercel AI SDK Google Vertex AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex) The `thinkingLevel` field controls the depth of reasoning for Gemini 3 models. Valid values are `minimal`, `low`, `medium`, and `high`. See [thinking levels](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels) . The `thinkingBudget` field sets the number of thinking tokens for Gemini 2.5 models. Set to `-1` for dynamic thinking. See [thinking budget](https://ai.google.dev/gemini-api/docs/thinking#set-budget) . Example config with Google Vertex provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "google-vertex",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "project": "YOUR_PROJECT_ID", // defaults to the GOOGLE_VERTEX_PROJECT env var if not set\ "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set\ "credentials": {\ "env": "GOOGLE_APPLICATION_CREDENTIALS"\ },\ "baseUrl": "OPTIONAL_BASE_URL",\ "thinkingLevel": "high", // "minimal" | "low" | "medium" | "high" (Gemini 3 models)\ "thinkingBudget": -1 // number of thinking tokens, -1 for dynamic (Gemini 2.5 models)\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#google-vertex-anthropic) Google Vertex Anthropic The `credentials` parameter here expects a **path** to a [credentials](https://console.cloud.google.com/apis/credentials) file. This file **must be in a volume mounted by Sourcebot** for it to be readable. [Vercel AI SDK Google Vertex Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex#google-vertex-anthropic-provider-usage) Example config with Google Vertex Anthropic provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "google-vertex-anthropic",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "project": "YOUR_PROJECT_ID", // defaults to the GOOGLE_VERTEX_PROJECT env var if not set\ "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set\ "credentials": {\ "env": "GOOGLE_APPLICATION_CREDENTIALS"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#mistral) Mistral [Vercel AI SDK Mistral Docs](https://ai-sdk.dev/providers/ai-sdk-providers/mistral) Example config with Mistral provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "mistral",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "MISTRAL_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openai) OpenAI [Vercel AI SDK OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/openai) The `reasoningSummary` field controls whether the model returns its reasoning process. Set to `auto` for a condensed summary, `detailed` for more comprehensive reasoning, or `none` to disable. Defaults to `auto`. Example config with OpenAI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "openai",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "OPENAI_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL",\ "reasoningEffort": "OPTIONAL_REASONING_EFFORT", // defaults to "medium"\ "reasoningSummary": "auto" // "auto" | "detailed" | "none". Defaults to "auto"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openai-compatible) OpenAI Compatible [Vercel AI SDK OpenAI Compatible Docs](https://ai-sdk.dev/providers/openai-compatible-providers) The OpenAI compatible provider allows you to use any model that is compatible with the OpenAI [Chat Completions API](https://github.com/ollama/ollama/blob/main/docs/openai.md) . This includes self-hosted tools like [Ollama](https://ollama.ai/) and [llama.cpp](https://github.com/ggerganov/llama.cpp) . Example config with OpenAI Compatible provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "openai-compatible",\ "baseUrl": "BASE_URL_HERE",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "OPTIONAL_API_KEY"\ },\ // Optional query parameters can be passed in the request url as:\ "queryParams": {\ // raw string values\ "optional-query-param": "foo",\ // or as environment variables\ "optional-query-param-secret": {\ "env": "MY_SECRET_ENV_VAR"\ }\ }\ }\ ] } Troubleshooting * When using [llama.cpp](https://github.com/ggml-org/llama.cpp) , if you hit “Failed after 3 attempts. Last error: tools param requires —jinja flag”, add the `--jinja` flag to your `llama-server` command. * If you’re seeing the LLM outputing reasoning tokens wrapped in XML tags (e.g., ``, ``, etc.), you can configure the `reasoningTag` parameter to the name of the tag (without angle brackets). This parameter defaults to `think`. ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#openrouter) OpenRouter [Vercel AI SDK OpenRouter Docs](https://ai-sdk.dev/providers/community-providers/openrouter) Example config with OpenRouter provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "openrouter",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "OPENROUTER_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } ### [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#xai) xAI [Vercel AI SDK xAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/xai) Example config with xAI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ "provider": "xai",\ "model": "YOUR_MODEL_HERE",\ "displayName": "OPTIONAL_DISPLAY_NAME",\ "token": {\ "env": "XAI_API_KEY"\ },\ "baseUrl": "OPTIONAL_BASE_URL"\ }\ ] } [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#custom-headers) Custom headers ============================================================================================================ You can pass custom headers to the language model provider by using the `headers` parameter. Header values can either be a string or a environment variable. Headers are supported for all providers. Example config with custom headers { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "models": [\ {\ // ... provider, model, displayName, etc...\ \ // Key-value pairs of headers\ "headers": {\ // Header values can be passed as a environment variable...\ "my-secret-header": {\ "env": "MY_SECRET_HEADER_ENV_VAR"\ },\ \ // ... or directly as a string.\ "my-non-secret-header": "plaintextvalue"\ }\ }\ ] } [​](https://docs.sourcebot.dev/docs/configuration/language-model-providers#schema-reference) Schema reference ================================================================================================================ Reference [schemas/v3/languageModel.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/languageModel.json) { "type": "object", "title": "LanguageModel", "definitions": { "AmazonBedrockLanguageModel": { "type": "object", "properties": { "provider": { "const": "amazon-bedrock", "description": "Amazon Bedrock Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "accessKeyId": { "description": "Optional access key ID to use with the model. Defaults to the `AWS_ACCESS_KEY_ID` environment variable.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "accessKeySecret": { "description": "Optional secret access key to use with the model. Defaults to the `AWS_SECRET_ACCESS_KEY` environment variable.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "sessionToken": { "description": "Optional session token to use with the model. Defaults to the `AWS_SESSION_TOKEN` environment variable.", "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "region": { "type": "string", "description": "The AWS region. Defaults to the `AWS_REGION` environment variable.", "examples": [\ "us-east-1",\ "us-west-2",\ "eu-west-1"\ ] }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "AnthropicLanguageModel": { "type": "object", "properties": { "provider": { "const": "anthropic", "description": "Anthropic Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model, sent as the `x-api-key` header. Defaults to the `ANTHROPIC_API_KEY` environment variable." }, "authToken": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional auth token to use with the model, sent as the `Authorization: Bearer` header. Defaults to the `ANTHROPIC_AUTH_TOKEN` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "AzureLanguageModel": { "type": "object", "properties": { "provider": { "const": "azure", "description": "Azure Configuration" }, "model": { "type": "string", "description": "The deployment name of the Azure model." }, "displayName": { "type": "string", "description": "Optional display name." }, "resourceName": { "type": "string", "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable." }, "apiVersion": { "type": "string", "description": "Sets a custom api version. Defaults to `preview`." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." }, "reasoningEffort": { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "reasoningSummary": { "type": "string", "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.", "examples": [\ "none",\ "auto",\ "detailed"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "DeepSeekLanguageModel": { "type": "object", "properties": { "provider": { "const": "deepseek", "description": "DeepSeek Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { "provider": { "const": "google-generative-ai", "description": "Google Generative AI Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "thinkingLevel": { "type": "string", "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels", "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "thinkingBudget": { "type": "integer", "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget" }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleVertexAnthropicLanguageModel": { "type": "object", "properties": { "provider": { "const": "google-vertex-anthropic", "description": "Google Vertex AI Anthropic Configuration" }, "model": { "type": "string", "description": "The name of the Anthropic language model running on Google Vertex.", "examples": [\ "claude-sonnet-4"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "project": { "type": "string", "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." }, "region": { "type": "string", "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ] }, "credentials": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleVertexLanguageModel": { "type": "object", "properties": { "provider": { "const": "google-vertex", "description": "Google Vertex AI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "gemini-2.0-flash-exp",\ "gemini-1.5-pro",\ "gemini-1.5-flash"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "project": { "type": "string", "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." }, "region": { "type": "string", "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ] }, "credentials": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "thinkingLevel": { "type": "string", "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels", "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "thinkingBudget": { "type": "integer", "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget" }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "MistralLanguageModel": { "type": "object", "properties": { "provider": { "const": "mistral", "description": "Mistral AI Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "OpenAILanguageModel": { "type": "object", "properties": { "provider": { "const": "openai", "description": "OpenAI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "gpt-4.1",\ "o4-mini",\ "o3",\ "o3-deep-research"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "reasoningEffort": { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "reasoningSummary": { "type": "string", "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.", "examples": [\ "none",\ "auto",\ "detailed"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "OpenAICompatibleLanguageModel": { "type": "object", "properties": { "provider": { "const": "openai-compatible", "description": "OpenAI Compatible Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key. If specified, adds an `Authorization` header to request headers with the value Bearer ." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Base URL of the OpenAI-compatible chat completions API endpoint.", "examples": [\ "http://localhost:8080/v1"\ ] }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false }, "queryParams": { "type": "object", "description": "Optional query parameters to include in the request url.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false }, "reasoningTag": { "type": "string", "description": "The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`.", "default": "think", "examples": [\ "think",\ "thinking",\ "reasoning"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." } }, "required": [\ "provider",\ "model",\ "baseUrl"\ ], "additionalProperties": false }, "OpenRouterLanguageModel": { "type": "object", "properties": { "provider": { "const": "openrouter", "description": "OpenRouter Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "XaiLanguageModel": { "type": "object", "properties": { "provider": { "const": "xai", "description": "xAI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "grok-beta",\ "grok-vision-beta"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false } }, "oneOf": [\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "amazon-bedrock",\ "description": "Amazon Bedrock Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "accessKeyId": {\ "description": "Optional access key ID to use with the model. Defaults to the `AWS_ACCESS_KEY_ID` environment variable.",\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "accessKeySecret": {\ "description": "Optional secret access key to use with the model. Defaults to the `AWS_SECRET_ACCESS_KEY` environment variable.",\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "sessionToken": {\ "description": "Optional session token to use with the model. Defaults to the `AWS_SESSION_TOKEN` environment variable.",\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "region": {\ "type": "string",\ "description": "The AWS region. Defaults to the `AWS_REGION` environment variable.",\ "examples": [\ "us-east-1",\ "us-west-2",\ "eu-west-1"\ ]\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "anthropic",\ "description": "Anthropic Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model, sent as the `x-api-key` header. Defaults to the `ANTHROPIC_API_KEY` environment variable."\ },\ "authToken": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional auth token to use with the model, sent as the `Authorization: Bearer` header. Defaults to the `ANTHROPIC_AUTH_TOKEN` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "azure",\ "description": "Azure Configuration"\ },\ "model": {\ "type": "string",\ "description": "The deployment name of the Azure model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "resourceName": {\ "type": "string",\ "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable."\ },\ "apiVersion": {\ "type": "string",\ "description": "Sets a custom api version. Defaults to `preview`."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."\ },\ "reasoningEffort": {\ "type": "string",\ "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings",\ "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "reasoningSummary": {\ "type": "string",\ "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.",\ "examples": [\ "none",\ "auto",\ "detailed"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "deepseek",\ "description": "DeepSeek Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-generative-ai",\ "description": "Google Generative AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "thinkingLevel": {\ "type": "string",\ "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",\ "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "thinkingBudget": {\ "type": "integer",\ "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-vertex-anthropic",\ "description": "Google Vertex AI Anthropic Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the Anthropic language model running on Google Vertex.",\ "examples": [\ "claude-sonnet-4"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "project": {\ "type": "string",\ "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."\ },\ "region": {\ "type": "string",\ "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",\ "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ]\ },\ "credentials": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-vertex",\ "description": "Google Vertex AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "gemini-2.0-flash-exp",\ "gemini-1.5-pro",\ "gemini-1.5-flash"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "project": {\ "type": "string",\ "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."\ },\ "region": {\ "type": "string",\ "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",\ "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ]\ },\ "credentials": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "thinkingLevel": {\ "type": "string",\ "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",\ "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "thinkingBudget": {\ "type": "integer",\ "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "mistral",\ "description": "Mistral AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openai",\ "description": "OpenAI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "gpt-4.1",\ "o4-mini",\ "o3",\ "o3-deep-research"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "reasoningEffort": {\ "type": "string",\ "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings",\ "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "reasoningSummary": {\ "type": "string",\ "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.",\ "examples": [\ "none",\ "auto",\ "detailed"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openai-compatible",\ "description": "OpenAI Compatible Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key. If specified, adds an `Authorization` header to request headers with the value Bearer ."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Base URL of the OpenAI-compatible chat completions API endpoint.",\ "examples": [\ "http://localhost:8080/v1"\ ]\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ },\ "queryParams": {\ "type": "object",\ "description": "Optional query parameters to include in the request url.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ },\ "reasoningTag": {\ "type": "string",\ "description": "The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`.",\ "default": "think",\ "examples": [\ "think",\ "thinking",\ "reasoning"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ }\ },\ "required": [\ "provider",\ "model",\ "baseUrl"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openrouter",\ "description": "OpenRouter Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "xai",\ "description": "xAI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "grok-beta",\ "grok-vision-beta"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ }\ ] } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/configuration/language-model-providers.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/configuration/language-model-providers) [Request another code host\ \ Previous](https://docs.sourcebot.dev/docs/connections/request-new) [External Identity Providers\ \ Next](https://docs.sourcebot.dev/docs/configuration/idp) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Overview - Sourcebot [Skip to main content](https://docs.sourcebot.dev/docs/connections/overview#content-area) [Sourcebot home page![light logo](https://mintcdn.com/sourcebot/JnLAbxUNU28xSFy6/logo/light.png?fit=max&auto=format&n=JnLAbxUNU28xSFy6&q=85&s=734343fc75fa13429e427dc65dc56481)![dark logo](https://mintcdn.com/sourcebot/8vfJfQmq9Ve6HNrE/logo/dark.png?fit=max&auto=format&n=8vfJfQmq9Ve6HNrE&q=85&s=891614fdf072f2fd607d1645ca1326cb)](https://docs.sourcebot.dev/) Search... ⌘KAsk AI Search... Navigation Indexing your code Overview [Documentation](https://docs.sourcebot.dev/docs/overview) [API Reference](https://docs.sourcebot.dev/docs/api-reference/authentication) * [Changelog](https://sourcebot.dev/changelog) * [Roadmap](https://github.com/sourcebot-dev/sourcebot/issues/459) * [Support](https://github.com/sourcebot-dev/sourcebot/issues/new?template=get_help.md) ##### Getting Started * [Overview](https://docs.sourcebot.dev/docs/overview) * Deployment ##### Features * Code Search * Ask Sourcebot * [Sourcebot MCP](https://docs.sourcebot.dev/docs/features/mcp-server) * [Code navigation](https://docs.sourcebot.dev/docs/features/code-navigation) * [Analytics](https://docs.sourcebot.dev/docs/features/analytics) * [Permission syncing](https://docs.sourcebot.dev/docs/features/permission-syncing) * Agentsexperimental ##### Configuration * [Config file](https://docs.sourcebot.dev/docs/configuration/config-file) * [Environment variables](https://docs.sourcebot.dev/docs/configuration/environment-variables) * Indexing your code * [Overview](https://docs.sourcebot.dev/docs/connections/overview) * [GitHub](https://docs.sourcebot.dev/docs/connections/github) * [GitLab](https://docs.sourcebot.dev/docs/connections/gitlab) * [Bitbucket Cloud](https://docs.sourcebot.dev/docs/connections/bitbucket-cloud) * [Bitbucket Data Center](https://docs.sourcebot.dev/docs/connections/bitbucket-data-center) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Cloud](https://docs.sourcebot.dev/docs/connections/ado-cloud) * [![https://www.svgrepo.com/show/448307/azure-devops.svg](https://www.svgrepo.com/show/448307/azure-devops.svg)\ \ Azure Devops Server](https://docs.sourcebot.dev/docs/connections/ado-server) * [Gitea](https://docs.sourcebot.dev/docs/connections/gitea) * [Gerrit](https://docs.sourcebot.dev/docs/connections/gerrit) * [Other Git hosts](https://docs.sourcebot.dev/docs/connections/generic-git-host) * [Local Git repositories](https://docs.sourcebot.dev/docs/connections/local-repos) * [Request another host](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) * [Language model providers](https://docs.sourcebot.dev/docs/configuration/language-model-providers) * [External identity providers](https://docs.sourcebot.dev/docs/configuration/idp) * Authentication * [License key](https://docs.sourcebot.dev/docs/license-key) * [Transactional email](https://docs.sourcebot.dev/docs/configuration/transactional-emails) * [Structured logging](https://docs.sourcebot.dev/docs/configuration/structured-logging) * [Audit logs](https://docs.sourcebot.dev/docs/configuration/audit-logs) ##### Upgrade * [V3 to V4 guide](https://docs.sourcebot.dev/docs/upgrade/v3-to-v4-guide) * [V2 to V3 guide](https://docs.sourcebot.dev/docs/upgrade/v2-to-v3-guide) On this page * [Connection Syncing](https://docs.sourcebot.dev/docs/connections/overview#connection-syncing) * [Platform Connection Guides](https://docs.sourcebot.dev/docs/connections/overview#platform-connection-guides) * [Indexing Large Files](https://docs.sourcebot.dev/docs/connections/overview#indexing-large-files) * [Indexing Binary Files](https://docs.sourcebot.dev/docs/connections/overview#indexing-binary-files) * [Schema reference](https://docs.sourcebot.dev/docs/connections/overview#schema-reference) A **connection** represents Sourcebot’s link to a code host platform (GitHub, GitLab, etc). Connections are defined within the [config file](https://docs.sourcebot.dev/docs/configuration/config-file) you provide Sourcebot. Each connection defines how Sourcebot should authenticate and interact with a particular host, and which repositories to sync and index from that host. Connections are uniquely identified by their name. Example config with two connections { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", "connections": { // 1. A connection to GitHub.com "github-connection": { "type": "github", "repos": [\ "sourcebot-dev/sourcebot"\ ], "token": { "env": "GITHUB_TOKEN" } }, // 2. A connection to a self-hosted GitLab instance "gitlab-connection": { "type": "gitlab", "url": "https://gitlab.example.com", "groups": [\ "my-group",\ "my-other-group/sub-group"\ ], "token": { "env": "GITLAB_TOKEN" } } } } Configuration files must conform to the [JSON schema](https://docs.sourcebot.dev/docs/connections/overview#schema-reference) . [​](https://docs.sourcebot.dev/docs/connections/overview#connection-syncing) Connection Syncing -------------------------------------------------------------------------------------------------- When a connection is first discovered, or the `resyncConnectionIntervalMs` [setting](https://docs.sourcebot.dev/docs/configuration/config-file#settings) has exceeded, the connection will be synced. This consists of: 1. Fetching the latest changes from `HEAD` (and any [additional branches](https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing) ) from the code host. 2. Re-indexing the repository. This is processed in a [job queue](https://docs.sourcebot.dev/docs/overview#architecture) , and is parallelized across multiple worker processes. Jobs will take longer to complete the first time a repository is synced, or when a diff is large. On the home page, you can view the sync status of ongoing jobs: [​](https://docs.sourcebot.dev/docs/connections/overview#platform-connection-guides) Platform Connection Guides ------------------------------------------------------------------------------------------------------------------ To learn more about how to create a connection for a specific code host, check out the guides below. GitHub ------ GitLab ------ Bitbucket Cloud --------------- Bitbucket Data Center --------------------- Azure Dev Ops Cloud ------------------- Azure Dev Ops Server -------------------- Gitea ----- Gerrit ------ Other Git hosts --------------- Local Git repos --------------- Missing your code host? [Submit a feature request on GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md) . [​](https://docs.sourcebot.dev/docs/connections/overview#indexing-large-files) Indexing Large Files ------------------------------------------------------------------------------------------------------ By default, Sourcebot will skip indexing files that are larger than 2MB or have more than 20,000 trigrams. You can configure this by setting the `maxFileSize` and `maxTrigramCount` [settings](https://docs.sourcebot.dev/docs/configuration/config-file#settings) . These limits can be ignored for specific files by passing in a comma separated list of glob patterns matching file paths to the `ALWAYS_INDEX_FILE_PATTERNS` environment variable. For example: # Always index all .sum and .lock files ALWAYS_INDEX_FILE_PATTERNS=**/*.sum,**/*.lock Files that have been skipped are assigned the `skipped` language. You can view a list of all skipped files by using the following query: lang:skipped [​](https://docs.sourcebot.dev/docs/connections/overview#indexing-binary-files) Indexing Binary Files -------------------------------------------------------------------------------------------------------- Binary files cannot be indexed by Sourcebot. See [#575](https://github.com/sourcebot-dev/sourcebot/issues/575) for more information. [​](https://docs.sourcebot.dev/docs/connections/overview#schema-reference) Schema reference ---------------------------------------------------------------------------------------------- * * * Reference [schemas/v3/index.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/index.json) { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SourcebotConfig", "definitions": { "Settings": { "type": "object", "description": "Defines the global settings for Sourcebot.", "properties": { "maxFileSize": { "type": "number", "description": "The maximum size of a file (in bytes) to be indexed. Files that exceed this maximum will not be indexed. Defaults to 2MB.", "minimum": 1 }, "maxTrigramCount": { "type": "number", "description": "The maximum number of trigrams per document. Files that exceed this maximum will not be indexed. Default to 20000.", "minimum": 1 }, "reindexIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the indexer should re-index all repositories. Defaults to 1 hour.", "minimum": 1 }, "resyncConnectionIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the connection manager should check for connections that need to be re-synced. Defaults to 24 hours.", "minimum": 1 }, "resyncConnectionPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for connections that need to be re-synced. Defaults to 1 second.", "minimum": 1 }, "reindexRepoPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for repos that should be re-indexed. Defaults to 1 second.", "minimum": 1 }, "maxConnectionSyncJobConcurrency": { "type": "number", "description": "The number of connection sync jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoIndexingJobConcurrency": { "type": "number", "description": "The number of repo indexing jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoGarbageCollectionJobConcurrency": { "type": "number", "description": "The number of repo GC jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "repoGarbageCollectionGracePeriodMs": { "type": "number", "description": "The grace period (in milliseconds) for garbage collection. Used to prevent deleting shards while they're being loaded. Defaults to 10 seconds.", "minimum": 1 }, "repoIndexTimeoutMs": { "type": "number", "description": "The timeout (in milliseconds) for a repo indexing to timeout. Defaults to 2 hours.", "minimum": 1 }, "enablePublicAccess": { "type": "boolean", "deprecated": true, "description": "This setting is deprecated. Please use the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable instead.", "default": false }, "repoDrivenPermissionSyncIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the repo permission syncer should run. Defaults to 24 hours.", "minimum": 1 }, "userDrivenPermissionSyncIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the user permission syncer should run. Defaults to 24 hours.", "minimum": 1 }, "experiment_repoDrivenPermissionSyncIntervalMs": { "type": "number", "deprecated": true, "description": "Deprecated. Use `repoDrivenPermissionSyncIntervalMs` instead.", "minimum": 1 }, "experiment_userDrivenPermissionSyncIntervalMs": { "type": "number", "deprecated": true, "description": "Deprecated. Use `userDrivenPermissionSyncIntervalMs` instead.", "minimum": 1 }, "maxAccountPermissionSyncJobConcurrency": { "type": "number", "description": "The number of account permission sync jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoPermissionSyncJobConcurrency": { "type": "number", "description": "The number of repo permission sync jobs to run concurrently. Defaults to 8.", "minimum": 1 } }, "additionalProperties": false }, "SearchContext": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SearchContext", "description": "Search context", "properties": { "include": { "type": "array", "description": "List of repositories to include in the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/**",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "includeConnections": { "type": "array", "description": "List of connections to include in the search context.", "items": { "type": "string" } }, "exclude": { "type": "array", "description": "List of repositories to exclude from the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/sourcebot",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "excludeConnections": { "type": "array", "description": "List of connections to exclude from the search context.", "items": { "type": "string" } }, "includeTopics": { "type": "array", "description": "List of repository topics to include in the search context. Only repositories matching at least one topic are included. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "backend",\ "core-*"\ ]\ ] }, "excludeTopics": { "type": "array", "description": "List of repository topics to exclude from the search context. Repositories matching any of these topics are excluded. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "deprecated",\ "archived-*"\ ]\ ] }, "description": { "type": "string", "description": "Optional description of the search context that surfaces in the UI." } }, "additionalProperties": false } }, "properties": { "$schema": { "type": "string" }, "settings": { "type": "object", "description": "Defines the global settings for Sourcebot.", "properties": { "maxFileSize": { "type": "number", "description": "The maximum size of a file (in bytes) to be indexed. Files that exceed this maximum will not be indexed. Defaults to 2MB.", "minimum": 1 }, "maxTrigramCount": { "type": "number", "description": "The maximum number of trigrams per document. Files that exceed this maximum will not be indexed. Default to 20000.", "minimum": 1 }, "reindexIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the indexer should re-index all repositories. Defaults to 1 hour.", "minimum": 1 }, "resyncConnectionIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the connection manager should check for connections that need to be re-synced. Defaults to 24 hours.", "minimum": 1 }, "resyncConnectionPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for connections that need to be re-synced. Defaults to 1 second.", "minimum": 1 }, "reindexRepoPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for repos that should be re-indexed. Defaults to 1 second.", "minimum": 1 }, "maxConnectionSyncJobConcurrency": { "type": "number", "description": "The number of connection sync jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoIndexingJobConcurrency": { "type": "number", "description": "The number of repo indexing jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoGarbageCollectionJobConcurrency": { "type": "number", "description": "The number of repo GC jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "repoGarbageCollectionGracePeriodMs": { "type": "number", "description": "The grace period (in milliseconds) for garbage collection. Used to prevent deleting shards while they're being loaded. Defaults to 10 seconds.", "minimum": 1 }, "repoIndexTimeoutMs": { "type": "number", "description": "The timeout (in milliseconds) for a repo indexing to timeout. Defaults to 2 hours.", "minimum": 1 }, "enablePublicAccess": { "type": "boolean", "deprecated": true, "description": "This setting is deprecated. Please use the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable instead.", "default": false }, "repoDrivenPermissionSyncIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the repo permission syncer should run. Defaults to 24 hours.", "minimum": 1 }, "userDrivenPermissionSyncIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the user permission syncer should run. Defaults to 24 hours.", "minimum": 1 }, "experiment_repoDrivenPermissionSyncIntervalMs": { "type": "number", "deprecated": true, "description": "Deprecated. Use `repoDrivenPermissionSyncIntervalMs` instead.", "minimum": 1 }, "experiment_userDrivenPermissionSyncIntervalMs": { "type": "number", "deprecated": true, "description": "Deprecated. Use `userDrivenPermissionSyncIntervalMs` instead.", "minimum": 1 }, "maxAccountPermissionSyncJobConcurrency": { "type": "number", "description": "The number of account permission sync jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoPermissionSyncJobConcurrency": { "type": "number", "description": "The number of repo permission sync jobs to run concurrently. Defaults to 8.", "minimum": 1 } }, "additionalProperties": false }, "contexts": { "type": "object", "description": "[Sourcebot EE] Defines a collection of search contexts. This is only available in single-tenancy mode. See: https://docs.sourcebot.dev/docs/features/search/search-contexts", "patternProperties": { "^[a-zA-Z0-9_-]+$": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SearchContext", "description": "Search context", "properties": { "include": { "type": "array", "description": "List of repositories to include in the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/**",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "includeConnections": { "type": "array", "description": "List of connections to include in the search context.", "items": { "type": "string" } }, "exclude": { "type": "array", "description": "List of repositories to exclude from the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "github.com/sourcebot-dev/sourcebot",\ "gerrit.example.org/sub/path/**"\ ]\ ] }, "excludeConnections": { "type": "array", "description": "List of connections to exclude from the search context.", "items": { "type": "string" } }, "includeTopics": { "type": "array", "description": "List of repository topics to include in the search context. Only repositories matching at least one topic are included. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "backend",\ "core-*"\ ]\ ] }, "excludeTopics": { "type": "array", "description": "List of repository topics to exclude from the search context. Repositories matching any of these topics are excluded. Glob patterns are supported.", "items": { "type": "string" }, "examples": [\ [\ "deprecated",\ "archived-*"\ ]\ ] }, "description": { "type": "string", "description": "Optional description of the search context that surfaces in the UI." } }, "additionalProperties": false } }, "additionalProperties": false }, "environmentOverrides": { "type": "object", "description": "Environment variable overrides.", "title": "EnvironmentOverrides", "not": { "$comment": "List of environment variables that are not allowed to be overridden.", "anyOf": [\ {\ "required": [\ "CONFIG_PATH"\ ]\ }\ ] }, "patternProperties": { "^[a-zA-Z0-9_-]+$": { "oneOf": [\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "token"\ },\ "value": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "string"\ },\ "value": {\ "type": "string"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "number"\ },\ "value": {\ "type": "number"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "boolean"\ },\ "value": {\ "type": "boolean"\ }\ },\ "required": [\ "type",\ "value"\ ],\ "additionalProperties": false\ }\ ] } } }, "connections": { "type": "object", "description": "Defines a collection of connections from varying code hosts that Sourcebot should sync with. This is only available in single-tenancy mode.", "patternProperties": { "^[a-zA-Z0-9_-]+$": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ConnectionConfig", "oneOf": [\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "GithubConnectionConfig",\ "properties": {\ "type": {\ "const": "github",\ "description": "GitHub Configuration"\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "A Personal Access Token (PAT)."\ },\ "url": {\ "type": "string",\ "format": "url",\ "default": "https://github.com",\ "description": "The URL of the GitHub host. Defaults to https://github.com",\ "examples": [\ "https://github.com",\ "https://github.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "users": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+$"\ },\ "default": [],\ "examples": [\ [\ "torvalds",\ "DHH"\ ]\ ],\ "description": "List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property."\ },\ "orgs": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+$"\ },\ "default": [],\ "examples": [\ [\ "my-org-name"\ ],\ [\ "sourcebot-dev",\ "commaai"\ ]\ ],\ "description": "List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+\\/[\\w.-]+$"\ },\ "default": [],\ "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'."\ },\ "topics": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "minItems": 1,\ "default": [],\ "description": "List of repository topics to include when syncing. Only repositories that match at least one of the provided `topics` will be synced. If not specified, all repositories will be synced, unless explicitly defined in the `exclude` property. Glob patterns are supported.",\ "examples": [\ [\ "docs",\ "core"\ ]\ ]\ },\ "exclude": {\ "type": "object",\ "properties": {\ "forks": {\ "type": "boolean",\ "default": false,\ "description": "Exclude forked repositories from syncing."\ },\ "archived": {\ "type": "boolean",\ "default": false,\ "description": "Exclude archived repositories from syncing."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "description": "List of individual repositories to exclude from syncing. Glob patterns are supported."\ },\ "topics": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "description": "List of repository topics to exclude when syncing. Repositories that match one of the provided `topics` will be excluded from syncing. Glob patterns are supported.",\ "examples": [\ [\ "tests",\ "ci"\ ]\ ]\ },\ "size": {\ "type": "object",\ "description": "Exclude repositories based on their disk usage. Note: the disk usage is calculated by GitHub and may not reflect the actual disk usage when cloned.",\ "properties": {\ "min": {\ "type": "integer",\ "description": "Minimum repository size (in bytes) to sync (inclusive). Repositories less than this size will be excluded from syncing."\ },\ "max": {\ "type": "integer",\ "description": "Maximum repository size (in bytes) to sync (inclusive). Repositories greater than this size will be excluded from syncing."\ }\ },\ "additionalProperties": false\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type"\ ],\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "GitlabConnectionConfig",\ "properties": {\ "type": {\ "const": "gitlab",\ "description": "GitLab Configuration"\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "An authentication token."\ },\ "url": {\ "type": "string",\ "format": "url",\ "default": "https://gitlab.com",\ "description": "The URL of the GitLab host. Defaults to https://gitlab.com",\ "examples": [\ "https://gitlab.com",\ "https://gitlab.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "all": {\ "type": "boolean",\ "default": false,\ "description": "Sync all projects visible to the provided `token` (if any) in the GitLab instance. This option is ignored if `url` is either unset or set to https://gitlab.com ."\ },\ "users": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of users to sync with. All projects owned by the user and visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property."\ },\ "groups": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "my-group"\ ],\ [\ "my-group/sub-group-a",\ "my-group/sub-group-b"\ ]\ ],\ "description": "List of groups to sync with. All projects in the group (and recursive subgroups) visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. Subgroups can be specified by providing the path to the subgroup (e.g. `my-group/sub-group-a`)."\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "my-group/my-project"\ ],\ [\ "my-group/my-sub-group/my-project"\ ]\ ],\ "description": "List of individual projects to sync with. The project's namespace must be specified. See: https://docs.gitlab.com/ee/user/namespace/"\ },\ "topics": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "minItems": 1,\ "description": "List of project topics to include when syncing. Only projects that match at least one of the provided `topics` will be synced. If not specified, all projects will be synced, unless explicitly defined in the `exclude` property. Glob patterns are supported.",\ "examples": [\ [\ "docs",\ "core"\ ]\ ]\ },\ "exclude": {\ "type": "object",\ "properties": {\ "forks": {\ "type": "boolean",\ "default": false,\ "description": "Exclude forked projects from syncing."\ },\ "archived": {\ "type": "boolean",\ "default": false,\ "description": "Exclude archived projects from syncing."\ },\ "userOwnedProjects": {\ "type": "boolean",\ "default": false,\ "description": "Exclude user-owned projects from syncing."\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "examples": [\ [\ "my-group/my-project"\ ]\ ],\ "description": "List of projects to exclude from syncing. Glob patterns are supported. The project's namespace must be specified, see: https://docs.gitlab.com/ee/user/namespace/"\ },\ "topics": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of project topics to exclude when syncing. Projects that match one of the provided `topics` will be excluded from syncing. Glob patterns are supported.",\ "examples": [\ [\ "tests",\ "ci"\ ]\ ]\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type"\ ],\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "GiteaConnectionConfig",\ "properties": {\ "type": {\ "const": "gitea",\ "description": "Gitea Configuration"\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "A Personal Access Token (PAT)."\ },\ "url": {\ "type": "string",\ "format": "url",\ "default": "https://gitea.com",\ "description": "The URL of the Gitea host. Defaults to https://gitea.com",\ "examples": [\ "https://gitea.com",\ "https://gitea.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "orgs": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "my-org-name"\ ]\ ],\ "description": "List of organizations to sync with. All repositories in the organization visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:organization scope."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+\\/[\\w.-]+$"\ },\ "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{repoName}' or '{userName}/{repoName}'."\ },\ "users": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "username-1",\ "username-2"\ ]\ ],\ "description": "List of users to sync with. All repositories that the user owns will be synced, unless explicitly defined in the `exclude` property. If a `token` is provided, it must have the read:user scope."\ },\ "exclude": {\ "type": "object",\ "properties": {\ "forks": {\ "type": "boolean",\ "default": false,\ "description": "Exclude forked repositories from syncing."\ },\ "archived": {\ "type": "boolean",\ "default": false,\ "description": "Exclude archived repositories from syncing."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "description": "List of individual repositories to exclude from syncing. Glob patterns are supported."\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type"\ ],\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "GerritConnectionConfig",\ "properties": {\ "type": {\ "const": "gerrit",\ "description": "Gerrit Configuration"\ },\ "url": {\ "type": "string",\ "format": "url",\ "description": "The URL of the Gerrit host.",\ "examples": [\ "https://gerrit.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of specific projects to sync. If not specified, all projects will be synced. Glob patterns are supported",\ "examples": [\ [\ "project1/repo1",\ "project2/**"\ ]\ ]\ },\ "exclude": {\ "type": "object",\ "properties": {\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "project1/repo1",\ "project2/**"\ ]\ ],\ "description": "List of specific projects to exclude from syncing."\ },\ "readOnly": {\ "type": "boolean",\ "default": false,\ "description": "Exclude read-only projects from syncing."\ },\ "hidden": {\ "type": "boolean",\ "default": false,\ "description": "Exclude hidden projects from syncing."\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type",\ "url"\ ],\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "BitbucketConnectionConfig",\ "properties": {\ "type": {\ "const": "bitbucket",\ "description": "Bitbucket configuration"\ },\ "user": {\ "type": "string",\ "description": "The username to use for API authentication. For app passwords, this is your Bitbucket username. For API tokens, this is your Bitbucket account email address."\ },\ "gitUser": {\ "type": "string",\ "description": "The username to use for git clone authentication over HTTPS. If not set, falls back to 'user'. For API tokens, this is your Bitbucket username"\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "An authentication token."\ },\ "url": {\ "type": "string",\ "format": "url",\ "default": "https://api.bitbucket.org/2.0",\ "description": "Bitbucket URL",\ "examples": [\ "https://bitbucket.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "deploymentType": {\ "type": "string",\ "enum": [\ "cloud",\ "server"\ ],\ "default": "cloud",\ "description": "The type of Bitbucket deployment"\ },\ "all": {\ "type": "boolean",\ "default": false,\ "description": "Sync all repositories visible to the provided `token` (if any) in the Bitbucket Server instance. This option is ignored if `deploymentType` is `cloud`."\ },\ "workspaces": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of workspaces to sync. Ignored if deploymentType is server."\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of projects to sync"\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "description": "List of repos to sync"\ },\ "exclude": {\ "type": "object",\ "properties": {\ "archived": {\ "type": "boolean",\ "default": false,\ "description": "Exclude archived repositories from syncing."\ },\ "forks": {\ "type": "boolean",\ "default": false,\ "description": "Exclude forked repositories from syncing."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "cloud_workspace/PROJECT_KEY/repo1",\ "SERVER_PROJECT_KEY/repo2"\ ]\ ],\ "description": "List of specific repos to exclude from syncing."\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type"\ ],\ "if": {\ "properties": {\ "deploymentType": {\ "const": "server"\ }\ }\ },\ "then": {\ "required": [\ "url"\ ]\ },\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "AzureDevOpsConnectionConfig",\ "properties": {\ "type": {\ "const": "azuredevops",\ "description": "Azure DevOps Configuration"\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "A Personal Access Token (PAT)."\ },\ "url": {\ "type": "string",\ "format": "url",\ "default": "https://dev.azure.com",\ "description": "The URL of the Azure DevOps host. For Azure DevOps Cloud, use https://dev.azure.com. For Azure DevOps Server, use your server URL.",\ "examples": [\ "https://dev.azure.com",\ "https://azuredevops.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "deploymentType": {\ "type": "string",\ "enum": [\ "cloud",\ "server"\ ],\ "description": "The type of Azure DevOps deployment"\ },\ "useTfsPath": {\ "type": "boolean",\ "default": false,\ "description": "Use legacy TFS path format (/tfs) in API URLs. Required for older TFS installations (TFS 2018 and earlier). When true, API URLs will include /tfs in the path (e.g., https://server/tfs/collection/_apis/...)."\ },\ "orgs": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+$"\ },\ "default": [],\ "examples": [\ [\ "my-org"\ ]\ ],\ "description": "List of organizations to sync with. For Cloud, this is the organization name. For Server, this is the collection name. All projects and repositories visible to the provided `token` will be synced, unless explicitly defined in the `exclude` property."\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+\\/[\\w.-]+$"\ },\ "default": [],\ "examples": [\ [\ "my-org/my-project",\ "my-collection/my-project"\ ]\ ],\ "description": "List of specific projects to sync with. Expected to be formatted as '{orgName}/{projectName}' for Cloud or '{collectionName}/{projectName}' for Server."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string",\ "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[\\w.-]+$"\ },\ "default": [],\ "examples": [\ [\ "my-org/my-project/my-repo"\ ]\ ],\ "description": "List of individual repositories to sync with. Expected to be formatted as '{orgName}/{projectName}/{repoName}'."\ },\ "exclude": {\ "type": "object",\ "properties": {\ "disabled": {\ "type": "boolean",\ "default": false,\ "description": "Exclude disabled repositories from syncing."\ },\ "repos": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "description": "List of repositories to exclude from syncing. Glob patterns are supported."\ },\ "projects": {\ "type": "array",\ "items": {\ "type": "string"\ },\ "default": [],\ "description": "List of projects to exclude from syncing. Glob patterns are supported."\ },\ "size": {\ "type": "object",\ "description": "Exclude repositories based on their size.",\ "properties": {\ "min": {\ "type": "integer",\ "description": "Minimum repository size (in bytes) to sync (inclusive). Repositories less than this size will be excluded from syncing."\ },\ "max": {\ "type": "integer",\ "description": "Maximum repository size (in bytes) to sync (inclusive). Repositories greater than this size will be excluded from syncing."\ }\ },\ "additionalProperties": false\ }\ },\ "additionalProperties": false\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type",\ "token",\ "deploymentType"\ ],\ "additionalProperties": false\ },\ {\ "$schema": "http://json-schema.org/draft-07/schema#",\ "type": "object",\ "title": "GenericGitHostConnectionConfig",\ "properties": {\ "type": {\ "const": "git",\ "description": "Generic Git host configuration"\ },\ "url": {\ "type": "string",\ "format": "url",\ "description": "The URL to the git repository. This can either be a remote URL (prefixed with `http://` or `https://`) or a absolute path to a directory on the local machine (prefixed with `file://`). If a local directory is specified, it must point to the root of a git repository. Local directories are treated as read-only modified. Local directories support glob patterns.",\ "pattern": "^(https?:\\/\\/[^\\s/$.?#].[^\\s]*|file:\\/\\/\\/[^\\s]+)$",\ "examples": [\ "https://github.com/sourcebot-dev/sourcebot",\ "file:///path/to/repo",\ "file:///repos/*"\ ]\ },\ "revisions": {\ "type": "object",\ "description": "The revisions (branches, tags) that should be included when indexing. The default branch (HEAD) is always indexed. A maximum of 64 revisions can be indexed, with any additional revisions being ignored.",\ "properties": {\ "branches": {\ "type": "array",\ "description": "List of branches to include when indexing. For a given repo, only the branches that exist on the repo's remote *and* match at least one of the provided `branches` will be indexed. The default branch (HEAD) is always indexed. Glob patterns are supported. A maximum of 64 branches can be indexed, with any additional branches being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "main",\ "release/*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ },\ "tags": {\ "type": "array",\ "description": "List of tags to include when indexing. For a given repo, only the tags that exist on the repo's remote *and* match at least one of the provided `tags` will be indexed. Glob patterns are supported. A maximum of 64 tags can be indexed, with any additional tags being ignored.",\ "items": {\ "type": "string"\ },\ "examples": [\ [\ "latest",\ "v2.*.*"\ ],\ [\ "**"\ ]\ ],\ "default": []\ }\ },\ "additionalProperties": false\ },\ "enforcePermissions": {\ "type": "boolean",\ "description": "Controls whether repository permissions are enforced for this connection. When `PERMISSION_SYNC_ENABLED` is false, this setting has no effect. Defaults to the value of `PERMISSION_SYNC_ENABLED`. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ },\ "enforcePermissionsForPublicRepos": {\ "type": "boolean",\ "default": false,\ "description": "Controls whether repository permissions are enforced for public repositories in this connection. When true, public repositories are only visible to users with a linked account for this connection's code host. When false, public repositories are visible to all users. Has no effect when enforcePermissions is false. Defaults to false. See https://docs.sourcebot.dev/docs/features/permission-syncing"\ }\ },\ "required": [\ "type",\ "url"\ ],\ "additionalProperties": false\ }\ ] } }, "additionalProperties": false }, "models": { "type": "array", "description": "Defines a collection of language models that are available to Sourcebot.", "items": { "type": "object", "title": "LanguageModel", "definitions": { "AmazonBedrockLanguageModel": { "type": "object", "properties": { "provider": { "const": "amazon-bedrock", "description": "Amazon Bedrock Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "accessKeyId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional access key ID to use with the model. Defaults to the `AWS_ACCESS_KEY_ID` environment variable." }, "accessKeySecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional secret access key to use with the model. Defaults to the `AWS_SECRET_ACCESS_KEY` environment variable." }, "sessionToken": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional session token to use with the model. Defaults to the `AWS_SESSION_TOKEN` environment variable." }, "region": { "type": "string", "description": "The AWS region. Defaults to the `AWS_REGION` environment variable.", "examples": [\ "us-east-1",\ "us-west-2",\ "eu-west-1"\ ] }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "AnthropicLanguageModel": { "type": "object", "properties": { "provider": { "const": "anthropic", "description": "Anthropic Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model, sent as the `x-api-key` header. Defaults to the `ANTHROPIC_API_KEY` environment variable." }, "authToken": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional auth token to use with the model, sent as the `Authorization: Bearer` header. Defaults to the `ANTHROPIC_AUTH_TOKEN` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "AzureLanguageModel": { "type": "object", "properties": { "provider": { "const": "azure", "description": "Azure Configuration" }, "model": { "type": "string", "description": "The deployment name of the Azure model." }, "displayName": { "type": "string", "description": "Optional display name." }, "resourceName": { "type": "string", "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable." }, "apiVersion": { "type": "string", "description": "Sets a custom api version. Defaults to `preview`." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." }, "reasoningEffort": { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "reasoningSummary": { "type": "string", "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.", "examples": [\ "none",\ "auto",\ "detailed"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "DeepSeekLanguageModel": { "type": "object", "properties": { "provider": { "const": "deepseek", "description": "DeepSeek Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { "provider": { "const": "google-generative-ai", "description": "Google Generative AI Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "thinkingLevel": { "type": "string", "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels", "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "thinkingBudget": { "type": "integer", "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget" }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleVertexAnthropicLanguageModel": { "type": "object", "properties": { "provider": { "const": "google-vertex-anthropic", "description": "Google Vertex AI Anthropic Configuration" }, "model": { "type": "string", "description": "The name of the Anthropic language model running on Google Vertex.", "examples": [\ "claude-sonnet-4"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "project": { "type": "string", "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." }, "region": { "type": "string", "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ] }, "credentials": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "GoogleVertexLanguageModel": { "type": "object", "properties": { "provider": { "const": "google-vertex", "description": "Google Vertex AI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "gemini-2.0-flash-exp",\ "gemini-1.5-pro",\ "gemini-1.5-flash"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "project": { "type": "string", "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." }, "region": { "type": "string", "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ] }, "credentials": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "thinkingLevel": { "type": "string", "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels", "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "thinkingBudget": { "type": "integer", "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget" }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "MistralLanguageModel": { "type": "object", "properties": { "provider": { "const": "mistral", "description": "Mistral AI Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "OpenAILanguageModel": { "type": "object", "properties": { "provider": { "const": "openai", "description": "OpenAI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "gpt-4.1",\ "o4-mini",\ "o3",\ "o3-deep-research"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "reasoningEffort": { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ] }, "reasoningSummary": { "type": "string", "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.", "examples": [\ "none",\ "auto",\ "detailed"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "OpenAICompatibleLanguageModel": { "type": "object", "properties": { "provider": { "const": "openai-compatible", "description": "OpenAI Compatible Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key. If specified, adds an `Authorization` header to request headers with the value Bearer ." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Base URL of the OpenAI-compatible chat completions API endpoint.", "examples": [\ "http://localhost:8080/v1"\ ] }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false }, "queryParams": { "type": "object", "description": "Optional query parameters to include in the request url.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false }, "reasoningTag": { "type": "string", "description": "The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`.", "default": "think", "examples": [\ "think",\ "thinking",\ "reasoning"\ ] }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." } }, "required": [\ "provider",\ "model",\ "baseUrl"\ ], "additionalProperties": false }, "OpenRouterLanguageModel": { "type": "object", "properties": { "provider": { "const": "openrouter", "description": "OpenRouter Configuration" }, "model": { "type": "string", "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false }, "XaiLanguageModel": { "type": "object", "properties": { "provider": { "const": "xai", "description": "xAI Configuration" }, "model": { "type": "string", "description": "The name of the language model.", "examples": [\ "grok-beta",\ "grok-vision-beta"\ ] }, "displayName": { "type": "string", "description": "Optional display name." }, "token": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable." }, "baseUrl": { "type": "string", "format": "url", "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, "temperature": { "type": "number", "description": "Optional temperature setting to use with the model." }, "headers": { "type": "object", "description": "Optional headers to use with the model.", "patternProperties": { "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": { "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ] } }, "additionalProperties": false } }, "required": [\ "provider",\ "model"\ ], "additionalProperties": false } }, "oneOf": [\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "amazon-bedrock",\ "description": "Amazon Bedrock Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "accessKeyId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional access key ID to use with the model. Defaults to the `AWS_ACCESS_KEY_ID` environment variable."\ },\ "accessKeySecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional secret access key to use with the model. Defaults to the `AWS_SECRET_ACCESS_KEY` environment variable."\ },\ "sessionToken": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional session token to use with the model. Defaults to the `AWS_SESSION_TOKEN` environment variable."\ },\ "region": {\ "type": "string",\ "description": "The AWS region. Defaults to the `AWS_REGION` environment variable.",\ "examples": [\ "us-east-1",\ "us-west-2",\ "eu-west-1"\ ]\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "anthropic",\ "description": "Anthropic Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model, sent as the `x-api-key` header. Defaults to the `ANTHROPIC_API_KEY` environment variable."\ },\ "authToken": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional auth token to use with the model, sent as the `Authorization: Bearer` header. Defaults to the `ANTHROPIC_AUTH_TOKEN` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "azure",\ "description": "Azure Configuration"\ },\ "model": {\ "type": "string",\ "description": "The deployment name of the Azure model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "resourceName": {\ "type": "string",\ "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable."\ },\ "apiVersion": {\ "type": "string",\ "description": "Sets a custom api version. Defaults to `preview`."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."\ },\ "reasoningEffort": {\ "type": "string",\ "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings",\ "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "reasoningSummary": {\ "type": "string",\ "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.",\ "examples": [\ "none",\ "auto",\ "detailed"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "deepseek",\ "description": "DeepSeek Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-generative-ai",\ "description": "Google Generative AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "thinkingLevel": {\ "type": "string",\ "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",\ "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "thinkingBudget": {\ "type": "integer",\ "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-vertex-anthropic",\ "description": "Google Vertex AI Anthropic Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the Anthropic language model running on Google Vertex.",\ "examples": [\ "claude-sonnet-4"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "project": {\ "type": "string",\ "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."\ },\ "region": {\ "type": "string",\ "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",\ "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ]\ },\ "credentials": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "google-vertex",\ "description": "Google Vertex AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "gemini-2.0-flash-exp",\ "gemini-1.5-pro",\ "gemini-1.5-flash"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "project": {\ "type": "string",\ "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable."\ },\ "region": {\ "type": "string",\ "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.",\ "examples": [\ "us-central1",\ "us-east1",\ "europe-west1"\ ]\ },\ "credentials": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "thinkingLevel": {\ "type": "string",\ "description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",\ "enum": [\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "thinkingBudget": {\ "type": "integer",\ "description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "mistral",\ "description": "Mistral AI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openai",\ "description": "OpenAI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "gpt-4.1",\ "o4-mini",\ "o3",\ "o3-deep-research"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "reasoningEffort": {\ "type": "string",\ "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings",\ "examples": [\ "none",\ "minimal",\ "low",\ "medium",\ "high"\ ]\ },\ "reasoningSummary": {\ "type": "string",\ "description": "Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'.",\ "examples": [\ "none",\ "auto",\ "detailed"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openai-compatible",\ "description": "OpenAI Compatible Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key. If specified, adds an `Authorization` header to request headers with the value Bearer ."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Base URL of the OpenAI-compatible chat completions API endpoint.",\ "examples": [\ "http://localhost:8080/v1"\ ]\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ },\ "queryParams": {\ "type": "object",\ "description": "Optional query parameters to include in the request url.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ },\ "reasoningTag": {\ "type": "string",\ "description": "The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`.",\ "default": "think",\ "examples": [\ "think",\ "thinking",\ "reasoning"\ ]\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ }\ },\ "required": [\ "provider",\ "model",\ "baseUrl"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "openrouter",\ "description": "OpenRouter Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model."\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "provider": {\ "const": "xai",\ "description": "xAI Configuration"\ },\ "model": {\ "type": "string",\ "description": "The name of the language model.",\ "examples": [\ "grok-beta",\ "grok-vision-beta"\ ]\ },\ "displayName": {\ "type": "string",\ "description": "Optional display name."\ },\ "token": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable."\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",\ "description": "Optional base URL."\ },\ "temperature": {\ "type": "number",\ "description": "Optional temperature setting to use with the model."\ },\ "headers": {\ "type": "object",\ "description": "Optional headers to use with the model.",\ "patternProperties": {\ "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$": {\ "anyOf": [\ {\ "type": "string"\ },\ {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ ]\ }\ },\ "additionalProperties": false\ }\ },\ "required": [\ "provider",\ "model"\ ],\ "additionalProperties": false\ }\ ] } }, "apps": { "type": "array", "description": "Defines a collection of apps that are available to Sourcebot.", "items": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "AppConfig", "definitions": { "GitHubAppConfig": { "type": "object", "properties": { "type": { "const": "github", "description": "GitHub App Configuration" }, "deploymentHostname": { "type": "string", "format": "hostname", "default": "github.com", "description": "The hostname of the GitHub App deployment.", "examples": [\ "github.com",\ "github.example.com"\ ] }, "id": { "type": "string", "description": "The ID of the GitHub App." }, "privateKey": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ], "description": "The private key of the GitHub App." } }, "required": [\ "type",\ "id",\ "privateKey"\ ], "additionalProperties": false } }, "oneOf": [\ {\ "type": "object",\ "properties": {\ "type": {\ "const": "github",\ "description": "GitHub App Configuration"\ },\ "deploymentHostname": {\ "type": "string",\ "format": "hostname",\ "default": "github.com",\ "description": "The hostname of the GitHub App deployment.",\ "examples": [\ "github.com",\ "github.example.com"\ ]\ },\ "id": {\ "type": "string",\ "description": "The ID of the GitHub App."\ },\ "privateKey": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ],\ "description": "The private key of the GitHub App."\ }\ },\ "required": [\ "type",\ "id",\ "privateKey"\ ],\ "additionalProperties": false\ }\ ] } }, "identityProviders": { "type": "array", "description": "Defines a collection of identity providers that are available to Sourcebot.", "items": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "IdentityProviderConfig", "definitions": { "GitHubIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "github" }, "purpose": { "enum": [\ "sso",\ "account_linking"\ ] }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "baseUrl": { "type": "string", "format": "url", "default": "https://github.com", "description": "The URL of the GitHub host. Defaults to https://github.com", "examples": [\ "https://github.com",\ "https://github.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "accountLinkingRequired": { "type": "boolean", "default": false } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ] }, "GitLabIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "gitlab" }, "purpose": { "enum": [\ "sso",\ "account_linking"\ ] }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "baseUrl": { "type": "string", "format": "url", "default": "https://gitlab.com", "description": "The URL of the GitLab host. Defaults to https://gitlab.com", "examples": [\ "https://gitlab.com",\ "https://gitlab.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "accountLinkingRequired": { "type": "boolean", "default": false } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ] }, "GoogleIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "google" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ] }, "OktaIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "okta" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "issuer": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ] }, "KeycloakIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "keycloak" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "issuer": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ] }, "MicrosoftEntraIDIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "microsoft-entra-id" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "issuer": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ] }, "GCPIAPIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "gcp-iap" }, "purpose": { "const": "sso" }, "audience": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "audience"\ ] }, "BitbucketCloudIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "bitbucket-cloud" }, "purpose": { "enum": [\ "sso",\ "account_linking"\ ] }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "accountLinkingRequired": { "type": "boolean", "default": false } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ] }, "AuthentikIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "authentik" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "issuer": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ] }, "JumpCloudIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "jumpcloud" }, "purpose": { "const": "sso" }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "issuer": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ] }, "BitbucketServerIdentityProviderConfig": { "type": "object", "additionalProperties": false, "properties": { "provider": { "const": "bitbucket-server" }, "purpose": { "enum": [\ "sso",\ "account_linking"\ ] }, "clientId": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "clientSecret": { "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ] }, "baseUrl": { "type": "string", "description": "The URL of the Bitbucket Server/Data Center host.", "examples": [\ "https://bitbucket.example.com"\ ], "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$" }, "accountLinkingRequired": { "type": "boolean", "default": false } }, "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "baseUrl"\ ] } }, "oneOf": [\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "github"\ },\ "purpose": {\ "enum": [\ "sso",\ "account_linking"\ ]\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "default": "https://github.com",\ "description": "The URL of the GitHub host. Defaults to https://github.com",\ "examples": [\ "https://github.com",\ "https://github.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "accountLinkingRequired": {\ "type": "boolean",\ "default": false\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "gitlab"\ },\ "purpose": {\ "enum": [\ "sso",\ "account_linking"\ ]\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "baseUrl": {\ "type": "string",\ "format": "url",\ "default": "https://gitlab.com",\ "description": "The URL of the GitLab host. Defaults to https://gitlab.com",\ "examples": [\ "https://gitlab.com",\ "https://gitlab.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "accountLinkingRequired": {\ "type": "boolean",\ "default": false\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "google"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "okta"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "issuer": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "keycloak"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "issuer": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "microsoft-entra-id"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "issuer": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "gcp-iap"\ },\ "purpose": {\ "const": "sso"\ },\ "audience": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "audience"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "authentik"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "issuer": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "bitbucket-cloud"\ },\ "purpose": {\ "enum": [\ "sso",\ "account_linking"\ ]\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "accountLinkingRequired": {\ "type": "boolean",\ "default": false\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "jumpcloud"\ },\ "purpose": {\ "const": "sso"\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "issuer": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "issuer"\ ]\ },\ {\ "type": "object",\ "additionalProperties": false,\ "properties": {\ "provider": {\ "const": "bitbucket-server"\ },\ "purpose": {\ "enum": [\ "sso",\ "account_linking"\ ]\ },\ "clientId": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "clientSecret": {\ "anyOf": [\ {\ "type": "object",\ "properties": {\ "env": {\ "type": "string",\ "description": "The name of the environment variable that contains the token."\ }\ },\ "required": [\ "env"\ ],\ "additionalProperties": false\ },\ {\ "type": "object",\ "properties": {\ "googleCloudSecret": {\ "type": "string",\ "description": "The resource name of a Google Cloud secret. Must be in the format `projects//secrets//versions/`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"\ }\ },\ "required": [\ "googleCloudSecret"\ ],\ "additionalProperties": false\ }\ ]\ },\ "baseUrl": {\ "type": "string",\ "description": "The URL of the Bitbucket Server/Data Center host.",\ "examples": [\ "https://bitbucket.example.com"\ ],\ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"\ },\ "accountLinkingRequired": {\ "type": "boolean",\ "default": false\ }\ },\ "required": [\ "provider",\ "purpose",\ "clientId",\ "clientSecret",\ "baseUrl"\ ]\ }\ ] } } }, "additionalProperties": false } Was this page helpful? YesNo [Suggest edits](https://github.com/sourcebot-dev/sourcebot/edit/main/docs/docs/connections/overview.mdx) [Raise issue](https://github.com/sourcebot-dev/sourcebot/issues/new?title=Issue%20on%20docs&body=Path:%20/docs/connections/overview) [Environment variables\ \ Previous](https://docs.sourcebot.dev/docs/configuration/environment-variables) [Linking code from GitHub\ \ Next](https://docs.sourcebot.dev/docs/connections/github) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) --- # Vercel Security Checkpoint We're verifying your browser [Website owner? Click here to fix](https://vercel.link/security-checkpoint) ---