mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: Add policies to adapters (#4277)
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>
(cherry picked from commit 2fce5abe34)
This commit is contained in:
parent
63e2e7534f
commit
6766b092bc
1 changed files with 3 additions and 0 deletions
|
|
@ -391,6 +391,9 @@ async def instantiate_provider(
|
|||
method = "get_adapter_impl"
|
||||
args = [config, deps]
|
||||
|
||||
if "policy" in inspect.signature(getattr(module, method)).parameters:
|
||||
args.append(policy)
|
||||
|
||||
elif isinstance(provider_spec, AutoRoutedProviderSpec):
|
||||
method = "get_auto_router_impl"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue