JSON has a few advantages over YAML in this context:
* No extra dependency: Removed ruamel.yaml; using the standard library
json module.
* Simpler code: No YAML formatting configuration (indent, flow style,
string presentation, etc.). JSON serialization is straightforward.
* Faster generation: JSON serialization is typically faster and more
predictable than YAML formatting.
* Native OpenAPI format: JSON is the native OpenAPI format. Many tools
prefer JSON, reducing potential compatibility issues.
* Better tooling support: JSON is widely supported. Tools like oasdiff,
OpenAPI validators, and code generators work well with JSON.
* Fewer formatting edge cases: YAML can have edge cases (multiline
strings, special characters, quoting, scalars etc). JSON avoids these.
All the tools consumming the YAMLs have been updated namely oasdiff for
conformance tests, docusaurus config and the genrator.
Signed-off-by: Sébastien Han <seb@redhat.com>
# What does this PR do?
<!-- Provide a short summary of what this PR does and why. Link to relevant issues if applicable. -->
<!-- If resolving an issue, uncomment and update the line below -->
<!-- Closes #[issue-number] -->
Updates OpenAPI generator to use summaries and changed the file generation path.
## Test Plan
- docs/openapi_generator/run_openapi_generator.sh
<!-- Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.* -->
This is yet another of those large PRs (hopefully we will have less and less of them as things mature fast). This one introduces substantial improvements and some simplifications to the stack.
Most important bits:
* Agents reference implementation now has support for session / turn persistence. The default implementation uses sqlite but there's also support for using Redis.
* We have re-architected the structure of the Stack APIs to allow for more flexible routing. The motivating use cases are:
- routing model A to ollama and model B to a remote provider like Together
- routing shield A to local impl while shield B to a remote provider like Bedrock
- routing a vector memory bank to Weaviate while routing a keyvalue memory bank to Redis
* Support for provider specific parameters to be passed from the clients. A client can pass data using `x_llamastack_provider_data` parameter which can be type-checked and provided to the Adapter implementations.