feat(providers): add 1min.ai provider - #11631
Merged
diegosouzapw merged 1 commit intoAug 26, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
1min.ai (docs.1min.ai) is a chat aggregator with a custom, non-OpenAI- compatible API: a single promptObject.prompt string instead of a messages array, real SSE (event:/data:) instead of raw text deltas, and an "API-KEY" auth header instead of Authorization: Bearer. Adds a full OneMinAiExecutor translating both directions (message- history flattening, SSE-to-OpenAI-chunk streaming, JSON response unwrapping, error mapping via buildErrorBody), registered under both `oneminai` and `1min` aliases, plus the registry entry, dashboard metadata, static model catalog wiring, and an API-key validator. Tool-calling/vision/response_format are declared unsupported since the translation doesn't wire up 1min.ai's attachments/Asset API. Validated against the live API with a real key: non-streaming, streaming, and multi-turn context flattening all produce correct responses. Also fixes a pre-existing Windows-only bug in executor-map-golden.test.ts (new URL(import.meta.url).pathname produces a leading-slash path that double-prefixes the drive letter when resolved) by switching to fileURLToPath, matching the existing pattern in tests/helpers/goldenSnapshot.ts. This was blocking the golden snapshot from running/regenerating at all on Windows, independent of this change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
diegosouzapw
added a commit
that referenced
this pull request
Aug 26, 2026
This was referenced Aug 26, 2026
diegosouzapw
added a commit
to ntdatt812/OmniRoute
that referenced
this pull request
Sep 10, 2026
check:file-size freezes src/shared/constants/providers/apikey/gateways.ts at 1462 lines, so a new catalog entry fails the gate on arrival. This PR's entry and diegosouzapw#13025's take it to 1502 together. Annotated rather than split: the file is declarative provider data, already divided into six family files under apikey/, and every previous gateway entry took the same route (diegosouzapw#11786 seekai, diegosouzapw#10987 logfare, diegosouzapw#10668 tabitoken, diegosouzapw#10531 freebuff, diegosouzapw#11631 1min.ai). Splitting a catalog for two entries would break the semantic-families rule instead of helping. The bump covers both entries because they land in the same batch.
diegosouzapw
pushed a commit
that referenced
this pull request
Sep 10, 2026
Merged with a rebaseline commit added on top of your branch: check:file-size freezes the gateways catalog at 1462 lines, so any new entry fails the gate on arrival. The annotation covers this entry and EURouter's (#13025) together, following the route every previous gateway entry took (#11786 seekai, #10987 logfare, #10668 tabitoken, #10531 freebuff, #11631 1min.ai) — the file is declarative data already split into six family files, so splitting it for two entries would break the semantic-families rule. Validated in a combined worktree with 13 sibling PRs: 132 focused tests pass, typecheck:core clean, file-size green after the rebaseline. Thank you for stating plainly what you did not verify. "The endpoint exists and is key-gated; catalog, streaming and tool calls not exercised" is worth more than a confident entry that turns out to be guesswork, and the conservative entry that follows from it — empty models, no capability declared, hasFree false with the billing shape spelled out — is exactly right.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). Boarded no worktree combinado junto com outras ~20 PRs; validação única: typecheck/complexity/cognitive-complexity/changelog-integrity verdes, file-size rebaseado onde necessário (crescimento legítimo), lint com os mesmos 228 achados pré-existentes confirmados via sonda contra o tip puro (não introduzidos por este lote), e 292 testes focados (unit) + 18 (vitest) passando. Obrigado pela contribuição.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…apw#11631/diegosouzapw#11628 growth (diegosouzapw#11636) Merged via /merge-batch (correção de lacuna, 2026-08-26). check:file-size confirmado OK após o rebaseline.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…ouzapw#13024) Merged with a rebaseline commit added on top of your branch: check:file-size freezes the gateways catalog at 1462 lines, so any new entry fails the gate on arrival. The annotation covers this entry and EURouter's (diegosouzapw#13025) together, following the route every previous gateway entry took (diegosouzapw#11786 seekai, diegosouzapw#10987 logfare, diegosouzapw#10668 tabitoken, diegosouzapw#10531 freebuff, diegosouzapw#11631 1min.ai) — the file is declarative data already split into six family files, so splitting it for two entries would break the semantic-families rule. Validated in a combined worktree with 13 sibling PRs: 132 focused tests pass, typecheck:core clean, file-size green after the rebaseline. Thank you for stating plainly what you did not verify. "The endpoint exists and is key-gated; catalog, streaming and tool calls not exercised" is worth more than a confident entry that turns out to be guesswork, and the conservative entry that follows from it — empty models, no capability declared, hasFree false with the billing shape spelled out — is exactly right.
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
Adds 1min.ai (docs.1min.ai) as a provider. It's a chat aggregator with a genuinely custom, non-OpenAI-compatible API:
promptObject.promptstring per request instead of amessagesarray (multi-turn context is normally carried server-side viapromptObject.conversationId, which requires a priorPOST /api/conversationscall and a stable conversation identity that stateless OpenAI-compatible clients don't provide)event:/data:framing, event typescontent/result/done/error) instead of raw text deltas or OpenAI-shaped chunksAPI-KEYauth header instead ofAuthorization: Bearer(confirmed from every literal code sample on their docs page — their own docs intro page saysAuthorization: Bearerelsewhere, which is incorrect for this endpoint)OneMinAiExecutortranslates both directions: flattens OpenAI message history into a labeled prompt transcript, translates their real SSE stream into standardchat.completion.chunkevents, unwraps their nestedaiRecord.aiRecordDetail.resultObjectfor non-streaming JSON, and maps errors throughbuildErrorBody. Registered under bothoneminaiand1minaliases via the lazy-loading executor pattern (#11220).Tool-calling, vision, and
response_formatare declared asunsupportedParamssince the translation doesn't wire up 1min.ai'sattachments/Asset API — flagged honestly rather than silently dropped.Also fixes a pre-existing Windows-only bug in
executor-map-golden.test.ts:new URL(import.meta.url).pathnameproduces a leading-slash path (/C:/Users/...) that double-prefixes the drive letter when resolved (C:\C:\Users\...), which made the golden snapshot test unable to run at all on Windows — confirmed by reproducing the identical failure on a clean checkout with none of this PR's changes applied. Fixed by switching tofileURLToPath, matching the existing pattern already used intests/helpers/goldenSnapshot.ts.Test plan
tests/unit/executor-oneminai.test.ts): registration, prompt-flattening (single message + multi-turn), non-streaming JSON translation, SSE streaming translation, error mapping — 6/6 passOneMinAiExecutorclass (not a mock): non-streaming, streaming, and multi-turn context flattening all produced correct responsesnpm run lint— 0 problems in changed filesnpm run check:any-budget:t11— passnpm run check:tracked-artifacts— passnpm run build— succeedsexecutor-map-golden.test.ts) regenerated (UPDATE_GOLDEN=1) against the current branch tip — diff is exactly the two new aliases (oneminai,1min) plus thekeyCountbump, both golden assertions passrelease/v3.8.51immediately before opening this PR (single commit, verifiedHEAD~1== upstream tip)🤖 Generated with Claude Code