Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e3cb8ed
chore: use Pydantic to generate OpenAPI schema
leseb Oct 29, 2025
9d14d6d
chore: rm unused func
leseb Nov 12, 2025
20615ec
chore: fail if any schema is invalid
leseb Nov 12, 2025
8e1f89b
chore: update generator script location
leseb Nov 12, 2025
b450955
chore: add new generator location to precommit
leseb Nov 12, 2025
c4cad89
chore: regen scehma with main
leseb Nov 12, 2025
66056dd
chore: re-add x-llama-stack-extra-body-params
leseb Nov 12, 2025
e3d831f
chore: re-add text/event-stream media type
leseb Nov 12, 2025
de4ed29
chore: replace JSON requestBody block with query params
leseb Nov 12, 2025
3d33291
chore: refactor code to reduce generator script length
leseb Nov 12, 2025
2cb0c31
chore: re-add missing endpoints
leseb Nov 12, 2025
73861b5
chore: re-add missing endpoints
leseb Nov 12, 2025
500804f
chore: add deprecated to combined schema
leseb Nov 12, 2025
221f28b
chore: fix missing titles for unions
leseb Nov 12, 2025
0928030
fix: Query default values can't be set in Annotated
leseb Nov 13, 2025
01f441b
fix: duplicate union type declarations for Stainless codegen
leseb Nov 13, 2025
24b275d
fix: revert "chore: add deprecated to combined schema"
leseb Nov 13, 2025
06acbda
fix: Exclude deprecated endpoints from stainless config
leseb Nov 13, 2025
7bc9aea
fix: remove unused endpoint and outdate code
leseb Nov 13, 2025
a58d9a6
chore: remove validation schema script
leseb Nov 13, 2025
827cc9b
fix: deprecated endpoint in Stainless config example
leseb Nov 13, 2025
8427798
fix: remove unregister shield
leseb Nov 13, 2025
e0a69f2
fix: remove unsused ressources
leseb Nov 13, 2025
f7d0494
fix: Added the missing endpoints to the Stainless config
leseb Nov 13, 2025
769cfe4
fix: pagination config
leseb Nov 13, 2025
912ee24
fix: convert anyOf with const values to enum types in OpenAPI schema
leseb Nov 13, 2025
e79a03b
chore: chop fastapi_generator into its module
leseb Nov 13, 2025
2a257db
chore: rebase on main
leseb Nov 14, 2025
bb34f7a
chore: re-add deprecated routes to the combined spec
leseb Nov 14, 2025
2785819
fix: remove trailing space from specs
leseb Nov 14, 2025
1b982ff
chore: re-add missing decorator
leseb Nov 14, 2025
6de63d5
chore: revert "fix: remove unregister shield"
leseb Nov 14, 2025
7908a10
chore: revert "fix: remove unused endpoint and outdate code"
leseb Nov 14, 2025
eabd248
chore: remove RAG
leseb Nov 14, 2025
da37b2a
chore: revert "fix: Exclude deprecated endpoints from stainless config"
leseb Nov 14, 2025
9a36669
fix: pagination config
leseb Nov 14, 2025
738d4bf
chore: add paginated false to chat/completions
leseb Nov 14, 2025
3dd252e
chore: fix missing endpoint on stainless config
leseb Nov 14, 2025
c921a37
fix: revert "fix: pagination config"
leseb Nov 14, 2025
71da65a
fix: post is paginated not get
leseb Nov 14, 2025
9381673
Merge remote-tracking branch 'origin/main' into rm-strong-typing-open…
ashwinb Nov 14, 2025
69e1176
Apply a legacy order so we can easily see diff against what was gener…
ashwinb Nov 14, 2025
5293b4e
schema naming cleanup, should be much closer
ashwinb Nov 14, 2025
9deb0be
even more cleanup, the deltas should be much smaller now
ashwinb Nov 14, 2025
0c9ffff
precommit
ashwinb Nov 14, 2025
e3e8272
restore some types we had erased
ashwinb Nov 14, 2025
277bec9
add 204s
ashwinb Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ repos:
hooks:
- id: ruff
args: [ --fix ]
exclude: ^(src/llama_stack_api/strong_typing/.*)$
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
Expand Down Expand Up @@ -106,16 +105,16 @@ repos:
language: python
pass_filenames: false
require_serial: true
files: ^src/llama_stack/providers/.*$
files: ^src/llama_stack/providers/.*$|^scripts/run_openapi_generator.sh$
- id: openapi-codegen
name: API Spec Codegen
additional_dependencies:
- uv==0.7.8
entry: sh -c './scripts/uv-run-with-index.sh run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
entry: sh -c './scripts/uv-run-with-index.sh run scripts/run_openapi_generator.sh'
language: python
pass_filenames: false
require_serial: true
files: ^src/llama_stack/apis/|^docs/openapi_generator/
files: ^src/llama_stack_api/.*$
- id: check-workflows-use-hashes
name: Check GitHub Actions use SHA-pinned actions
entry: ./scripts/check-workflows-use-hashes.sh
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ npm run serve
If you modify or add new API endpoints, update the API documentation accordingly. You can do this by running the following command:

