Elffuss BraidHub

kikocis/continue public

merge in further changes
Changeset50698d3c9cea911555b4a03497897fa109c8da18fa3e268509b4032467ae9f98
AuthorDallin Romney <dallinromney@gmail.com> · 2025-06-25 16:15 -07:00
CommitterDallin Romney <dallinromney@gmail.com> · 2025-06-25 16:15 -07:00
Parents307109b747b3, f74094e0dabc

Browse the files at this changeset

7 files changed

modified core/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified core/package.json +1 −1
@@ -53,7 +53,7 @@
5353 "@continuedev/config-yaml": "file:../packages/config-yaml",
5454 "@continuedev/fetch": "^1.0.14",
5555 "@continuedev/llm-info": "^1.0.8",
56- "@continuedev/openai-adapters": "file:../packages/openai-adapters",
56+ "@continuedev/openai-adapters": "1.0.42",
5757 "@modelcontextprotocol/sdk": "^1.12.0",
5858 "@mozilla/readability": "^0.5.0",
5959 "@octokit/rest": "^20.1.1",
modified extensions/intellij/gradle.properties +1 −1
@@ -3,7 +3,7 @@
33 pluginName=continue-intellij-extension
44 pluginRepositoryUrl=https://github.com/continuedev/continue
55 # SemVer format -> https://semver.org
6-pluginVersion=1.0.25
6+pluginVersion=1.0.26
77 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
88 pluginSinceBuild=223
99 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
modified extensions/vscode/package.json +1 −1
@@ -2,7 +2,7 @@
22 "name": "continue",
33 "icon": "media/icon.png",
44 "author": "Continue Dev, Inc",
5- "version": "1.1.51",
5+ "version": "1.1.52",
66 "repository": {
77 "type": "git",
88 "url": "https://github.com/continuedev/continue"
modified packages/openai-adapters/package-lock.json +2 −2
@@ -1,12 +1,12 @@
11 {
22 "name": "@continuedev/openai-adapters",
3- "version": "1.0.40",
3+ "version": "1.0.42",
44 "lockfileVersion": 3,
55 "requires": true,
66 "packages": {
77 "": {
88 "name": "@continuedev/openai-adapters",
9- "version": "1.0.40",
9+ "version": "1.0.42",
1010 "license": "Apache-2.0",
1111 "dependencies": {
1212 "@continuedev/config-types": "^1.0.5",
modified packages/openai-adapters/src/apis/Azure.ts +5 −1
@@ -63,7 +63,11 @@
6363 "`env.apiVersion` is a required configuration property for Azure OpenAI",
6464 );
6565 }
66- url.pathname = `${url.pathname}/openai/deployments/${config.env.deployment}`;
66+
67+ const basePathname = `openai/deployments/${config.env.deployment}`;
68+
69+ url.pathname =
70+ url.pathname === "/" ? basePathname : `${url.pathname}/${basePathname}`;
6771
6872 queryParams["api-version"] = config.env.apiVersion;
6973 }
modified packages/openai-adapters/src/test/main.test.ts +76 −0
@@ -173,4 +173,80 @@
173173 "https://api.example.com",
174174 );
175175 });
176+
177+ it("should configure Azure OpenAI client with root URL and trailing slash", () => {
178+ const azure = constructLlmApi({
179+ provider: "azure",
180+ apiKey: "sk-xxx",
181+ apiBase: "https://test-azure-openai.azure.com/",
182+ env: {
183+ deployment: "gpt-4.1",
184+ apiType: "azure-openai",
185+ apiVersion: "2023-05-15",
186+ },
187+ });
188+
189+ // The Azure client modifies the baseURL to include the deployment
190+ expect((azure as OpenAIApi).openai.baseURL).toBe(
191+ "https://test-azure-openai.azure.com/openai/deployments/gpt-4.1",
192+ );
193+ expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
194+ });
195+
196+ it("should configure Azure OpenAI client with path and trailing slash", () => {
197+ const azure = constructLlmApi({
198+ provider: "azure",
199+ apiKey: "sk-xxx",
200+ apiBase: "https://test-azure-openai.azure.com/v1/",
201+ env: {
202+ deployment: "gpt-4.1",
203+ apiType: "azure-openai",
204+ apiVersion: "2023-05-15",
205+ },
206+ });
207+
208+ // The Azure client modifies the baseURL to include the deployment
209+ expect((azure as OpenAIApi).openai.baseURL).toBe(
210+ "https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1",
211+ );
212+ expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
213+ });
214+
215+ it("should configure Azure OpenAI client with root URL and no trailing slash", () => {
216+ const azure = constructLlmApi({
217+ provider: "azure",
218+ apiKey: "sk-xxx",
219+ apiBase: "https://test-azure-openai.azure.com",
220+ env: {
221+ deployment: "gpt-4.1",
222+ apiType: "azure-openai",
223+ apiVersion: "2023-05-15",
224+ },
225+ });
226+
227+ // The Azure client modifies the baseURL to include the deployment
228+ expect((azure as OpenAIApi).openai.baseURL).toBe(
229+ "https://test-azure-openai.azure.com/openai/deployments/gpt-4.1",
230+ );
231+ expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
232+ });
233+
234+ it("should configure Azure OpenAI client with path and no trailing slash", () => {
235+ const azure = constructLlmApi({
236+ provider: "azure",
237+ apiKey: "sk-xxx",
238+ apiBase: "https://test-azure-openai.azure.com/v1",
239+ env: {
240+ deployment: "gpt-4.1",
241+ apiType: "azure-openai",
242+ apiVersion: "2023-05-15",
243+ },
244+ });
245+
246+ // The Azure client modifies the baseURL to include the deployment
247+ expect((azure as OpenAIApi).openai.baseURL).toBe(
248+ "https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1",
249+ );
250+ expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
251+ });
176252 });