Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(gateway): update Google model names in allowed custom chat models#63109

Merged
abeatrix merged 1 commit into
mainfrom
bee/fix-google
Jun 5, 2024
Merged

fix(gateway): update Google model names in allowed custom chat models#63109
abeatrix merged 1 commit into
mainfrom
bee/fix-google

Conversation

@abeatrix

@abeatrix abeatrix commented Jun 5, 2024

Copy link
Copy Markdown
Contributor

Fix: Add missing / to provider name for google models in Cody Gateway allowlist.

I was getting the following error from Cody Gateway:

event: error
data: {"error":"Sourcegraph Cody Gateway: unexpected status code 400: {\"error\":\"model \\\"google/\\\" is not allowed, allowed: [google/gemini-1.5-pro-latest, google/gemini-1.5-flash-latest]\"}\n"}

Changes:

  • prepend "google/" to the Google model names to match the expected format

Test plan

The issue doesn't affect instances that set google as the provider, and their requests should work as expected.

This change only affect Cody Gateway users with the following setting:

"completions": {
    "provider": "sourcegraph"
    "chatModel": "google/gemini-1.5-pro-latest",
    "fastChatModel": "google/gemini-1.5-flash-latest",
  },

Changelog

Fix: Prepend "google/" to the Google model names to match the expected format
@cla-bot cla-bot Bot added the cla-signed label Jun 5, 2024
@abeatrix abeatrix requested review from a team, bobheadxi and emidoots June 5, 2024 18:10
@abeatrix abeatrix enabled auto-merge (squash) June 5, 2024 18:13
@abeatrix abeatrix merged commit cff84a0 into main Jun 5, 2024
@abeatrix abeatrix deleted the bee/fix-google branch June 5, 2024 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants