Cody Gateway: add gemini model to code completion list (#63278)

Add a stable version of the Gemini 1.5 Flash model to the allowed list
for Code Completion.

<!-- 💡 To write a useful PR description, make sure that your description
covers:
- WHAT this PR is changing:
    - How was it PREVIOUSLY.
    - How it will be from NOW on.
- WHY this PR is needed.
- CONTEXT, i.e. to which initiative, project or RFC it belongs.

The structure of the description doesn't matter as much as covering
these points, so use
your best judgement based on your context.
Learn how to write good pull request description:
https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e?pvs=4
-->


## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles
-->

1. Start a local Cody Gateway instance
2. In your local sg instance set "google/gemini-1.5-flash" as your
completionModel
3. curl to the completion endpoint to confirm you are getting a
completion response instead of streaming response (starts with data:):
```
{"completion":"I am a large language model, trained by Google. \n\nHere's what that means:\n\n* **Large Language Model:** I'm","stopReason":"STOP"}%
```

## Changelog

<!--
1. Ensure your pull request title is formatted as: $type($domain): $what
5. Add bullet list items for each additional detail you want to cover
(see example below)
6. You can edit this after the pull request was merged, as long as
release shipping it hasn't been promoted to the public.
7. For more information, please see this how-to
https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c?

Audience: TS/CSE > Customers > Teammates (in that order).

Cheat sheet: $type = chore|fix|feat $domain:
source|search|ci|release|plg|cody|local|...
-->

<!--
Example:

Title: fix(search): parse quotes with the appropriate context
Changelog section:

## Changelog

- When a quote is used with regexp pattern type, then ...
- Refactored underlying code.
-->
This commit is contained in:
Beatrix 2024-06-14 16:19:33 -07:00 committed by GitHub
parent 1975c67f06
commit eb0fc3fff7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -333,6 +333,7 @@ var allCodeCompletionModels = slices.Concat([]string{"anthropic/" + anthropic.Cl
"anthropic/claude-instant-1",
"anthropic/claude-instant-1.2-cyan",
"anthropic/claude-instant-1.2",
"google/" + google.Gemini15Flash,
"fireworks/starcoder",
"fireworks/" + fireworks.Llama213bCode,
"fireworks/" + fireworks.StarcoderTwo15b,