feat(litellm): add native Beijing Bailian ASR and personal vocabulary
This commit is contained in:
@@ -18,6 +18,18 @@ class ConfigTests(unittest.TestCase):
|
||||
def test_missing_credentials_exclude_routes(self):
|
||||
self.assertEqual(build_config(self.catalog, {}, lambda _: False)['model_list'], [])
|
||||
|
||||
def test_bailian_routes_are_native_and_opt_in(self):
|
||||
env = {'BAILIAN_CN_API_KEY': 'synthetic', 'BAILIAN_CN_API_BASE':
|
||||
'https://ws-test.cn-beijing.maas.aliyuncs.com/api/v1'}
|
||||
routes = build_config(self.catalog, env, lambda _: False)['model_list']
|
||||
self.assertEqual(len(routes), 2)
|
||||
self.assertEqual(routes[0]['model_name'], 'bailian-cn/qwen-audio-3.1-asr-flash')
|
||||
self.assertNotIn('bailian_vocabulary_path', routes[0]['litellm_params'])
|
||||
self.assertEqual(routes[1]['litellm_params']['bailian_vocabulary_path'],
|
||||
'/etc/litellm/personal-vocabulary.json')
|
||||
self.assertEqual(routes[0]['litellm_params']['model'], 'dashscope/qwen-audio-3.1-asr-flash')
|
||||
self.assertNotIn('synthetic', str(routes))
|
||||
|
||||
def test_namespaces_preserve_every_legacy_route(self):
|
||||
catalog = yaml.safe_load(Path(__file__).with_name('models.yaml').read_text())
|
||||
env = {key: 'synthetic' for key in ['ZENMUX_SUBSCRIPTION_API_KEY',
|
||||
|
||||
Reference in New Issue
Block a user