llama-stack-mirror/tests/api/test_pydantic_models.py
Charlie Doern af94606828 feat(api): ensure StackRunConfig
StackRunConfig is part of our public API, ensure stability of this datatype using a pytest snapshot test.

If the pydantic model changes, it will fail. A snapshot can be re-generated via `@github-actions regenerate snapshots` by a code owner.

The API conformance test will then re-run and pass.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2025-10-14 11:32:17 -04:00

17 lines
521 B
Python

# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import json
from llama_stack.core.datatypes import StackRunConfig
def test_run_config_v1_schema_is_unchanged(snapshot):
"""
Ensures the V1 schema never changes.
"""
schema = StackRunConfig.model_json_schema()
snapshot.assert_match(json.dumps(schema, indent=2), "stored_run_config_v1_schema.json")