pass org scope id to continueProperties
This commit is contained in:
parent
5c9ced7b95
commit
f48c3c2ea5
10 changed files with 36 additions and 23 deletions
4
core/index.d.ts
vendored
4
core/index.d.ts
vendored
|
|
@ -482,7 +482,7 @@ export interface LLMOptions {
|
|||
// continueProperties
|
||||
apiKeyLocation?: string;
|
||||
apiBase?: string;
|
||||
organizationSlug?: string;
|
||||
orgScopeId?: string | null;
|
||||
|
||||
aiGatewaySlug?: string;
|
||||
cacheBehavior?: CacheBehavior;
|
||||
|
|
@ -928,7 +928,7 @@ export interface ModelDescription {
|
|||
// continueProperties
|
||||
apiKeyLocation?: string;
|
||||
apiBase?: string;
|
||||
organizationSlug?: string;
|
||||
orgScopeId?: string | null;
|
||||
|
||||
contextLength?: number;
|
||||
maxStopWords?: number;
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ export abstract class BaseLLM implements ILLM {
|
|||
// continueProperties
|
||||
apiKeyLocation?: string;
|
||||
apiBase?: string;
|
||||
organizationSlug?: string;
|
||||
orgScopeId?: string | null;
|
||||
|
||||
cacheBehavior?: CacheBehavior;
|
||||
capabilities?: ModelCapability;
|
||||
|
|
@ -205,7 +205,7 @@ export abstract class BaseLLM implements ILLM {
|
|||
|
||||
// continueProperties
|
||||
this.apiKeyLocation = options.apiKeyLocation;
|
||||
this.organizationSlug = options.organizationSlug;
|
||||
this.orgScopeId = options.orgScopeId;
|
||||
this.apiBase = options.apiBase;
|
||||
|
||||
this.aiGatewaySlug = options.aiGatewaySlug;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { ContinueProperties } from "@continuedev/config-yaml";
|
||||
|
||||
import { ControlPlaneProxyInfo } from "../../../control-plane/analytics/IAnalyticsProvider.js";
|
||||
import { Telemetry } from "../../../util/posthog.js";
|
||||
import OpenAI from "../OpenAI.js";
|
||||
|
|
@ -19,7 +21,7 @@ class ContinueProxy extends OpenAI {
|
|||
super(options);
|
||||
this.actualApiBase = options.apiBase;
|
||||
this.apiKeyLocation = options.apiKeyLocation;
|
||||
this.organizationSlug = options.organizationSlug;
|
||||
this.orgScopeId = options.orgScopeId;
|
||||
}
|
||||
|
||||
static providerName = "continue-proxy";
|
||||
|
|
@ -28,12 +30,13 @@ class ContinueProxy extends OpenAI {
|
|||
};
|
||||
|
||||
protected extraBodyProperties(): Record<string, any> {
|
||||
const continueProperties: ContinueProperties = {
|
||||
apiKeyLocation: this.apiKeyLocation,
|
||||
apiBase: this.actualApiBase,
|
||||
orgScopeId: this.orgScopeId ?? null,
|
||||
};
|
||||
return {
|
||||
continueProperties: {
|
||||
apiKeyLocation: this.apiKeyLocation,
|
||||
apiBase: this.actualApiBase,
|
||||
organizationSlug: this.organizationSlug,
|
||||
},
|
||||
continueProperties,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
8
core/package-lock.json
generated
8
core/package-lock.json
generated
|
|
@ -13,7 +13,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/config-yaml": "^1.0.42",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -2990,9 +2990,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.38",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.38.tgz",
|
||||
"integrity": "sha512-m9HkGgoVg1FO+l2wK4wsZPBGwpYjj+QY1SFdBYpa+ohX0wQQ8mMJivvs7fwdXo4JqlIFm7ws4tkXQZ17vFsdzA==",
|
||||
"version": "1.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.42.tgz",
|
||||
"integrity": "sha512-wT7a2Pc8MzWdyUY02gWtCy5KFYC6Hd0gzEKdOgxjhaMThll312Ck2fZa3ahLa3caaI04LrEP3l6yqL7nQ/960g==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/config-yaml": "^1.0.42",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
2
extensions/vscode/package-lock.json
generated
2
extensions/vscode/package-lock.json
generated
|
|
@ -106,7 +106,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.35",
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
10
gui/package-lock.json
generated
10
gui/package-lock.json
generated
|
|
@ -7,7 +7,7 @@
|
|||
"name": "gui",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/config-yaml": "^1.0.42",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/config-yaml": "^1.0.42",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -525,9 +525,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.38",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.38.tgz",
|
||||
"integrity": "sha512-m9HkGgoVg1FO+l2wK4wsZPBGwpYjj+QY1SFdBYpa+ohX0wQQ8mMJivvs7fwdXo4JqlIFm7ws4tkXQZ17vFsdzA==",
|
||||
"version": "1.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.42.tgz",
|
||||
"integrity": "sha512-wT7a2Pc8MzWdyUY02gWtCy5KFYC6Hd0gzEKdOgxjhaMThll312Ck2fZa3ahLa3caaI04LrEP3l6yqL7nQ/960g==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.38",
|
||||
"@continuedev/config-yaml": "^1.0.42",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.38",
|
||||
"version": "1.0.42",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { z } from "zod";
|
||||
import { PlatformClient, SecretStore } from "../interfaces/index.js";
|
||||
import {
|
||||
decodeSecretLocation,
|
||||
|
|
@ -137,3 +138,12 @@ function useProxyForUnrenderedSecrets(
|
|||
|
||||
return config;
|
||||
}
|
||||
|
||||
/** The additional properties that are added to the otherwise OpenAI-compatible body when requesting a Continue proxy */
|
||||
export const continuePropertiesSchema = z.object({
|
||||
apiKeyLocation: z.string().optional(),
|
||||
apiBase: z.string().optional(),
|
||||
orgScopeId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export type ContinueProperties = z.infer<typeof continuePropertiesSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue