Skip to content

Derive model list from SDK and read version from package metadata#10

Merged
adambalogh merged 1 commit into
mainfrom
claude/bold-johnson-q2pog4
Jun 12, 2026
Merged

Derive model list from SDK and read version from package metadata#10
adambalogh merged 1 commit into
mainfrom
claude/bold-johnson-q2pog4

Conversation

@adambalogh

Copy link
Copy Markdown
Contributor

This PR makes two improvements to reduce manual maintenance and drift:

Key changes:

  • Dynamic model list: Replace the hand-maintained _KNOWN_MODELS list in server.py with a dynamically generated list derived from the SDK's canonical TEE_LLM enum. This ensures the model list stays in sync with the network as models are added or retired, eliminating the need for manual updates.

  • Version from package metadata: Update veil/__init__.py to read __version__ from installed package metadata (pyproject.toml) instead of hardcoding it. This ensures the version never drifts from the packaged version. Falls back to "0.0.0+unknown" when running from a source tree without an install.

  • Display version in CLI: Add version output to the status command in veil/cli.py so users can easily check which version is running.

Implementation details:

  • The model list now extracts the bare model name from each TEE_LLM enum value by splitting on "/" and taking the second part, since enum values are formatted as provider/model but callers use the bare model name.
  • Version reading uses importlib.metadata.version() with proper exception handling for development environments.

https://claude.ai/code/session_01HJSCCaqEQKTQKbo4A2LF25

Derive the /v1/models listing from the SDK's canonical TEE_LLM enum
instead of a hand-maintained list that had gone stale (7 models -> the
full current set), so it tracks the network as models are added/retired.

Also print the package version in `og-veil status`, sourced from the
installed dist metadata so it never drifts from pyproject.
@adambalogh
adambalogh marked this pull request as ready for review June 12, 2026 19:48
@adambalogh
adambalogh merged commit 91ee243 into main Jun 12, 2026
4 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