Skip to content

Commit addec60

Browse files
authored
Update model config docs (#690)
<!-- Explain the changes introduced in your PR --> Ideally, setting `"cody.enabled": true` in the site config should be sufficient to enable Cody with the default configuration. However, we discovered a bug where this isn’t currently the case. Without specifying the `"completions"` or `"modelConfiguration"` fields, the default Cody setup doesn’t work as expected. This PR updates the code examples on the model configuration page to clarify that the `"cody.enabled": true` field must always be accompanied by either the `"completions"` or `"modelConfiguration"` fields (for more details see sourcegraph/sourcegraph#839). ## Pull Request approval Although pull request approval is not enforced for this repository in order to reduce friction, merging without a review will generate a ticket for the docs team to review your changes. So if possible, have your pull request approved before merging.
1 parent c7e977e commit addec60

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/cody/clients/model-configuration.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ This requires site-admin privileges. To do so,
4242
```json
4343
{
4444
// [...]
45-
"cody.enabled": true
45+
"cody.enabled": true,
46+
"completions": {
47+
"provider": "sourcegraph"
48+
}
4649
}
4750
```
4851

@@ -319,6 +322,7 @@ The simplest way to configure your Sourcegraph Enterprise would be to add the fo
319322

320323
```json
321324
...
325+
"cody.enabled": true,
322326
"modelConfiguration": {
323327
"sourcegraph": {}
324328
},
@@ -360,6 +364,7 @@ The `"allow"` and `"deny"` fields, are arrays of [model references](#model-confi
360364
The following examples illustrate how to use all these settings in conjunction:
361365

362366
```json
367+
"cody.enabled": true,
363368
"modelConfiguration": {
364369
"sourcegraph": {
365370
"modelFilters": {
@@ -390,6 +395,7 @@ The `"modelConfiguration"` setting also contains a `"defaultModels"` field that
390395

391396
```json
392397
...
398+
"cody.enabled": true,
393399
"modelConfiguration": {
394400
"defaultModels": {
395401
"chat": "anthropic::2023-06-01::claude-3.5-sonnet",
@@ -421,6 +427,7 @@ By defining a provider override in your Sourcegraph site configuration, you are
421427
The following configuration shippet defines a single provider override with the ID `"anthropic"`.
422428

423429
```json
430+
"cody.enabled": true,
424431
"modelConfiguration": {
425432
// Do not use any Sourcegraph-supplied models.
426433
"sourcegraph": null,
@@ -487,6 +494,7 @@ With a provider defined, we can now specify custom models using that provider by
487494
The following configuration snippet defines a custom model, using the `"anthropic"` provider from the previous example.
488495

489496
```json
497+
"cody.enabled": true,
490498
"modelConfiguration": {
491499
...
492500
"modelOverrides": [

0 commit comments

Comments
 (0)