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:
@@ -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))
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user