feat(nim): add evidence-grade all-model benchmark (#86) - #906
Conversation
|
Warning Review limit reachedNext included review available in 17 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (28)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Validated at exact HEAD
Validation: focused NIM suite |
|
Resolved against exact HEAD 65109a4.\n\n- Scheduled NIM runs now use 23 3 1 * *, so the next scheduled run falls inside the reviewed access-cost window ending 2026-09-04; _require_current_actual_cost_evidence remains fail-closed after that horizon. Added a workflow contract test and synchronized the benchmark docs and changelog.\n- The five-call conduct concern is not a current failure mode: evaluate_policies fixes workflow_planning to the default template (four steps), verifier_judge=model adds one verifier call, and tool_retry_attempts=0; realtime_judge is used by route cells, not conduct cells. The five-call limiter therefore matches the live benchmark envelope and the focused conduct contract asserts observed_budget_calls <= MAX_WORKFLOW_DEPTH.\n- The preflight nesting note is informational only; the existing exact-boundary tests cover it.\n\nValidation: NIM benchmark, release, and workflow suite: 119 passed. Ruff, compileall, and git diff --check passed. |
… 30-task manifest test_smoke_manifest_cannot_authorize_production_routing was failing deterministically (reproduced with zero live network access, not a live-provider-discovery flakiness as two prior passes guessed): one locked task (trick_arithmetic_lily_pads) accumulates 1283 estimated tokens across its four conduct_bounded calls against a 1280-token equal budget, a 3-token overage that flips one cell to failure and drops the paired-success count to 29 of the required 30. Raise DEFAULT_MAX_OUTPUT_TOKENS 256 -> 264 (a benchmark-harness-only default, not a production routing/orchestration default) so the derived DEFAULT_POLICY_TOTAL_TOKEN_BUDGET carries a 40-token margin. 121/121 NIM benchmark tests pass; 100% statement/branch coverage and 100% docstrings on nim_benchmark.py hold. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
|
Found and fixed the Fix: ContextualWisdomLab/.github#1435 (exempts documentation PDFs under Separately, Generated by Claude Code |
…rk-rebuild-20260828 # Conflicts: # CHANGELOG.md
|
설계 결정: 추상화는 사용하지 않습니다. 와 는 같은 endpoint를 쓰더라도 서로 다른 모델 catalog를 노출할 수 있는 독립 credential/account boundary이므로 각각 discovery·보존·실패 판정을 수행해야 합니다. 모델 간 동적 선택과 latency/quality evidence 공유는 provider 이름 추정이 아니라 오직 명시적 경계에서만 수행하십시오. 이 PR이 해당 전제를 포함하면 제거하거나 현재 head에서 재검증해 주세요. |
|
일반화: 앞 코멘트의 NVIDIA는 예시일 뿐입니다. 모든 KV credential은 독립 provider-account/catalog boundary입니다. 같은 vendor/endpoint/model ID라도 서로 다른 key의 모델·권한·가격·privacy·가용성·실패 상태가 같다고 추정하거나 dedupe하지 마십시오. 개념은 제거하며, 논리적 모델 동등성과 latency/quality evidence 공유는 오직 operator가 명시한 으로만 성립합니다. |
|
최종 일반 계약: 모든 KV credential은 독립 provider-account/catalog boundary입니다. 같은 vendor, endpoint, model ID라도 서로 다른 key의 모델, 권한, 가격, privacy, 가용성, 실패 상태를 같다고 추정하거나 dedupe하지 않습니다. provider family는 없으며, 논리적 모델 동등성과 latency/quality evidence 공유는 오직 operator가 명시한 model_group으로만 성립합니다. |
|
Cross-PR integration contract: routing identity is provider-neutral |
There was a problem hiding this comment.
Noema LLM review
The PR implements a comprehensive, evidence-grade benchmark harness for NVIDIA NIM models. It introduces dynamic catalog discovery, multi-modality capability probing, and a fair-comparison framework for routing policies (direct, route-once, conduct) using equalized token and call budgets. The implementation adheres to strict security requirements, including DNS pinning for HTTPS connections, rejection of non-globally routable addresses, and a fail-closed budget system. Prior review concerns regarding budget accounting, transport pinning, and authentication handling have been resolved in the current implementation.
Reviewed changed lines
contextual_orchestrator/__main__.py:497 (RIGHT): Correctly dispatches the 'nim-benchmark' subcommand using the normalized 'arguments' list rather than sys.argv, resolving a prior bug.contextual_orchestrator/nim_benchmark.py:325 (RIGHT): The _BudgetedModelClient explicitly sets max_retries=0 in init, ensuring the RequestBudget bounds actual egress calls rather than logical attempts.contextual_orchestrator/nim_benchmark.py:412 (RIGHT): EqualBudgetModelClient implements getattr to forward ModelClient capabilities, ensuring compatibility with orchestrator features like request_settings.contextual_orchestrator/nim_benchmark.py:175 (RIGHT): The transport implementation uses PinnedHTTPSConnection and validated_public_addresses to prevent DNS rebinding and SSRF, enforcing globally routable endpoints.
Adversarial validation
contextual_orchestrator/nim_benchmark.py:325 (RIGHT)falsified: Logical chat calls could trigger hidden provider retries, exceeding the hard request budget. — The _BudgetedModelClient constructor sets kwargs['max_retries'] = 0, which is passed to the super ModelClient, disabling internal retries.contextual_orchestrator/nim_benchmark.py:175 (RIGHT)falsified: The benchmark could be used to probe internal network resources via DNS redirection. — require_public_https_endpoint calls validated_public_addresses, which rejects non-globally routable addresses (RFC 6598, etc.) before the connection is established.- Residual risk: Low. The benchmark is an optional adapter and does not sit in the primary request path. The use of a hard request budget and DNS pinning mitigates the primary security and cost risks.
Findings
-
No blocking findings.
-
Result: APPROVE
-
Head SHA:
a2a9881d72c19aed90ede3001175208a14012490 -
Reviewer credential:
noema-review-github-app -
Actor:
cwl-noema-review[bot]
Summary
Implements issue #86 on current main.
Validation
No production routing defaults are changed.