Derive model list from SDK and read version from package metadata#10
Merged
Conversation
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
marked this pull request as ready for review
June 12, 2026 19:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes two improvements to reduce manual maintenance and drift:
Key changes:
Dynamic model list: Replace the hand-maintained
_KNOWN_MODELSlist inserver.pywith a dynamically generated list derived from the SDK's canonicalTEE_LLMenum. 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__.pyto 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
statuscommand inveil/cli.pyso users can easily check which version is running.Implementation details:
TEE_LLMenum value by splitting on "/" and taking the second part, since enum values are formatted asprovider/modelbut callers use the bare model name.importlib.metadata.version()with proper exception handling for development environments.https://claude.ai/code/session_01HJSCCaqEQKTQKbo4A2LF25