Skip to content

feat: Add update.py script for API-assisted updates - #578

Merged
fghaas merged 2 commits into
cleura:mainfrom
fghaas:feat/update-llms-docs
Nov 5, 2026
Merged

fghaas merged 2 commits into
cleura:mainfrom
fghaas:feat/update-llms-docs

Conversation

@fghaas

@fghaas fghaas commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
  • Add scripts/update.py to fetch available models from Cleura AI and regenerate the table in docs/reference/services/ai/llms.md.
    The script uses the OpenAI-compatible GET /v1/models endpoint, honouring OPENAI_API_KEY and OPENAI_API_BASE_URL environment variables.
    The generated table is sorted alphabetically by model ID and uses the model count to create the summary line.
  • Add [testenv:update] to invoke scripts/update.py, passing OPENAI_* environment variables so that model list tables can be regenerated via tox -e update.
  • Update the README.

References:
https://ai.cleura.cloud/openapi.json

Assisted-by: opencode/qwen3.6-35b-a3b-fp8

@fghaas
fghaas force-pushed the feat/update-llms-docs branch from 8db3130 to 87cb097 Compare November 5, 2026 12:39
@fghaas

fghaas commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@colder-is-better Let me know what you think of this approach. Thanks!

Comment thread scripts/update.py Resolved

@colder-is-better colder-is-better left a comment

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.

Looks good and convenient. I only have one question.

@fghaas
fghaas force-pushed the feat/update-llms-docs branch from 87cb097 to 7cc6ba1 Compare November 5, 2026 13:11
@colder-is-better
colder-is-better self-requested a review November 5, 2026 13:19
- Add scripts/update.py to fetch available models from Cleura AI and
  regenerate the table in docs/reference/services/ai/llms.md.
  The script uses the OpenAI-compatible GET /v1/models endpoint,
  honouring OPENAI_API_KEY and OPENAI_API_BASE_URL environment
  variables.
  The generated table is sorted alphabetically by model ID and uses
  the model count to create the summary line.
- Add [testenv:update] to invoke scripts/update.py, passing OPENAI_*
  environment variables so that model list tables can be regenerated
  via `tox -e update`.
- Update the README.

References:
https://ai.cleura.cloud/openapi.json

Assisted-by: opencode/qwen3.6-35b-a3b-fp8
Use the "tox -e update" approach to auto-generate the list of
currently supported models.
Comment thread scripts/update.py
# Models are matched against this list of regex patterns in priority
# order — the first match wins. Patterns that don't fit any pattern
# fall back to a description derived from architecture modalities.
DESIGN_PATTERNS: list[tuple[re.Pattern, str]] = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@colder-is-better: Actually, it makes sense to use a similar approach here too.

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.

Indeed!

@fghaas
fghaas requested a review from StefanTerdell November 5, 2026 13:45
@fghaas

fghaas commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@StefanTerdell: no need for you to approve this; I just wanted you to be aware that this exists.

@fghaas
fghaas merged commit a74d7ed into cleura:main Nov 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants