mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
fix: Add policies to adapters (backport #4277) (#4279)
Some checks failed
Integration Tests (Replay) / generate-matrix (push) Successful in 4s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 6s
Vector IO Integration Tests / test-matrix (push) Failing after 13s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 16s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 45s
Unit Tests / unit-tests (3.12) (push) Failing after 54s
Integration Tests (Replay) / Integration Tests (, , , client=, ) (push) Failing after 20s
Unit Tests / unit-tests (3.13) (push) Failing after 2m11s
Pre-commit / pre-commit (push) Successful in 3m0s
Some checks failed
Integration Tests (Replay) / generate-matrix (push) Successful in 4s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 6s
Vector IO Integration Tests / test-matrix (push) Failing after 13s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 16s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 45s
Unit Tests / unit-tests (3.12) (push) Failing after 54s
Integration Tests (Replay) / Integration Tests (, , , client=, ) (push) Failing after 20s
Unit Tests / unit-tests (3.13) (push) Failing after 2m11s
Pre-commit / pre-commit (push) Successful in 3m0s
The configured policy wasn't being passed in and instead the default was being used (e.g. in the s3 file provider) Closes: #4276 <hr>This is an automatic backport of pull request #4277 done by [Mergify](https://mergify.com). Signed-off-by: Derek Higgins <derekh@redhat.com> Co-authored-by: Derek Higgins <derekh@redhat.com>
This commit is contained in:
parent
63e2e7534f
commit
9b68b38c55
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