Repository navigation
fix(providers): correct Nous Research key validation (#3881) - #3934
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…cept non-auth 4xx (#3881)
diegosouzapw
force-pushed
the
fix/3881-nous-validation
branch
from
June 15, 2026 22:43
5890f37 to
6d4d167
Compare
Merged
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 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.
Closes #3881
Problem
Adding a valid Nous Research API key reports invalid, even though the exact
curlfrom the portal's copy-shell button works.Root cause (
src/lib/providers/validation.ts)validateNousResearchProviderprobesPOST /v1/chat/completionswithmodel: "nousresearch/hermes-4-70b"— a slug Nous does not serve (the registry's real model isHermes-4-70B). Nous returns 400 model-not-found, and the validator only treated200/429as success (with explicit401/403,402,>=500branches), so a400fell through to"Connection failed while testing Nous Research"→ UI shows invalid. The base URL (https://inference-api.nousresearch.com/v1) andBearerauth were already correct.Fix
Hermes-4-70Bslug (aligns withproviderRegistry.ts).400/404/422) as a valid key — the 4xx proves auth was accepted, only the request shape was wrong. Mirrors the longcat/nvidia validators, so a future model rename can't re-break key validation.Validation (TDD — Hard Rule #18)
tests/unit/provider-validation-specialty.test.ts:Bearerkey whose probe returns 400 model-not-found →valid: true(failed before, passes after).node --import tsx/esm --test tests/unit/provider-validation-specialty.test.ts→ 111 pass / 0 fail (was 2 failing pre-fix).typecheck:coreclean, lint 0 errors, file-size re-baselined (4394→4407, validator branch not extractable).