mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
fix: Add policies to adapters
The configured policy wasn't being passed in and instead the default was being used (e.g. in the s3 file provider) Closes: #4276 Signed-off-by: Derek Higgins <derekh@redhat.com>
This commit is contained in:
parent
ee107aadd6
commit
c667622c1e
1 changed files with 3 additions and 0 deletions
|
|
@ -374,6 +374,9 @@ async def instantiate_provider(
|
||||||
method = "get_adapter_impl"
|
method = "get_adapter_impl"
|
||||||
args = [config, deps]
|
args = [config, deps]
|
||||||
|
|
||||||
|
if "policy" in inspect.signature(getattr(module, method)).parameters:
|
||||||
|
args.append(policy)
|
||||||
|
|
||||||
elif isinstance(provider_spec, AutoRoutedProviderSpec):
|
elif isinstance(provider_spec, AutoRoutedProviderSpec):
|
||||||
method = "get_auto_router_impl"
|
method = "get_auto_router_impl"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue