Repository navigation
feat(providers): optional AI Horde API key and live image catalog - #10542
Merged
diegosouzapw merged 4 commits intoAug 18, 2026
Conversation
added 2 commits
August 16, 2026 10:30
Allow a registered Horde key on the no-auth connection and send it for chat and image jobs. List only image models that currently have workers, and generate through Horde's native async API. # Conflicts: # open-sse/config/imageRegistry.ts # src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx # src/shared/constants/providers.ts # src/sse/services/auth.ts
The OpenAI-compatible /v1/models probe returns 200 for any Bearer token on oai.aihorde.net, so Check always succeeded. Use Horde's /v2/find_user lookup instead; an empty key still counts as the optional anonymous path.
Collaborator
|
The happy paths are covered, but optional-key selection bypasses connection health and new R2/catalog fetches bypass repository bounded remote-fetch protections. Add unhealthy-key fallback and timeout/abort/size/SSRF tests, then run live/VPS validation. |
- Optional-key selection now honors connection health (rate-limit cooldown and terminal/unavailable test status) before handing a stored key back, rotating to the next healthy key or falling back to the anonymous no-auth path instead of using an unhealthy stored key. - Route the Horde submit/check/status/cancel and catalog calls through the repository's bounded outbound-fetch helper (timeout, no more bare fetch()) and route R2 image downloads through the established bounded remote-image fetch (SSRF host guard, DNS-rebinding pin, streaming byte cap, redirect limit) instead of an unbounded fetch(). - Extend the generation deadline to cover the full request lifecycle (catalog freshness check, submit, polling, and image download), and add a regression test proving that exceeding the deadline issues a DELETE cancel to Horde's API rather than only timing out locally. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 18, 2026
…owth Three independent, already-approved provider PRs (#10542 aihorde, #10494 gemini-web image, #10594 freepik/magnific) boarded together in the 2026-08-18 merge-train each add a small, additive registry entry to open-sse/config/imageRegistry.ts. None crosses the 1000-line cap alone; combined they push it from 996 to 1019. Owner-authorized blanket rebaseline approval for this merge batch.
diegosouzapw
merged commit Aug 18, 2026
b9cd5ed
into
cheaper-inference:release/v3.8.50
3 checks passed
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…owth Three independent, already-approved provider PRs (cheaper-inference#10542 aihorde, cheaper-inference#10494 gemini-web image, cheaper-inference#10594 freepik/magnific) boarded together in the 2026-08-18 merge-train each add a small, additive registry entry to open-sse/config/imageRegistry.ts. None crosses the 1000-line cap alone; combined they push it from 996 to 1019. Owner-authorized blanket rebaseline approval for this merge batch.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…eaper-inference#10542) * feat(providers): optional AI Horde API key and live image catalog Allow a registered Horde key on the no-auth connection and send it for chat and image jobs. List only image models that currently have workers, and generate through Horde's native async API. # Conflicts: # open-sse/config/imageRegistry.ts # src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx # src/shared/constants/providers.ts # src/sse/services/auth.ts * fix(providers): validate AI Horde keys against find_user The OpenAI-compatible /v1/models probe returns 200 for any Bearer token on oai.aihorde.net, so Check always succeeded. Use Horde's /v2/find_user lookup instead; an empty key still counts as the optional anonymous path. * chore(changelog): name the AI Horde fragment for cheaper-inference#10542 * fix(images): harden AI Horde optional-key selection and outbound fetches - Optional-key selection now honors connection health (rate-limit cooldown and terminal/unavailable test status) before handing a stored key back, rotating to the next healthy key or falling back to the anonymous no-auth path instead of using an unhealthy stored key. - Route the Horde submit/check/status/cancel and catalog calls through the repository's bounded outbound-fetch helper (timeout, no more bare fetch()) and route R2 image downloads through the established bounded remote-image fetch (SSRF host guard, DNS-rebinding pin, streaming byte cap, redirect limit) instead of an unbounded fetch(). - Extend the generation deadline to cover the full request lifecycle (catalog freshness check, submit, polling, and image download), and add a regression test proving that exceeding the deadline issues a DELETE cancel to Horde's API rather than only timing out locally. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: pqr <pqr@soraka.ititti.es> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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
aihorde.netAPI key. Requests still work anonymously (0000000000); a saved key is used for higher queue priority (kudos).oai.aihorde.net. Image models are discovered from Horde's liveGET /v2/status/models?type=imagecatalog and only advertised whilecount > 0. Names stay the exact Horde strings.POST /v1/images/generationsforaihorde/<name>orhorde/<name>runs Horde's native async generate/check/status flow, returnsb64_json, and cancels the job on timeout or disconnect./v1/modelsprobe returns 200 for any Bearer token onoai.aihorde.net; validation now usesGET /v2/find_user. An empty field is still the optional anonymous path.Related Issues
anonymousApiKey, [feature] Anonymous (no-auth) usage for Kilo Code free models, like opencode #4019 pattern).Validation
node --import tsx/esm --test tests/unit/aihorde-image-catalog.test.ts tests/unit/aihorde-image-generation.test.ts tests/unit/aihorde-optional-api-key.test.ts tests/unit/aihorde-key-validation.test.tsnpm run lint(CI)Tests Added Or Updated
tests/unit/aihorde-image-catalog.test.tstests/unit/aihorde-image-generation.test.tstests/unit/aihorde-optional-api-key.test.tstests/unit/aihorde-key-validation.test.tsCoverage Notes
apikeyheader, optional stored-key credential selection, andfind_userkey validation are covered by the new unit tests.imageRegistry.tsstays at 999 LOC (under the 1000-line new-file cap) by sourcing live Horde models fromAI_HORDE_IMAGE_PROVIDER.models.Reviewer Notes
release/v3.8.50, notmain.getProviderCredentialsnow prefers an active stored Horde key, then the syntheticnoauthfallback, and still honors#9057allowedConnections(syntheticnoauthis not returned when an allowlist is set).DELETEs the job.changelog.d/features/00000-aihorde-optional-key-image-catalog.md(rename with the PR number after open).