Fix issue w/ routing_table api getting added when router api is not specified (#298)

* fix issue w/ enforcing api

* cleanup

* inference only yaml
This commit is contained in:
Xi Yan 2024-10-23 15:27:22 -07:00 committed by GitHub
parent 21f2e9adf5
commit 0cec86453b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View file

@ -288,6 +288,9 @@ def main(
apis_to_serve = set(impls.keys()) apis_to_serve = set(impls.keys())
for inf in builtin_automatically_routed_apis(): for inf in builtin_automatically_routed_apis():
# if we do not serve the corresponding router API, we should not serve the routing table API
if inf.router_api.value not in apis_to_serve:
continue
apis_to_serve.add(inf.routing_table_api.value) apis_to_serve.add(inf.routing_table_api.value)
apis_to_serve.add("inspect") apis_to_serve.add("inspect")

View file

@ -0,0 +1,14 @@
version: '2'
built_at: '2024-10-08T17:40:45.325529'
image_name: local
docker_image: null
conda_env: local
apis:
- models
- inference
providers:
inference:
- provider_id: tgi0
provider_type: remote::tgi
config:
url: http://127.0.0.1:5009