```bash
uv run ./docs/openapi_generator/run_openapi_generator.sh
uv run ./scripts/run_openapi_generator.sh
```

The generated API schema will be available in `docs/static/`. Make sure to review the changes before committing.
2 changes: 1 addition & 1 deletion client-sdks/stainless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ These are the source-of-truth configuration files used to generate the Stainless

A small side note: notice the `.yml` suffixes since Stainless uses that suffix typically for its configuration files.

These files go hand-in-hand. As of now, only the `openapi.yml` file is automatically generated using the `run_openapi_generator.sh` script.
These files go hand-in-hand. As of now, only the `openapi.yml` file is automatically generated using the `scripts/run_openapi_generator.sh` script.
24 changes: 15 additions & 9 deletions client-sdks/stainless/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ resources:
sampling_params: SamplingParams
scoring_result: ScoringResult
system_message: SystemMessage
query_result: RAGQueryResult
document: RAGDocument
query_config: RAGQueryConfig
toolgroups:
models:
tool_group: ToolGroup
Expand All @@ -143,11 +140,6 @@ resources:
endpoint: get /v1/tool-runtime/list-tools
paginated: false
invoke_tool: post /v1/tool-runtime/invoke
subresources:
rag_tool:
methods:
insert: post /v1/tool-runtime/rag-tool/insert
query: post /v1/tool-runtime/rag-tool/query

responses:
models:
Expand All @@ -173,6 +165,7 @@ resources:
list:
type: http
endpoint: get /v1/responses/{response_id}/input_items
paginated: false

prompts:
models:
Expand Down Expand Up @@ -220,6 +213,9 @@ resources:
create:
type: http
endpoint: post /v1/conversations/{conversation_id}/items
delete:
type: http
endpoint: delete /v1/conversations/{conversation_id}/items/{item_id}

inspect:
models:
Expand Down Expand Up @@ -252,6 +248,7 @@ resources:
list:
type: http
endpoint: get /v1/chat/completions
paginated: false
retrieve:
type: http
endpoint: get /v1/chat/completions/{completion_id}
Expand Down Expand Up @@ -375,6 +372,7 @@ resources:
endpoint: get /v1/scoring-functions
paginated: false
register: post /v1/scoring-functions
unregister: delete /v1/scoring-functions/{scoring_fn_id}
models:
scoring_fn: ScoringFn
scoring_fn_params: ScoringFnParams
Expand All @@ -392,6 +390,13 @@ resources:
list_files_response: ListOpenAIFileResponse
delete_file_response: OpenAIFileDeleteResponse

batches:
methods:
create: post /v1/batches
list: get /v1/batches
retrieve: get /v1/batches/{batch_id}
cancel: post /v1/batches/{batch_id}/cancel

alpha:
subresources:
inference:
Expand Down Expand Up @@ -423,6 +428,7 @@ resources:
endpoint: get /v1alpha/eval/benchmarks
paginated: false
register: post /v1alpha/eval/benchmarks
unregister: delete /v1alpha/eval/benchmarks/{benchmark_id}
models:
benchmark: Benchmark
list_benchmarks_response: ListBenchmarksResponse
Expand Down Expand Up @@ -519,7 +525,7 @@ readme:
params: &ref_0 {}
headline:
type: request
endpoint: post /v1/models
endpoint: get /v1/models
params: *ref_0
pagination:
type: request
Expand Down
Loading
Loading