fix: providers config for azure, bedrock, and vertex (#822)

* fix: providers config for azure, bedrock, and vertex

* chore: improve changelog

* chore: fix CI
This commit is contained in:
Ralph Khreish
2025-06-20 14:13:53 +03:00
committed by GitHub
parent a09a2d0967
commit 1bd6d4f246
10 changed files with 531 additions and 147 deletions

View File

@@ -713,17 +713,25 @@ describe('isConfigFilePresent', () => {
// --- getAllProviders Tests ---
describe('getAllProviders', () => {
test('should return list of providers from supported-models.json', () => {
test('should return all providers from ALL_PROVIDERS constant', () => {
// Arrange: Ensure config is loaded with real data
configManager.getConfig(null, true); // Force load using the mock that returns real data
// Act
const providers = configManager.getAllProviders();
// Assert
// Assert against the actual keys in the REAL loaded data
const expectedProviders = Object.keys(REAL_SUPPORTED_MODELS_DATA);
expect(providers).toEqual(expect.arrayContaining(expectedProviders));
expect(providers.length).toBe(expectedProviders.length);
// getAllProviders() should return the same as the ALL_PROVIDERS constant
expect(providers).toEqual(configManager.ALL_PROVIDERS);
expect(providers.length).toBe(configManager.ALL_PROVIDERS.length);
// Verify it includes both validated and custom providers
expect(providers).toEqual(
expect.arrayContaining(configManager.VALIDATED_PROVIDERS)
);
expect(providers).toEqual(
expect.arrayContaining(Object.values(configManager.CUSTOM_PROVIDERS))
);
});
});