Skip to content

fix(discovery): compose OpenRouter catalog metadata - #1047

Merged
seonghobae merged 1 commit into
mainfrom
codex/openrouter-models-dev-compose
Sep 4, 2026
Merged

fix(discovery): compose OpenRouter catalog metadata#1047
seonghobae merged 1 commit into
mainfrom
codex/openrouter-models-dev-compose

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • OpenRouter를 Models.dev provider catalog에 연결합니다.
  • Models.dev 가격·모달리티 합성 뒤에도 OpenRouter ZDR·provider-policy 합성을 독립 실행합니다.
  • 서로 다른 endpoint privacy policy는 기존처럼 unknown으로 보류하는 회귀 테스트를 추가합니다.

검증

  • uv run pytest -q tests/test_model_discovery.py — 126 passed
  • uvx ruff check --select F --ignore F821 contextual_orchestrator/model_discovery.py tests/test_model_discovery.py — passed
  • uv run python -m compileall -q contextual_orchestrator/model_discovery.py tests/test_model_discovery.py — passed
  • git diff --check — passed

전체 Ruff/format 검사는 main에 이미 존재하는 import·format·F821 부채로 실패하므로 변경 범위의 오류 검사만 수행했습니다.

Summary by CodeRabbit

  • 개선 사항
    • OpenRouter 모델 검색 결과에 Models.dev 메타데이터가 통합됩니다.
    • 모델의 가격 정보와 데이터 보존 관련 정책이 더욱 정확하게 반영됩니다.
    • 서로 다른 정책 정보가 충돌하는 경우, 확인되지 않은 항목은 불확실한 상태로 표시되어 잘못된 보장을 방지합니다.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 0f02e6c9-ab82-44c0-8707-c9344dd34692

📥 Commits

Reviewing files that changed from the base of the PR and between c594b68 and 0ecdbb8.

📒 Files selected for processing (2)
  • contextual_orchestrator/model_discovery.py
  • tests/test_model_discovery.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

OpenRouter 모델 검색이 Models.dev 가격 메타데이터를 병합합니다. 검색 분기를 독립 조건문으로 변경했습니다. 오프라인 테스트는 무료 모델, ZDR 지원, 충돌하는 개인정보 정책의 fail-closed 결과를 검증합니다.

Changes

OpenRouter 모델 검색

Layer / File(s) Summary
OpenRouter 검색 분기 및 메타데이터 연결
contextual_orchestrator/model_discovery.py
OpenRouter 소스에 models_dev_provider_id="openrouter"를 추가했습니다. OpenRouter와 configured_gateway 메타데이터 분기를 별도 조건문으로 분리했습니다.
OpenRouter 정책 조합 회귀 테스트
tests/test_model_discovery.py
Models.dev 가격, ZDR 엔드포인트, provider 정책을 모의 응답으로 구성합니다. 무료 모델과 ZDR 지원을 확인합니다. 충돌하는 정책 태그에서는 supports_no_trainingsupports_no_prompt_retentionNone으로 확인합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0ecdb

OpenRouter discovery now incorporates Models.dev pricing and modality metadata while retaining fail-closed privacy classification when endpoint policies conflict. The change is covered by regression testing and is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 OpenRouter 카탈로그 메타데이터 조합 변경을 정확히 요약하며, PR의 주요 변경 사항과 일치합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/openrouter-models-dev-compose

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.

@seonghobae
seonghobae merged commit 17095da into main Sep 4, 2026
6 of 22 checks passed
@seonghobae
seonghobae deleted the codex/openrouter-models-dev-compose branch September 4, 2026 04:56
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