Skip to content

Commit 9dfbd58

Browse files
authored
Merge pull request #59 from codestoryai/features/add-support-for-openai-compatible
[extensio] add support for openai compatible endpoint
2 parents 911ed4c + 3ae98cc commit 9dfbd58

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export enum Provider {
349349
OpenRouter = 'open-router',
350350
//GoogleGemini = 'google-gemini',
351351
//AWSBedrock = 'aws-bedrock',
352-
//OpenAICompatible = 'open-ai-compatible',
352+
OpenAICompatible = 'openai-compatible',
353353
//Ollama = 'ollama',
354354
}
355355

src/sidecar/types.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,14 @@ function getProviderConfiguration(type: Provider, value: ModelProviderConfigurat
648648
// 'Ollama': {}
649649
// };
650650
//}
651-
//if (type === 'openai-compatible') {
652-
// return {
653-
// 'OpenAICompatible': {
654-
// 'api_key': value.apiKey,
655-
// 'api_base': value.apiBase,
656-
// }
657-
// };
658-
//}
651+
if (type === 'openai-compatible') {
652+
return {
653+
'OpenAICompatible': {
654+
'api_key': value.apiKey,
655+
'api_base': value.apiBase,
656+
}
657+
};
658+
}
659659
//if (type === 'codestory') {
660660
// // if its codestory then we also want to provider the access token over here
661661
// return {

src/webviews/@settings/form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export function PresetForm(props: PresetFormProps) {
8383
defaultValue={initialData?.apiKey}
8484
/>
8585
</label>
86-
{/*<label className="-mt-1 flex items-start">
86+
<label className="-mt-1 flex items-start">
8787
<Checkbox
8888
name="custom-base-URL"
8989
checked={hasCustomBaseUrl}
9090
onCheckedChange={setHasCustomBaseUrl}
9191
/>
9292
<span className="ml-2">Use custom base URL</span>
93-
</label>*/}
93+
</label>
9494
<label className={cn('mt-2', !hasCustomBaseUrl && 'sr-only')}>
9595
<p className="font-medium text-foreground">Custom base URL</p>
9696
<Input

0 commit comments

Comments
 (0)