Use OpenAI default model for OpenAI fallback#46
Open
sjh9714 wants to merge 1 commit into
Open
Conversation
Signed-off-by: sjh9714 <163989462+sjh9714@users.noreply.github.com>
cpodalak
approved these changes
Jun 14, 2026
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
Fixes #38.
When only
OPENAI_API_KEYis configured,get_chat_model()currently falls back to the active metadata provider default model instead of the OpenAI provider default. This resolves the fallback client configuration through the same provider that supplied the credentials, so OpenAI-only setups use the OpenAI default model while explicit models and provider credentials still take precedence.Changes
Testing
env -u NVIDIA_INFERENCE_KEY -u NVIDIA_INFERENCE_METADATA_KEY -u OPENAI_BASE_URL -u SKILLSPECTOR_MODEL -u SKILLSPECTOR_PROVIDER OPENAI_API_KEY=sk-test-openai-only uv run python - <<'PY' ... PYuv run --extra dev pytest tests/unit/test_llm_utils.py -quv run --extra dev pytest -m "not integration" tests/ -quv run --extra dev ruff check src/ tests/uv run --extra dev ruff format --check src/ tests/Note: I used Codex while preparing this change, reviewed the final diff, and ran the listed checks locally.