llama-stack-mirror/docs/docs
Theofanis Petkos 5fe6098350
docs: Improvements on provider_codegen for type hints and multi-line yaml descriptions (#4033)
# What does this PR do?

This PR improves type hint cleanup in auto-generated provider
documentation by adding regex logic.

**Issues Fixed:**
- Type hints with missing closing brackets (e.g., `list[str` instead of
`list[str]`)
- Types showing as `<class 'bool'>`, `<class 'str'>` instead of `bool`,
`str`
- The multi-line YAML frontmatter in index documentation files wasn't
ideal, so we now add the proper `|` character.

**Changes:**
1. Replaced string replacement (`.replace`) with regex-based type
cleaning to preserve the trailing bracket in case of `list` and `dict`.
2. Adds the `|` character for multi-line YAML descriptions.
3. I have regenerated the docs. However, let me know if that's not
needed.

## Test Plan

1. Ran uv run python scripts/provider_codegen.py - successfully
regenerated all docs
2. We can see that the updated docs handle correctly type hint cleanup
and multi-line yaml descriptions have now the `|` character.

### Note to the reviewer(s)

This is my first contribution to your lovely repo! Initially I was going
thourgh docs (wanted to use `remote::gemini` as provider) and realized
the issue. I've read the
[CONTRIBUTING.md](https://github.com/llamastack/llama-stack/blob/main/CONTRIBUTING.md)
and decided to open the PR. Let me know if there's anything I did wrong
and I'll update my PR!

---------

Signed-off-by: thepetk <thepetk@gmail.com>
Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
2025-11-17 12:35:28 -08:00
..
advanced_apis chore: update doc (#3857) 2025-10-20 10:33:21 -07:00
api docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-deprecated docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-experimental docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-openai docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
building_applications fix: Remove authorization from provider data (#4161) 2025-11-17 12:16:35 -08:00
concepts feat: split API and provider specs into separate llama-stack-api pkg (#3895) 2025-11-13 11:51:17 -08:00
contributing feat: Add static file import system for docs (#3882) 2025-10-24 14:01:33 -04:00
deploying docs: Add Llama Stack Operator docs (#3983) 2025-11-10 15:29:15 +01:00
distributions feat: split API and provider specs into separate llama-stack-api pkg (#3895) 2025-11-13 11:51:17 -08:00
getting_started docs: use 'uv pip' to avoid pitfalls of using 'pip' in virtual environment (#4122) 2025-11-11 07:49:03 -05:00
providers docs: Improvements on provider_codegen for type hints and multi-line yaml descriptions (#4033) 2025-11-17 12:35:28 -08:00
references chore: update docs for telemetry api removal (#3900) 2025-10-24 13:57:28 -07:00
api-overview.md docs: api separation (#3630) 2025-10-01 10:13:31 -07:00
index.mdx chore: update docs for telemetry api removal (#3900) 2025-10-24 13:57:28 -07:00