Skip to content

Commit 839ca8a

Browse files
committed
Add seperate test case for io-intelligence in profileValidator
1 parent bcf4c6c commit 839ca8a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/shared/__tests__/ProfileValidator.spec.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ describe("ProfileValidator", () => {
194194
"chutes",
195195
"sambanova",
196196
"fireworks",
197-
"io-intelligence",
198197
]
199198

200199
apiModelProviders.forEach((provider) => {
@@ -230,6 +229,22 @@ describe("ProfileValidator", () => {
230229
expect(ProfileValidator.isProfileAllowed(profile, allowList)).toBe(true)
231230
})
232231

232+
// Test for io-intelligence provider which uses ioIntelligenceModelId
233+
it(`should extract ioIntelligenceModelId for io-intelligence provider`, () => {
234+
const allowList: OrganizationAllowList = {
235+
allowAll: false,
236+
providers: {
237+
"io-intelligence": { allowAll: false, models: ["test-model"] },
238+
},
239+
}
240+
const profile: ProviderSettings = {
241+
apiProvider: "io-intelligence" as any,
242+
ioIntelligenceModelId: "test-model",
243+
}
244+
245+
expect(ProfileValidator.isProfileAllowed(profile, allowList)).toBe(true)
246+
})
247+
233248
it("should extract vsCodeLmModelSelector.id for vscode-lm provider", () => {
234249
const allowList: OrganizationAllowList = {
235250
allowAll: false,

0 commit comments

Comments
 (0)