Skip to content

fix(tests): validate provider types exist in backward compat test#5226

Merged
bbrowning merged 10 commits intollamastack:mainfrom
derekhiggins:more-compat
Apr 1, 2026
Merged

fix(tests): validate provider types exist in backward compat test#5226
bbrowning merged 10 commits intollamastack:mainfrom
derekhiggins:more-compat

Conversation

@derekhiggins
Copy link
Copy Markdown
Contributor

The backward compatibility test previously only validated YAML schema structure but did not verify that referenced provider types actually exist in the registry. This would have allowed breaking changes like renaming "meta-reference" to "builtin" (236a230) to pass without detection(although the PR was correctly marked as a breaking change).

This commit enhances the test to use validate_and_prepare_providers(), the same validation function the stack uses at runtime, which now checks:

  • Provider types exist in registry
  • No conflicts with auto-routed APIs
  • Provider deprecation warnings/errors

--
See test passing here
https://github.com/llamastack/llama-stack/actions/runs/23156501249/job/67272595366

It should have failed and passed at the next stage (as it was marked as a breaking change)

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 20, 2026
@derekhiggins
Copy link
Copy Markdown
Contributor Author

It should have failed and passed at the next stage (as it was marked as a breaking change)

looking closer, the error was correctly caught in the next step, I'll leave this open for review but happy to close if deemed redundant

The backward compatibility test previously only validated YAML schema
structure but did not verify that referenced provider types actually
exist in the registry. This would have allowed breaking changes like
renaming "meta-reference" to "builtin" (236a230) to pass without
detection(although the PR was correctly marked as a breaking change).

This commit enhances the test to use `validate_and_prepare_providers()`,
the same validation function the stack uses at runtime, which now checks:
- Provider types exist in registry
- No conflicts with auto-routed APIs
- Provider deprecation warnings/errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Derek Higgins <derekh@redhat.com>
Copy link
Copy Markdown
Contributor

@skamenan7 skamenan7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small nit.

# - Provider types exist in registry
# - No conflicts with auto-routed APIs
# - Provider deprecation warnings/errors
provider_registry = get_provider_registry()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can you switch this to get_provider_registry(config) so the test is checking the same registry the stack would
actually use? Not blocking for the current fixtures, but I think it’d make the test more accurate.

Copy link
Copy Markdown
Collaborator

@bbrowning bbrowning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - feel free to address the minor comment from @skamenan7 later.

@bbrowning bbrowning added this pull request to the merge queue Apr 1, 2026
Merged via the queue into llamastack:main with commit 491b34a Apr 1, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants