Skip to content

fix: discover configured gateway model catalog - #874

Merged
seonghobae merged 3 commits into
fix/gateway-default-chat-modelfrom
fix/configured-gateway-catalog
Aug 26, 2026
Merged

fix: discover configured gateway model catalog#874
seonghobae merged 3 commits into
fix/gateway-default-chat-modelfrom
fix/configured-gateway-catalog

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Problem

A trusted bootstrap could provide LLM_GATEWAY_API_URL / LLM_GATEWAY_URL and LLM_GATEWAY_API_KEY, but those settings were not connected to a ProviderModelSource. Standard /v1/models also omits the richer price and capability fields available from LiteLLM model info.

Fix

  • Build one OpenAI-compatible discovery source only when its HTTPS hostname is explicitly allowlisted.
  • Promote the one-shot environment key into KV; runtime discovery reads it through get_credential.
  • Join safe model-info fields by logical model name: mode, vision input, and complete consistent input/output token prices. Internal upstream URLs, credentials, and deployment identifiers are discarded.
  • Preserve paid, unknown-price, and structured zero-price models. Conflicting deployment prices remain unknown.
  • Retry only certificate-verification failures with certifi trust while retaining hostname and certificate verification.

Evidence

  • Focused discovery tests: 51 passed after model-info integration.
  • Live configured-gateway verification: eight models discovered, seven chat prices registered, embedding capability preserved, and zero provider errors.
  • Generic fixture proves structured zero-price chat models remain in the full catalog and enter the free tier.

Stacked on #868, which defines orchestrator/auto, orchestrator/free, gateway-default, and omitted-model serving semantics.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d08ab2e-a947-4de3-b047-260d85b24f3b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae merged commit 37dd619 into fix/gateway-default-chat-model Aug 26, 2026
1 of 2 checks passed
@seonghobae
seonghobae deleted the fix/configured-gateway-catalog branch August 26, 2026 10:20

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread contextual_orchestrator/model_discovery.py
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.

1 participant