Skip to content

Commit 3551c9d

Browse files
committed
wip
1 parent 1467b00 commit 3551c9d

File tree

2 files changed

+67
-3
lines changed

2 files changed

+67
-3
lines changed

docs/cody/model-configuration/examples.mdx

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,79 @@ In the configuration above, we:
417417

418418
</Accordion>
419419

420-
<Accordion title="Google Vertex (Gemini)"></Accordion>
420+
<Accordion title="Google Vertex (Gemini)">
421+
422+
TODO
423+
424+
</Accordion>
421425

422426
<Accordion title="Google Vertex (public)">
423427

424428
TODO
425429

426430
</Accordion>
427431

428-
<Accordion title="AWS Bedrock"></Accordion>
432+
<Accordion title="AWS Bedrock">
433+
434+
```json
435+
"cody.enabled": true,
436+
"modelConfiguration": {
437+
"sourcegraph": null,
438+
"providerOverrides": [
439+
{
440+
"id": "aws-bedrock",
441+
"displayName": "AWS Bedrock",
442+
"serverSideConfig": {
443+
"type": "awsBedrock",
444+
"accessToken": "token",
445+
"endpoint": "us-west-2",
446+
"region": "us-west-2"
447+
}
448+
}
449+
],
450+
"modelOverrides": [
451+
{
452+
"modelRef": "aws-bedrock::2023-06-01::claude-3-opus",
453+
"displayName": "Claude 3 Opus (AWS Bedrock)",
454+
"modelName": "anthropic.claude-3-opus-20240229-v1:0",
455+
"capabilities": ["edit", "chat", "autocomplete"],
456+
"category": "other",
457+
"status": "stable",
458+
"tier": "pro",
459+
"contextWindow": {
460+
"maxInputTokens": 45000,
461+
"maxOutputTokens": 4000
462+
}
463+
}
464+
],
465+
"defaultModels": {
466+
"chat": "aws-bedrock::2023-06-01::claude-3-opus",
467+
"fastChat": "aws-bedrock::2023-06-01::claude-3-opus",
468+
"autocomplete": "aws-bedrock::2023-06-01::claude-3-opus",
469+
}
470+
}
471+
```
472+
473+
In the configuration described above, we:
474+
475+
- Set up a provider override for AWS Bedrock, routing requests for this provider directly to the specified endpoint,
476+
bypassing Cody Gateway.
477+
- Add the `"aws-bedrock::2023-06-01::claude-3-opus"` model, which is used for all Cody features.
478+
We do not add other models for simplicity, as adding multiple models is already covered in the examples above.
479+
480+
Provider override `serverSideConfig` fields:
481+
482+
| Field | Description |
483+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
484+
| `type` | Must be `"awsBedrock"`. |
485+
| `accessToken` | Leave empty to rely on instance role bindings or other AWS configurations in the frontend service. Use `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>` for direct credential configuration, or `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>:<SESSION_TOKEN>` if a session token is also required. |
486+
| `endpoint` | For Pay-as-you-go, set it to an AWS region code (e.g., `us-west-2`) when using a public Amazon Bedrock endpoint. For Provisioned Throughput, set it to the provisioned VPC endpoint for the bedrock-runtime API (e.g., `https://vpce-0a10b2345cd67e89f-abc0defg.bedrock-runtime.us-west-2.vpce.amazonaws.com`). |
487+
| `region` | The region to use when configuring API clients. This is necessary because the 'frontend' binary's container cannot access environment variables from the host OS. |
488+
489+
Provisioned throughput for AWS Bedrock models can be configured using the `"awsBedrockProvisionedThroughput"` server-side
490+
configuration type. For more details, refer to the [Model Overrides](/cody/model-configuration#model-overrides) section.
491+
492+
</Accordion>
429493

430494
## Self-hosted models
431495

docs/cody/model-configuration/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ This field is an array of items, each with the following fields:
230230
It includes two fields:
231231
- `maxInputTokens` - Specifies the maximum number of tokens for the contextual data in the prompt (e.g., question, relevant snippets).
232232
- `maxOutputTokens` - Specifies the maximum number of tokens allowed in the response.
233-
- `serverSideConfig` - Additional configuration for the model. The available fields include:
233+
- `serverSideConfig` - Additional configuration for the model. Can be one of the following:
234234

235235
- `awsBedrockProvisionedThroughput` - Specifies provisioned throughput settings for AWS Bedrock models, with the following fields:
236236

0 commit comments

Comments
 (0)