Skip to content

feat(providers): add Prism BYOK support - #7797

Open
rajitkhanna wants to merge 2 commits into
simstudioai:stagingfrom
prismhq:feat/prism-provider
Open

feat(providers): add Prism BYOK support#7797
rajitkhanna wants to merge 2 commits into
simstudioai:stagingfrom
prismhq:feat/prism-provider

Conversation

@rajitkhanna

Copy link
Copy Markdown

Summary

  • add Prism as a first-class BYOK-only inference provider
  • expose DeepSeek-V4.1-Flash and DeepSeek-V4-Flash through Prism
  • support streaming reasoning, tool loops, structured outputs, and usage accounting
  • add Prism to provider settings, usage UI, model metadata, and docs

Provider details

  • OpenAI-compatible base URL: https://api.prisminference.com/v1
  • canonical model IDs are forwarded unchanged
  • workspace BYOK keys take precedence over inline keys
  • Prism never falls back to a Sim-hosted or environment API key

Test plan

  • bun run --cwd apps/sim test providers/prism/index.test.ts providers/models.test.ts lib/api-key/byok.test.ts providers/attachments.test.ts ee/organization-usage/components/usage-consumers.test.ts
  • bunx turbo run type-check
  • bun run format:check
  • bun run check:byok-providers
  • bun run check:icon-paths
  • bun run check:icon-path-precision
  • bun run check:bare-icons
  • bun run docs:check
  • bun run agent-stream-docs:check
  • bun run check:api-validation

@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

@rajitkhanna is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because streamed Prism tool executions discard their final tool-result payloads, and the single-consumer utility also violates an explicit repository requirement.

Findings

  1. P1 Streaming drops tool results
  2. P2 Single-consumer utility violates architecture

Summary

  • Registers Prism models and provider metadata without adding them to the hosted model pool.
  • Resolves workspace Prism keys ahead of inline keys and provides no environment or platform fallback.
  • Reuses the shared OpenAI-compatible streaming and tool-loop infrastructure.
  • Adds provider UI, usage attribution, attachment restrictions, documentation, and focused tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Prism model request] --> B{Workspace BYOK key exists?}
  B -->|Yes| C[Use workspace key]
  B -->|No| D{Inline key exists?}
  D -->|Yes| E[Use inline key]
  D -->|No| F[Reject request]
  C --> G[Prism OpenAI-compatible API]
  E --> G
  G --> H{Tools requested?}
  H -->|No| I[Completion or reasoning stream]
  H -->|Yes| J[Shared streaming tool loop]
  J --> K[Execute tools and replay reasoning]
  K --> L[Finalize normalized output]
Loading

Reviews (1) · Last reviewed commit: "feat(providers): add Prism BYOK support"

Comment thread apps/sim/providers/prism/index.ts
Comment thread apps/sim/providers/prism/utils.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant