fix(llmhubs): add credential placeholders to model config templates#44
Open
xinkuleee wants to merge 1 commit into
Open
fix(llmhubs): add credential placeholders to model config templates#44xinkuleee wants to merge 1 commit into
xinkuleee wants to merge 1 commit into
Conversation
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.
Summary
The llmhubs config templates under
deploy/config/llmhubs/were missing thecredential/auth field, so a user copying a template to activate a model had no
indication of how to supply an API key — inconsistent with the existing
OpenRouter template, which already included one.
This adds the correct, provider-specific credential placeholder (as an
environment-variable reference) to each provider example:
api_key: ${AZURE_OPENAI_API_KEY:-}bearer_token: ${<PROVIDER>_API_KEY}api_key_value: ${<PROVIDER>_API_KEY}(sent asx-api-key)gpt5.4-template.yamlconfig and the active config inmodel-template.yamlalso getapi_key: ${AZURE_OPENAI_API_KEY:-}plus ashort auth comment.
All values are env-var references — no secrets are committed. Field names match
what each adapter reads (
adapters/base.py._build_auth_headers; the Azureadapter/embedding readers use
config["api_key"]). The${VAR:-}vs${VAR}choice is deliberate and matches
config_loadersemantics: an empty defaultkeeps the descriptor loadable (Azure falls back to managed identity when the key
is unset), while a bare
${VAR}correctly skips a provider's model when itsrequired key is unset.
Validation
make precommit-runcd backend && go test ./...cd core && uv run pytestBackend/Core/Frontend suites are not applicable — this change only touches
template: trueYAML data underdeploy/config/llmhubs/; no Go, Python, orfrontend code changed. In addition to pre-commit, I verified the two files parse
as YAML and cross-checked every field name and the
${VAR:-}/${VAR}behavior against
core/app/llmhubs/config_loader.pyandcore/app/llmhubs/adapters/base.py.Checklist
issue; addresses a code-review comment that the llmhubs templates were
incomplete/missing the key field.)
docs; the existing
deploy/config/llmhubs/README.mdalready documents${VAR}/${VAR:-default}substitution.)CHANGELOG.mdunder## [Unreleased]for user-facing changes.(N/A — config-template/docs completeness only; no user-facing runtime change.)
changes. (N/A — none touched.)
(Only env-var placeholders; verified
git diff.)Notes for reviewers
template: true, so the loader skips them at runtime — thisis documentation/example completeness only, zero runtime behavior change.
${VAR:-}(Azure) vs${VAR}(others): Azure supports amanaged-identity fallback, so an empty key should still load the model; the
other providers require a key, so the model should be skipped when unset. This
matches
config_loader._expand_env_in_string(empty explicit default is nottreated as "missing").