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

[Backport 5.3] Cody: Update Azure OpenAI client and force api-version to a stable one#61032

Merged
chwarwick merged 1 commit into
5.3from
backport-61005-to-5.3
Mar 14, 2024
Merged

[Backport 5.3] Cody: Update Azure OpenAI client and force api-version to a stable one#61032
chwarwick merged 1 commit into
5.3from
backport-61005-to-5.3

Conversation

@chwarwick

Copy link
Copy Markdown
Contributor

This updates the Azure OpenAI client and also overrides the round tripper to force it to use the stable 2023-05-15 api version instead of the default which uses preview versions that keep being retired.

closes https://github.com/sourcegraph/sourcegraph/issues/60934

Test plan

Verify chat works and uses correct api version:

[       frontend] [Mar 11 17:37:11.359346] Response: ==> REQUEST/RESPONSE (Try=1/1.327581208s, OpTime=1.327591292s) -- RESPONSE RECEIVED
[       frontend]    POST https://{DEV_ENVIRONMENT}/openai/deployments/gpt-4-test/chat/completions?api-version=2023-05-15

Verify autocomplete works and uses correct api version

[       frontend] [Mar 11 17:38:03.682053] Response: ==> REQUEST/RESPONSE (Try=1/504.029208ms, OpTime=504.055333ms) -- RESPONSE RECEIVED
[       frontend]    POST https://sourcegraph-test-oai.openai.azure.com/openai/deployments/gpt-35-turbo-instruct-test/completions?api-version=2023-05-15

@cla-bot cla-bot Bot added the cla-signed label Mar 12, 2024
@chwarwick chwarwick requested a review from a team March 12, 2024 14:56
@chwarwick chwarwick added the backport/customer-critical Patch to critical bugs that negatively impact customer happiness label Mar 12, 2024
@chwarwick chwarwick merged commit f6792bd into 5.3 Mar 14, 2024
@chwarwick chwarwick deleted the backport-61005-to-5.3 branch March 14, 2024 13:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/customer-critical Patch to critical bugs that negatively impact customer happiness cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants