Skip to content

Commit b773567

Browse files
Copilotdr75
authored andcommitted
Remove support for long model names with provider prefixes (#23)
1 parent 7338db0 commit b773567

2 files changed

Lines changed: 8 additions & 19 deletions

File tree

marketplace-readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Its advanced design, among others, ensures the following:
1818
- Your data can't and won't be used for training.
1919
- Verifiable privacy and integrity through hardware-based remote attestation.
2020

21-
With Privatemode, you can confidentially use state-of-the-art open-source models like **gpt-oss-120b** and **Qwen3-Coder** for coding, content generation, and analysis — without compromising security.
21+
With Privatemode, you can confidently use state-of-the-art open-source models like **Kimi K2.5** and **gpt-oss-120b** for coding, content generation, and analysis — without compromising security.
2222

2323
Privatemode is hosted in the EU and developed by [Edgeless Systems](https://www.edgeless.systems/).
2424

src/provider.ts

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,13 @@ export class PrivatemodeChatModelProvider implements LanguageModelChatProvider {
113113

114114
const { models } = await this.fetchModels(apiKey);
115115

116-
// Filter models to only include those with "qwen3-coder" or "gpt-oss" in their name
117-
let filteredModels = models.filter((model) => model.id.includes("qwen3-coder") || model.id.includes("gpt-oss"));
118-
119-
// If there are multiple "gpt-oss" models, handle based on prefix presence to be forward compatible
120-
// with short model names
121-
const gptOssModels = filteredModels.filter((model) => model.id.includes("gpt-oss"));
122-
if (gptOssModels.length > 1) {
123-
// Check if we have duplicated models (with and without "openai/" prefix)
124-
const hasOpenAI_prefix = gptOssModels.some((model) => model.id.includes("openai/"));
125-
const hasNoOpenAI_prefix = gptOssModels.some((model) => !model.id.includes("openai/"));
126-
127-
if (hasOpenAI_prefix && hasNoOpenAI_prefix) {
128-
// If we have duplicated models, keep only those without "openai/" prefix
129-
filteredModels = filteredModels.filter(
130-
(model) => !model.id.includes("gpt-oss") || !model.id.includes("openai/")
131-
);
132-
}
133-
}
116+
// Filter models to only include supported model families
117+
// and exclude models with provider prefixes (e.g., "openai/")
118+
const filteredModels = models.filter(
119+
(model) =>
120+
(model.id.includes("qwen3-coder") || model.id.includes("gpt-oss") || model.id.includes("kimi")) &&
121+
!model.id.includes("/")
122+
);
134123

135124
const infos: LanguageModelChatInformation[] = filteredModels.map((m) => {
136125
const contextLen = DEFAULT_CONTEXT_LENGTH; // Assume default

0 commit comments

Comments
 (0)