Skip to content

feat: Ask Sourcebot #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 123 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
5e400bd
wip
brendan-kellam May 7, 2025
e4ee716
wip
brendan-kellam Jun 10, 2025
c73b00d
wip: add inline citations
brendan-kellam Jun 10, 2025
fb0e44a
Add read file tool
brendan-kellam Jun 10, 2025
446112b
code block rendering
brendan-kellam Jun 10, 2025
571b55f
Add find all refs / get defs tool
brendan-kellam Jun 11, 2025
c7a771a
Add range field to citations
brendan-kellam Jun 12, 2025
bbf4bec
wip on context system
brendan-kellam Jun 13, 2025
4c1ebae
wip on adding context window panel
brendan-kellam Jun 13, 2025
fe8479e
wip on adding context system
brendan-kellam Jun 14, 2025
36202ee
Add useBrowsePath
brendan-kellam Jun 17, 2025
8534924
try out claude
brendan-kellam Jun 17, 2025
f7ab5f9
clickable links
brendan-kellam Jun 17, 2025
53fcb5a
WIP: playing around with slate to drive @ mentions
brendan-kellam Jun 19, 2025
187a092
experiment: reduce input token usage by altering file search payload …
brendan-kellam Jun 19, 2025
97bbebd
small improvements
brendan-kellam Jun 19, 2025
cea3962
further improvements to @ mention system
brendan-kellam Jun 19, 2025
2b1952f
chat persistance + working on new chat UI
brendan-kellam Jun 19, 2025
828ba99
add input message support
brendan-kellam Jun 20, 2025
aea6c18
switch to openai
brendan-kellam Jun 20, 2025
824c2bf
fix
brendan-kellam Jun 20, 2025
1ab148b
fix
brendan-kellam Jun 20, 2025
b76ca87
Add markdown rendering using marked
brendan-kellam Jun 21, 2025
63b87e8
formatting nits
brendan-kellam Jun 21, 2025
a9bb163
wip on annotations using markdown
brendan-kellam Jun 22, 2025
fd02802
Add line numbers to source to make it easier for LLMs to reference sp…
brendan-kellam Jun 22, 2025
d9facb2
nits
brendan-kellam Jun 22, 2025
aa21412
centralize vscode icons
brendan-kellam Jun 22, 2025
74b3517
stylelized read files tool component
brendan-kellam Jun 22, 2025
14a985c
much progress on styled tool results
brendan-kellam Jun 23, 2025
b1997da
fix bug with scroll area width
brendan-kellam Jun 23, 2025
d8816fb
switch over to rendering using react-markdown. Render code blocks usi…
brendan-kellam Jun 23, 2025
fea6e47
Add metadata to generated codeblocks. Make codemirror rendering nicer
brendan-kellam Jun 23, 2025
5d1e1e6
fix: only encode path part
brendan-kellam Jun 24, 2025
83cda04
fix: remove forced session update on settings dropdown since that was…
brendan-kellam Jun 24, 2025
1e6e18d
wip on perf improvements: render lightweight code editor when streaming
brendan-kellam Jun 24, 2025
d661bde
resolve conflicts
brendan-kellam Jun 24, 2025
bb02fb1
scroll restoration + some improvements to code block rendering
brendan-kellam Jun 25, 2025
1d65f25
fix
brendan-kellam Jun 25, 2025
907027a
rendering nits + auto scroll
brendan-kellam Jun 26, 2025
90992da
Add hints to inline code blocks
brendan-kellam Jun 26, 2025
4ec001e
fix issues with scroll restoration
brendan-kellam Jun 26, 2025
6f32b76
refactor everything into seperate components
brendan-kellam Jun 26, 2025
956d98e
proper initial message handling
brendan-kellam Jun 26, 2025
f4e3bf8
Make the repo selector actually do something
brendan-kellam Jun 26, 2025
d40acaa
configurable model providers
brendan-kellam Jun 27, 2025
83a6231
save search mode to local storage. Other small nits
brendan-kellam Jun 27, 2025
9059907
Add support for gemini
brendan-kellam Jun 27, 2025
c468a3c
Add bedrock support
brendan-kellam Jun 27, 2025
70a9395
small ux nits: submit button, keyboard shortcuts, auto focus, etc.
brendan-kellam Jun 28, 2025
10cdcba
persist chats to DB
brendan-kellam Jun 28, 2025
8c4ad65
feat: Add chat history side panel
brendan-kellam Jun 29, 2025
d9fcdcf
Add chat title summarization
brendan-kellam Jun 30, 2025
cafbcd8
add ability to rename / delete chats
brendan-kellam Jun 30, 2025
3662977
chore: add chat name to top-bar; make things work when user is unauth…
brendan-kellam Jul 3, 2025
ddc9159
Add stop button
brendan-kellam Jul 3, 2025
752d8b8
wip: Add reasoning output
brendan-kellam Jul 4, 2025
5b8ace7
chore: upgrade to ai-sdk v5 beta
brendan-kellam Jul 4, 2025
466695b
Add remark reference plugin
brendan-kellam Jul 7, 2025
1bfd7ee
small overhall in how we present the chat thread
brendan-kellam Jul 8, 2025
af45097
Add table of contents
brendan-kellam Jul 8, 2025
624b48b
Adds a navigation guard to chat that warns the user that leaving the …
brendan-kellam Jul 8, 2025
9fb0503
fix issue with rendering code blocks
brendan-kellam Jul 8, 2025
f2100c9
fix docker build errors
msukkari Jul 8, 2025
2f253a6
Revert "fix docker build errors"
brendan-kellam Jul 8, 2025
ec96fd2
wip: Reference list viewer
brendan-kellam Jul 8, 2025
25ceee2
nits
brendan-kellam Jul 9, 2025
1c3e93b
chore: remove full codemirror cell output in chat thread
brendan-kellam Jul 9, 2025
7e3a658
Add tool UX for find refs / defs
brendan-kellam Jul 9, 2025
df50e28
Clarify the concept of a source and a reference. Various cleanup work
brendan-kellam Jul 10, 2025
cb0fe49
Add reference scrolling
brendan-kellam Jul 10, 2025
9071159
scroll handling
brendan-kellam Jul 10, 2025
87f3381
small nit
brendan-kellam Jul 11, 2025
c16fcfc
improved highlight range styling
brendan-kellam Jul 11, 2025
e1f616a
color selection tweak
brendan-kellam Jul 11, 2025
90187f6
color tweak
brendan-kellam Jul 11, 2025
b5a3d74
feat: Add code folding to file reference viewer
brendan-kellam Jul 12, 2025
5b50c04
Collapsable code cells
brendan-kellam Jul 12, 2025
86c56d0
Small UX improvements like collapsable chat
brendan-kellam Jul 12, 2025
4193a21
support file references with only a start line
brendan-kellam Jul 12, 2025
27fbb78
cleanup & some devex improvements to how we handle file references
brendan-kellam Jul 13, 2025
e20d810
output openai reasoning tokens
brendan-kellam Jul 13, 2025
fe6fdcc
Add tooltip to mention elements
brendan-kellam Jul 13, 2025
44e28d0
wip on refactoring homepage
brendan-kellam Jul 15, 2025
35b5a46
feat: Add repo suggestions. todo: wire up repo selector to chat box
brendan-kellam Jul 15, 2025
281d8f0
wip on homepage redesign - add agentic search examples
brendan-kellam Jul 15, 2025
110d1d7
Add model provider info to 'new chat' page
brendan-kellam Jul 15, 2025
3e7acf8
wip: source selected repos from @ mentions found in the chat box
brendan-kellam Jul 16, 2025
6b2df65
chore: add a mechanism to truncate large files
brendan-kellam Jul 16, 2025
cc06480
chore: bump to latest ai sdk version
brendan-kellam Jul 16, 2025
e38f469
Various refactors, including: 1) move LLM invocation into a sperate '…
brendan-kellam Jul 21, 2025
6d2081b
resolve conflicts
brendan-kellam Jul 21, 2025
585d3ed
Add back table of contents
brendan-kellam Jul 21, 2025
507d537
Copy button
brendan-kellam Jul 21, 2025
c349add
Add support for like / dislike buttons
brendan-kellam Jul 21, 2025
27ef6d3
Add chat history to LLM input
brendan-kellam Jul 21, 2025
dd99109
switch over to using config.json for configuring models. Add language…
brendan-kellam Jul 21, 2025
cda8a7f
Add tooltips explaining each search mode
brendan-kellam Jul 22, 2025
9270f29
more nits with search mode tooltip
brendan-kellam Jul 22, 2025
8a5c7e7
Load repos in server component. Various other nit fixes and improvements
brendan-kellam Jul 22, 2025
4fbb459
Remove repositories from being a mentionable item, instead opting for…
brendan-kellam Jul 22, 2025
4293cbd
simplification: remove file truncation
brendan-kellam Jul 22, 2025
ac8126c
instruct the LLM to output the answer and stop researching when we ar…
brendan-kellam Jul 22, 2025
334ac73
Add news data
brendan-kellam Jul 22, 2025
da21a5b
Add basic chat history component to homepag
brendan-kellam Jul 22, 2025
253b055
small tweaks here and there
brendan-kellam Jul 22, 2025
6e531fd
rename to ask sourcebot
brendan-kellam Jul 22, 2025
14e9660
update readme
msukkari Jul 22, 2025
e61ae50
Improved anonymous access handling: add concept of chat visibility an…
brendan-kellam Jul 22, 2025
3e0c5b1
Fix build errors
brendan-kellam Jul 22, 2025
c9a7fcc
add support for google vertex
msukkari Jul 23, 2025
0d894cf
small nits with example queries
brendan-kellam Jul 23, 2025
fca9c68
add antrhopic vertex support:
msukkari Jul 23, 2025
95cfd11
remove log
msukkari Jul 23, 2025
0377e2f
changelog
brendan-kellam Jul 23, 2025
096b245
Make repo selection required
brendan-kellam Jul 23, 2025
d54ffd7
docs
msukkari Jul 23, 2025
64b9f99
Add langfuse integration
brendan-kellam Jul 23, 2025
2cc5027
Update og metadata description
brendan-kellam Jul 23, 2025
eea0e06
nits
brendan-kellam Jul 23, 2025
fa74f03
readme nit
brendan-kellam Jul 23, 2025
1707be8
more docs
msukkari Jul 23, 2025
d29a972
feedback
brendan-kellam Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/_gcp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
NEXT_PUBLIC_SENTRY_ENVIRONMENT=${{ vars.NEXT_PUBLIC_SENTRY_ENVIRONMENT }}
NEXT_PUBLIC_SENTRY_WEBAPP_DSN=${{ vars.NEXT_PUBLIC_SENTRY_WEBAPP_DSN }}
NEXT_PUBLIC_SENTRY_BACKEND_DSN=${{ vars.NEXT_PUBLIC_SENTRY_BACKEND_DSN }}
NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY=${{ vars.NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY }}
NEXT_PUBLIC_LANGFUSE_BASE_URL=${{ vars.NEXT_PUBLIC_LANGFUSE_BASE_URL }}
SENTRY_SMUAT=${{ secrets.SENTRY_SMUAT }}
SENTRY_ORG=${{ vars.SENTRY_ORG }}
SENTRY_WEBAPP_PROJECT=${{ vars.SENTRY_WEBAPP_PROJECT }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Introducing Ask Sourcebot - ask natural langauge about your codebase. Get back comprehensive Markdown responses with inline citations back to the code. Bring your own LLM api key. [#392](https://github.com/sourcebot-dev/sourcebot/pull/392)

## [4.5.3] - 2025-07-20

### Changed
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@

# About

Sourcebot lets you index all your repos and branches across multiple code hosts (GitHub, GitLab, Bitbucket, Gitea, or Gerrit) and search through them using a blazingly fast interface.
Sourcebot is a self-hosted tool that helps you understand your codebase.

https://github.com/user-attachments/assets/ced355f3-967e-4f37-ae6e-74ab8c06b9ec
- **Ask Sourcebot:** Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations.
- **Code search:** Search and navigate across all your repos and branches, no matter where they’re hosted.

https://github.com/user-attachments/assets/286ad97a-a543-4eef-a2f1-4fa31bea1b32


## Features
- 💻 **One-command deployment**: Get started instantly using Docker on your own machine.
- 🔍 **Multi-repo search**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Bitbucket, Gitea, or Gerrit.
- ⚡**Lightning fast performance**: Built on top of the powerful [Zoekt](https://github.com/sourcegraph/zoekt) search engine.
- 🎨 **Modern web app**: Enjoy a sleek interface with features like syntax highlighting, light/dark mode, and vim-style navigation
- 🤖 **Bring your own model**: Connect Sourcebot to any of the reasoning models you're already using.
- 🔍 **Multi-repo support**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Bitbucket, Gitea, or Gerrit.
- ⚡ **Lightning fast performance**: Built on top of the powerful [Zoekt](https://github.com/sourcegraph/zoekt) search engine.
- 🎨 **Modern web app**: Enjoy a sleek interface with features like syntax highlighting, light/dark mode, and vim-style navigation.
- 📂 **Full file visualization**: Instantly view the entire file when selecting any search result.

You can try out our public hosted demo [here](https://demo.sourcebot.dev)!
Expand Down
16 changes: 13 additions & 3 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,21 @@
"group": "Features",
"pages": [
{
"group": "Search",
"group": "Code Search",
"pages": [
"docs/features/search/overview",
"docs/features/search/syntax-reference",
"docs/features/search/multi-branch-indexing",
"docs/features/search/search-contexts"
]
},
{
"group": "Ask Sourcebot",
"pages": [
"docs/features/ask/overview",
"docs/features/ask/add-model-providers"
]
},
"docs/features/code-navigation",
"docs/features/analytics",
"docs/features/mcp-server",
Expand All @@ -51,6 +59,7 @@
{
"group": "Configuration",
"pages": [
"docs/configuration/config-file",
{
"group": "Indexing your code",
"pages": [
Expand All @@ -66,8 +75,7 @@
"docs/connections/request-new"
]
},
"docs/license-key",
"docs/configuration/environment-variables",
"docs/configuration/language-model-providers",
{
"group": "Authentication",
"pages": [
Expand All @@ -78,6 +86,8 @@
"docs/configuration/auth/faq"
]
},
"docs/configuration/environment-variables",
"docs/license-key",
"docs/configuration/transactional-emails",
"docs/configuration/structured-logging",
"docs/configuration/audit-logs"
Expand Down
49 changes: 49 additions & 0 deletions docs/docs/configuration/config-file.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Config File
sidebarTitle: Config file
---

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:

```bash icon="terminal" 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](#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](/docs/connections/overview) (`connections`): Defines a set of connections that tell Sourcebot which repos to index and from where
- [Language Models](/docs/configuration/language-model-providers) (`models`): Defines a set of language model providers for use with [Ask Sourcebot](/docs/features/ask)
- [Settings](#settings) (`settings`): Additional settings to tweak your Sourcebot deployment
- [Search Contexts](/docs/features/search/search-contexts) (`contexts`): Groupings of repos that you can search against

# Config File Syncing

Sourcebot syncs the config file on startup, and automatically whenever a change is detected.

# 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. |
184 changes: 184 additions & 0 deletions docs/docs/configuration/language-model-providers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---
title: Language Model Providers
sidebarTitle: Language model providers
---

To use [Ask Sourcebot](/docs/features/ask) you must define at least one Language Model Provider. These providers are defined within the [config file](/docs/configuration/config-file) you
provide Sourcebot.


```json wrap icon="code" 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"
}
}
]
}
```

# 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/discussions/categories/feature-requests).

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).

<Note>Any parameter defined using `env` will read the value from the corresponding environment variable you provide Sourcebot</Note>

### Amazon Bedrock

[Vercel AI SDK Amazon Bedrock Docs](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)

```json wrap icon="code" 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"
},
"region": "YOUR_REGION_HERE", // defaults to the AWS_REGION env var if not set
"baseUrl": "OPTIONAL_BASE_URL"
}
]
}
```

### Anthropic

[Vercel AI SDK Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)

```json wrap icon="code" 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",
"token": {
"env": "ANTHROPIC_API_KEY"
},
"baseUrl": "OPTIONAL_BASE_URL"
}
]
}
```

### Google Generative AI

[Vercel AI SDK Google Generative AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)

```json wrap icon="code" 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"
}
]
}
```

### Google Vertex

<Note>If you're using an Anthropic model on Google Vertex, you must define a [Google Vertex Anthropic](#google-vertex-anthropic) provider instead</Note>
<Note>The `credentials` paramater 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.</Note>

[Vercel AI SDK Google Vertex AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex)

```json wrap icon="code" 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", // e.g., "gemini-2.0-flash-exp", "gemini-1.5-pro", "gemini-1.5-flash"
"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, e.g., "us-central1", "us-east1", "europe-west1"
"credentials": {
"env": "GOOGLE_APPLICATION_CREDENTIALS"
},
"baseUrl": "OPTIONAL_BASE_URL"
}
]
}
```

### Google Vertex Anthropic

<Note>The `credentials` paramater 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.</Note>


[Vercel AI SDK Google Vertex Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex#google-vertex-anthropic-provider-usage)

```json wrap icon="code" 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", // e.g., "claude-sonnet-4"
"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, e.g., "us-central1", "us-east1", "europe-west1"
"credentials": {
"env": "GOOGLE_APPLICATION_CREDENTIALS"
},
"baseUrl": "OPTIONAL_BASE_URL"
}
]
}
```

### OpenAI

[Vercel AI SDK OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/openai)

```json wrap icon="code" 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", // e.g., "gpt-4.1", "o4-mini", "o3", "o3-deep-research"
"displayName": "OPTIONAL_DISPLAY_NAME",
"token": {
"env": "OPENAI_API_KEY"
},
"baseUrl": "OPTIONAL_BASE_URL"
}
]
}
```
2 changes: 2 additions & 0 deletions docs/docs/connections/bitbucket-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'
Looking for docs on Bitbucket Data Center? See [this doc](/docs/connections/bitbucket-data-center).
</Note>

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Examples

<AccordionGroup>
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/connections/bitbucket-data-center.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'
Looking for docs on Bitbucket Cloud? See [this doc](/docs/connections/bitbucket-cloud).
</Note>

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Examples

<AccordionGroup>
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/connections/generic-git-host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import GenericGitHost from '/snippets/schemas/v3/genericGitHost.schema.mdx'

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](/docs/connections/overview#supported-code-hosts).

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Getting Started

To connect to a Git host, create a new [connection](/docs/connections/overview) with type `git` and specify the clone url in the `url` property. For example:
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/connections/gerrit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import GerritSchema from '/snippets/schemas/v3/gerrit.schema.mdx'

Sourcebot can sync code from self-hosted gerrit instances.

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Connecting to a Gerrit instance

To connect to a gerrit instance, provide the `url` property to your config:
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/connections/gitea.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import GiteaSchema from '/snippets/schemas/v3/gitea.schema.mdx'

Sourcebot can sync code from Gitea Cloud, and self-hosted.

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Examples

<AccordionGroup>
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/connections/github.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import GitHubSchema from '/snippets/schemas/v3/github.schema.mdx'

Sourcebot can sync code from GitHub.com, GitHub Enterprise Server, and GitHub Enterprise Cloud.

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Examples

<AccordionGroup>
Expand Down
1 change: 1 addition & 0 deletions docs/docs/connections/gitlab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import GitLabSchema from '/snippets/schemas/v3/gitlab.schema.mdx'

Sourcebot can sync code from GitLab.com, Self Managed (CE & EE), and Dedicated.

If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.

## Examples

Expand Down
Loading