Skip to content

Commit bf005d6

Browse files
authored
Merge branch 'main' into sg-next-jun25
2 parents 279b6f0 + d79ab6f commit bf005d6

File tree

5 files changed

+94
-47
lines changed

5 files changed

+94
-47
lines changed

docs/code-search/code-navigation/precise_code_navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Precise Code Navigation requires language-specific indexes to be generated and u
4848
| Rust | [rust-analyzer](https://sourcegraph.com/github.com/rust-lang/rust-analyzer) | 🟢 Generally available |
4949
| Python | [scip-python](https://sourcegraph.com/github.com/sourcegraph/scip-python) | 🟢 Generally available |
5050
| Ruby | [scip-ruby](https://sourcegraph.com/github.com/sourcegraph/scip-ruby) | 🟢 Generally available |
51-
| C#, Visual Basic | [scip-dotnet](https://github.com/sourcegraph/scip-dotnet) | 🟡 Partially available |
51+
| C#, Visual Basic | [scip-dotnet](https://github.com/sourcegraph/scip-dotnet) | 🟢 Generally available |
5252

5353
The easiest way to configure precise code navigation is with [auto-indexing](/code-search/code-navigation/auto_indexing). This feature uses [Sourcegraph executors](/admin/executors/) to automatically create indexes for the code, keeping precise code navigation available and up-to-date.
5454

docs/code-search/code-navigation/writing_an_indexer.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ This table is maintained as an authoritative resource for users, Sales, and Cust
121121
| --------------------- | ----------------- | ------ | ---------- | ---------------- | --------------- | ---------- | ---------------- | -------------------- |
122122
| Go | [scip-go] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
123123
| TypeScript/ <br /> JavaScript | [scip-typescript] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
124-
| C/C++ | [scip-clang] | 🟡 | ✓ | ✓ | ✓ | ✓ | ✓ | |
125-
| Java | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓* | ✓ | ✓ |
126-
| Scala | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓* | ✓ | ✓ |
127-
| Kotlin | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓* | ✗ | ✓ |
128-
| Rust | [rust-analyzer] | 🟢 | ✓ | ✓ | ✓ | ✓* | ✗ | ✓ |
124+
| C/C++ | [scip-clang] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | |
125+
| Java | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
126+
| Scala | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
127+
| Kotlin | [scip-java] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ |
128+
| Rust | [rust-analyzer] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ |
129129
| Python | [scip-python] | 🟢 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
130-
| Ruby | [scip-ruby] | 🟢 | ✓ | ✓ | ✓ | ✓ | | ✓ |
131-
| C# | [scip-dotnet] Build tools (`.sln`, `.csproj`) | 🟠 | ✓ | ✓ | ✓ | | ✓ | ✓ |
130+
| Ruby | [scip-ruby] | 🟢 | ✓ | ✓ | ✓ | ✓ | | ✓ |
131+
| C# | [scip-dotnet] Build tools (`.sln`, `.csproj`) | 🟢 | ✓ | ✓ | ✓ | | ✗ | ✓ |
132132
133133
[scip-go]: https://github.com/sourcegraph/scip-go
134134
[scip-typescript]: https://github.com/sourcegraph/scip-typescript

docs/cody/enterprise/completions-configuration.mdx

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,58 @@ For `accessToken`, you can either:
9191
- Set it to `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>` if directly configuring the credentials
9292
- Set it to `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>:<SESSION_TOKEN>` if a session token is also required
9393

94-
<Callout type="warning">
95-
We only recommend configuring AWS Bedrock to use an accessToken for
96-
authentication. Specifying no accessToken (e.g. to use [IAM roles for EC2 /
97-
instance role
98-
binding](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html))
99-
is not currently recommended (there is a known performance bug with this
100-
method which will prevent autocomplete from working correctly. (internal
101-
issue: PRIME-662)
102-
</Callout>
94+
#### AWS Bedrock: Latency optimization
95+
96+
<Callout type="note">Optimization for latency with AWS Bedrock is available in Sourcegraph v6.5 and more.</Callout>
97+
98+
AWS Bedrock supports [Latency Optimized Inference](https://docs.aws.amazon.com/bedrock/latest/userguide/latency-optimized-inference.html) which can reduce autocomplete latency with models like Claude 3.5 Haiku by up to ~40%.
99+
100+
To use Bedrock's latency optimized inference feature for a specific model with Cody, configure the `"latencyOptimization": "optimized"` setting under the `serverSideConfig` of any model in `modelOverrides`. For example:
101+
102+
```json
103+
"modelOverrides": [
104+
{
105+
"modelRef": "aws-bedrock::v1::claude-3-5-haiku-latency-optimized",
106+
"modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0",
107+
"displayName": "Claude 3.5 Haiku (latency optimized)",
108+
"capabilities": [
109+
"chat",
110+
"autocomplete"
111+
],
112+
"category": "speed",
113+
"status": "stable",
114+
"contextWindow": {
115+
"maxInputTokens": 200000,
116+
"maxOutputTokens": 4096
117+
},
118+
"serverSideConfig": {
119+
"type": "awsBedrock",
120+
"latencyOptimization": "optimized"
121+
}
122+
},
123+
{
124+
"modelRef": "aws-bedrock::v1::claude-3-5-haiku",
125+
"modelName": "us.anthropic.claude-3-5-haiku-20241022-v1:0",
126+
"displayName": "Claude 3.5 Haiku",
127+
"capabilities": [
128+
"chat",
129+
"autocomplete"
130+
],
131+
"category": "speed",
132+
"status": "stable",
133+
"contextWindow": {
134+
"maxInputTokens": 200000,
135+
"maxOutputTokens": 4096
136+
},
137+
"serverSideConfig": {
138+
"type": "awsBedrock",
139+
"latencyOptimization": "standard"
140+
}
141+
}
142+
]
143+
```
144+
145+
See also [Debugging: running a latency test](#debugging-running-a-latency-test).
103146

104147
### Example: Using GCP Vertex AI
105148

@@ -194,3 +237,37 @@ To enable StarCoder, go to **Site admin > Site configuration** (`/site-admin/con
194237
```
195238

196239
Users of the Cody extensions will automatically pick up this change when connected to your Enterprise instance.
240+
241+
## Debugging: Running a latency test
242+
243+
<Callout type="note">Debugging latency optimizated inference is supported in Sourcegraph v6.5 and more.</Callout>
244+
245+
Site administrators can test completions latency by sending a special debug command in any Cody chat window (in the web, in the editor, etc.):
246+
247+
```shell
248+
cody_debug:::{"latencytest": 100}
249+
```
250+
251+
Cody will then perform `100` quick `Hello, please respond with a short message.` requests to the LLM model selected in the dropdown, and measure the time taken to get the first streaming event back (for example first token from the model.) It records all of these requests timing information, and then responds with a report indicating the latency between the Sourcegraph `frontend` container and the LLM API:
252+
253+
```shell
254+
Starting latency test with 10 requests...
255+
256+
Individual timings:
257+
258+
[... how long each request took ...]
259+
260+
Summary:
261+
262+
* Requests: 10/10 successful
263+
* Average: 882ms
264+
* Minimum: 435ms
265+
* Maximum: 1.3s
266+
```
267+
268+
This can be helpful to get a feel for the latency of particular models, or models with different configurations - such as when using the AWS Bedrock Latency Optimized Inference feature.
269+
270+
Few important considerations:
271+
272+
- Debug commands are only available to site administrators and have no effect when used by regular users.
273+
- Sourcegraph's built-in Grafana monitoring also has a full `Completions` dashboard for monitoring LLM requests, performance, etc.

docs/cody/enterprise/model-config-examples.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -792,14 +792,4 @@ Provisioned throughput for Amazon Bedrock models can be configured using the `"a
792792
](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html#:~:text=HttpPutResponseHopLimit) instance metadata option to a higher value (e.g., 2) to ensure that the metadata service can be accessed from the frontend container running in the EC2 instance. See [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-existing-instances.html) for instructions.
793793
</Callout>
794794

795-
<Callout type="warning">
796-
We only recommend configuring AWS Bedrock to use an accessToken for
797-
authentication. Specifying no accessToken (e.g. to use [IAM roles for EC2 /
798-
instance role
799-
binding](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html))
800-
is not currently recommended. There is a known performance bug with this
801-
method which will prevent autocomplete from working correctly (internal
802-
issue: CORE-819)
803-
</Callout>
804-
805795
</Accordion>

public/llms.txt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15668,16 +15668,6 @@ Provisioned throughput for Amazon Bedrock models can be configured using the `"a
1566815668
](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html#:~:text=HttpPutResponseHopLimit) instance metadata option to a higher value (e.g., 2) to ensure that the metadata service can be accessed from the frontend container running in the EC2 instance. See [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-existing-instances.html) for instructions.
1566915669
</Callout>
1567015670

15671-
<Callout type="warning">
15672-
We only recommend configuring AWS Bedrock to use an accessToken for
15673-
authentication. Specifying no accessToken (e.g. to use [IAM roles for EC2 /
15674-
instance role
15675-
binding](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html))
15676-
is not currently recommended. There is a known performance bug with this
15677-
method which will prevent autocomplete from working correctly (internal
15678-
issue: CORE-819)
15679-
</Callout>
15680-
1568115671
</Accordion>
1568215672

1568315673
</File>
@@ -15897,16 +15887,6 @@ For `accessToken`, you can either:
1589715887
- Set it to `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>` if directly configuring the credentials
1589815888
- Set it to `<ACCESS_KEY_ID>:<SECRET_ACCESS_KEY>:<SESSION_TOKEN>` if a session token is also required
1589915889

15900-
<Callout type="warning">
15901-
We only recommend configuring AWS Bedrock to use an accessToken for
15902-
authentication. Specifying no accessToken (e.g. to use [IAM roles for EC2 /
15903-
instance role
15904-
binding](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html))
15905-
is not currently recommended (there is a known performance bug with this
15906-
method which will prevent autocomplete from working correctly. (internal
15907-
issue: PRIME-662)
15908-
</Callout>
15909-
1591015890
### Example: Using GCP Vertex AI
1591115891

1591215892
On [GCP Vertex](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude), we only support Anthropic Claude models.

0 commit comments

Comments
 (0)