Retire ZenMux subscription and keep BYOK as terminal fallback
This commit is contained in:
@@ -5,9 +5,11 @@ from pathlib import Path
|
||||
import yaml
|
||||
|
||||
from provider_routes import build_config, namespace_config, add_bailian_routes
|
||||
from provider_policy import without_subscription, apply_provider_policy
|
||||
|
||||
|
||||
def build_hk_config(catalog, env):
|
||||
env = without_subscription(catalog, env)
|
||||
config = build_config(catalog, env, lambda path: False, namespaced=False)
|
||||
config['general_settings'] = {'master_key': 'os.environ/LITELLM_MASTER_KEY'}
|
||||
routes = config['model_list']
|
||||
@@ -62,7 +64,8 @@ def build_hk_config(catalog, env):
|
||||
'api_key': 'os.environ/OPENAI_API_KEY', 'max_retries': 0}})
|
||||
if env.get('ZENMUX_SUBSCRIPTION_API_KEY'):
|
||||
config['router_settings']['fallbacks'].append({'asr-gpt': ['zenmux/gpt-transcribe']})
|
||||
return config
|
||||
config['_public_gateway'] = True
|
||||
return apply_provider_policy(config, catalog, env)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user