Skip to content

Add @promptunit/sdk — drop-in OpenAI client with automatic model routing#144

Open
scorpion4ik26-lang wants to merge 2 commits into
reorx:masterfrom
scorpion4ik26-lang:add-promptunit-sdk
Open

Add @promptunit/sdk — drop-in OpenAI client with automatic model routing#144
scorpion4ik26-lang wants to merge 2 commits into
reorx:masterfrom
scorpion4ik26-lang:add-promptunit-sdk

Conversation

@scorpion4ik26-lang
Copy link
Copy Markdown

Add @promptunit/sdk to Development > Tools.

A drop-in OpenAI client for Node.js/TypeScript that proxies calls through a routing engine, automatically selecting cheaper models (GPT-4o-mini, Claude Haiku, Gemini Flash) based on task complexity. Built-in fallback to OpenAI if the proxy is unreachable. 40-70% cost reduction, zero code changes required.

  • npm: npm install @promptunit/sdk
  • License: MIT
  • Works with any existing OpenAI API call

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the @promptunit/sdk to the README.md file, describing it as a cost-effective OpenAI client for Node.js/TypeScript. The reviewer suggested also updating the Chinese documentation (README.cn.md) with a provided translation to maintain consistency across languages.

Comment thread README.md
Comment on lines +508 to +510
- [@promptunit/sdk](https://github.com/promptunit/sdk)

A drop-in OpenAI client for Node.js/TypeScript that proxies calls through PromptUnit's routing engine, automatically selecting cheaper models with built-in failover. 40-70% cost reduction with zero code changes in your application.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The repository includes a Chinese version of the documentation (README.cn.md), which is currently out of sync with this change. Please add the corresponding entry to README.cn.md to ensure consistency for Chinese-speaking users.

Suggested translation for README.cn.md:

  • @promptunit/sdk

    一个适用于 Node.js/TypeScript 的无缝替换 OpenAI 客户端,通过 PromptUnit 的路由引擎代理调用,自动选择更便宜的模型并内置故障转移机制。在无需更改代码的情况下可降低 40-70% 的成本。

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