feat: add deAPI as embeddings provider - #2492
adampachowicz wants to merge 4 commits into
Conversation
Register deAPI (https://deapi.ai), an OpenAI-compatible inference platform operated by GamerHash, exposing its multilingual BGE-M3 embedding model (deapi/bge-m3). deAPI serves a native /v1/embeddings endpoint and does not offer chat completions, so this scopes to embeddings only. - Provider + model registration (providers.ts, models/deapi.ts, models.ts) - Base URL https://oai.deapi.ai in the embeddings route + endpoint resolver - Bearer auth (existing default group) - Embeddings-only provider key validation (deAPI is the first such provider; getValidationModel excludes embedding models, so validation is skipped only when every model for the provider is embeddings-only, mirroring 'custom') - deAPI icon (currentColor, themeable) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughRegisters deAPI as a new provider (env example, provider registry), adds bge-m3 embeddings model, resolves deAPI base URLs and bearer-token headers, adjusts validation to accept embeddings-only providers, and wires UI icon/logo entries and embeddings upstream default. ChangesdeAPI provider integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
packages/shared/src/components/provider-icons.tsx (1)
1288-1288: ⚡ Quick winRemove unnecessary comment.
The export name
DeAPIIconis self-documenting; the comment adds no additional value.As per coding guidelines: "No unnecessary code comments" for TypeScript files.
♻️ Proposed fix
-// deAPI Icon export const DeAPIIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/shared/src/components/provider-icons.tsx` at line 1288, Remove the redundant inline comment "// deAPI Icon" that precedes the export of DeAPIIcon; the export name DeAPIIcon is self-documenting, so delete that comment near the DeAPIIcon declaration/export in provider-icons.tsx to comply with the "No unnecessary code comments" guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/models/src/providers.ts`:
- Around line 1142-1143: Update the deAPI provider entry in providers.ts by
replacing the null values for the termsUrl and privacyPolicyUrl fields with the
official deAPI links; specifically set termsUrl to
"https://deapi.ai/terms-of-service" and privacyPolicyUrl to
"https://deapi.ai/privacy-policy" in the object that contains the termsUrl and
privacyPolicyUrl properties.
- Around line 1124-1145: Add a dataPolicy object to the provider entry with id
"deapi" in providers.ts: set apiTraining: false and consumerTraining: false, set
retentionPeriod to a short/transient value (e.g., "brief_post-processing" or
"transient") to reflect brief retention after processing, set promptLogging to
null and explicitly set certification flags (soc2, iso27001, etc.) to null with
a short rationale string (e.g., "not documented publicly") where deAPI
documentation does not assert them, and include a short human-readable note that
deAPI is a data processor and users remain data controllers and should avoid
submitting sensitive/PII. Ensure the new dataPolicy field is added inside the
same provider object that has id "deapi".
In `@packages/shared/src/components/provider-icons.tsx`:
- Around line 1291-1295: The JSX element currently spreads {...props} and then
redundantly sets className={props.className}; remove the explicit
className={props.className} property so the className from the props spread is
used exclusively (leave {...props} intact) — locate the element in
provider-icons.tsx where {...props} and className={props.className} appear and
delete the explicit className attribute.
---
Nitpick comments:
In `@packages/shared/src/components/provider-icons.tsx`:
- Line 1288: Remove the redundant inline comment "// deAPI Icon" that precedes
the export of DeAPIIcon; the export name DeAPIIcon is self-documenting, so
delete that comment near the DeAPIIcon declaration/export in provider-icons.tsx
to comply with the "No unnecessary code comments" guideline.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5223fd29-0baa-4114-be13-528ab990ebb7
📒 Files selected for processing (10)
.env.exampleapps/gateway/src/embeddings/embeddings.tsapps/ui/src/components/provider-keys/provider-logo.tspackages/actions/src/get-provider-endpoint.tspackages/actions/src/get-provider-headers.tspackages/actions/src/validate-provider-key.tspackages/models/src/models.tspackages/models/src/models/deapi.tspackages/models/src/providers.tspackages/shared/src/components/provider-icons.tsx
- Set BGE-M3 price to $0.068/1M tokens (confirmed configured rate)
- Add deAPI terms of service + privacy policy URLs
- Drop redundant className prop on the deAPI icon (covered by {...props})
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Populate dataPolicy from deAPI's published privacy policy: 90-day API log retention, GDPR (EU/processor). Model-training flags left null since the policy does not make a no-training claim, and promptLogging is true given API logs are retained and processing may occur on distributed third-party nodes — kept accurate rather than over-claiming privacy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align provider description and headquarters with deAPI's published legal entity (CoinAxe Ltd, registered in Malta) per its terms/privacy policy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
please contact us at contact@llmgateway.io for listing requests |
## Summary
Several provider icon components set `className={props.className}`
explicitly **right after** spreading `{...props}` onto the same `<svg>`.
Since `{...props}` already includes `className`, the explicit prop is
redundant (it just re-assigns the same value).
This removes the redundant prop from the affected icons:
`AnthropicIcon`, `DeepseekIcon`, `GroqIcon`, `InferenceNetIcon`,
`MinimaxIconStatic`, `MinimaxIcon`, `XiaomiIcon`, `DeepInfraIcon`.
The `cn("…", props.className)` merges (which intentionally combine extra
classes with the caller's `className`) are **left untouched** — those
are not redundant.
## Notes
- No behavior change — `className` still flows through via `{...props}`.
- Prettier collapsed a few now-shorter `<svg>` tags onto single lines.
This came up while CodeRabbit was reviewing theopenco#2492 (adding the deAPI
provider); it flagged the redundant prop on the new icon, and I noticed
the same pattern existed across the existing icons, so here's a small
repo-wide cleanup. Happy to adjust or drop it if you'd prefer to keep it
as-is.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Updated icon component prop forwarding mechanism for improved
consistency and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## Summary
Several provider icon components set `className={props.className}`
explicitly **right after** spreading `{...props}` onto the same `<svg>`.
Since `{...props}` already includes `className`, the explicit prop is
redundant (it just re-assigns the same value).
This removes the redundant prop from the affected icons:
`AnthropicIcon`, `DeepseekIcon`, `GroqIcon`, `InferenceNetIcon`,
`MinimaxIconStatic`, `MinimaxIcon`, `XiaomiIcon`, `DeepInfraIcon`.
The `cn("…", props.className)` merges (which intentionally combine extra
classes with the caller's `className`) are **left untouched** — those
are not redundant.
## Notes
- No behavior change — `className` still flows through via `{...props}`.
- Prettier collapsed a few now-shorter `<svg>` tags onto single lines.
This came up while CodeRabbit was reviewing theopenco#2492 (adding the deAPI
provider); it flagged the redundant prop on the new icon, and I noticed
the same pattern existed across the existing icons, so here's a small
repo-wide cleanup. Happy to adjust or drop it if you'd prefer to keep it
as-is.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Updated icon component prop forwarding mechanism for improved
consistency and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Adds deAPI (deapi.ai) as a new OpenAI-compatible inference provider, exposing its multilingual BGE-M3 embedding model as
deapi/bge-m3.deAPI serves a native
/v1/embeddingsendpoint and does not offer chat completions, so this PR is scoped to embeddings only. Image/audio modalities are intentionally left for follow-ups.Implementation
deapiinpackages/models/src/providers.ts+ model definition inpackages/models/src/models/deapi.ts, wired into themodelsaggregate.https://oai.deapi.airesolved in the embeddings route (providerBaseUrlDefaults) and inget-provider-endpoint.ts.get-provider-headers.ts).getValidationModeldeliberately excludes embedding models, so for an embeddings-only provider there is no chat model to validate against and key creation would throwNo suitable validation model found. Added a minimal early-return mirroring the existingcustomprovider — it fires only when every model for the provider is embeddings-only, so chat-capable providers are never affected. deAPI is the first embeddings-only provider in the repo, hence this change.currentColor, themeable) registered in the icon + provider-logo maps.Models
deapi/bge-m3Bge_M3_FP16¹ Derived from deAPI's price-calculation API; the exact configured rate will be confirmed/adjusted before merge.
Test plan
pnpm build— ✅ all core packages typecheckpnpm test:unit— ✅ 73/73 on the models + endpoint-resolution specspnpm format— ✅POST https://oai.deapi.ai/v1/embeddingswith modelBge_M3_FP16→HTTP 200, returns a valid 1024-dimensional embedding vector. ✅I'm happy to adjust naming, pricing, or scope to match your conventions — thanks for maintaining this project.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation