release v1.0.31 to support anthropic endpoint provider

This commit is contained in:
musistudio
2025-08-01 22:10:14 +08:00
parent 5a11d2f9af
commit a3d1f44908
7 changed files with 21 additions and 23 deletions

View File

@@ -258,6 +258,7 @@ Transformers allow you to modify the request and response payloads to ensure com
**Available Built-in Transformers:**
- `Anthropic`:If you use only the `Anthropic` transformer, it will preserve the original request and response parameters(you can use it to connect directly to an Anthropic endpoint).
- `deepseek`: Adapts requests/responses for DeepSeek API.
- `gemini`: Adapts requests/responses for Gemini API.
- `openrouter`: Adapts requests/responses for OpenRouter API.
@@ -423,13 +424,8 @@ If you find this project helpful, please consider sponsoring its development. Yo
A huge thank you to all our sponsors for their generous support!
<table>
<tr>
<td><a href="https://aihubmix.com/" target="_blank"><img src="/blog/images/sponsors/aihubmix.png" width="100" alt="aihubmix" /></a></td>
</tr>
</table>
- [AIHubmix](https://aihubmix.com/)
- @Simon Leischnig
- [@duanshuaimin](https://github.com/duanshuaimin)
- [@vrgitadmin](https://github.com/vrgitadmin)
@@ -470,6 +466,9 @@ A huge thank you to all our sponsors for their generous support!
- @*鑫
- @c\*y
- @\*昕
- [@witsice](https://github.com/witsice)
- @b\*g
- @\*亿
(If your name is masked, please contact me via my homepage email to update it with your GitHub username.)

View File

@@ -252,6 +252,7 @@ Transformers 允许您修改请求和响应负载,以确保与不同提供商
**可用的内置 Transformer**
- `Anthropic`: 如果你只使用这一个转换器,则会直接透传请求和响应(你可以用它来接入其他支持Anthropic端点的服务商)。
- `deepseek`: 适配 DeepSeek API 的请求/响应。
- `gemini`: 适配 Gemini API 的请求/响应。
- `openrouter`: 适配 OpenRouter API 的请求/响应。
@@ -418,12 +419,7 @@ jobs:
非常感谢所有赞助商的慷慨支持!
<table>
<tr>
<td><a href="https://aihubmix.com/" target="_blank"><img src="/blog/images/sponsors/aihubmix.png" width="100" alt="aihubmix" /></a></td>
</tr>
</table>
- [AIHubmix](https://aihubmix.com/)
- @Simon Leischnig
- [@duanshuaimin](https://github.com/duanshuaimin)
- [@vrgitadmin](https://github.com/vrgitadmin)
@@ -463,6 +459,9 @@ jobs:
- @*鑫
- @c\*y
- @\*昕
- [@witsice](https://github.com/witsice)
- @b\*g
- @\*亿
(如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -20,7 +20,7 @@
"license": "MIT",
"dependencies": {
"@fastify/static": "^8.2.0",
"@musistudio/llms": "^1.0.16",
"@musistudio/llms": "^1.0.17",
"dotenv": "^16.4.7",
"json5": "^2.2.3",
"openurl": "^1.1.1",

10
pnpm-lock.yaml generated
View File

@@ -12,8 +12,8 @@ importers:
specifier: ^8.2.0
version: 8.2.0
'@musistudio/llms':
specifier: ^1.0.16
version: 1.0.16(ws@8.18.3)(zod@3.25.67)
specifier: ^1.0.17
version: 1.0.17(ws@8.18.3)(zod@3.25.67)
dotenv:
specifier: ^16.4.7
version: 16.6.1
@@ -257,8 +257,8 @@ packages:
resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==}
engines: {node: '>=8'}
'@musistudio/llms@1.0.16':
resolution: {integrity: sha512-7OUGvvi4etpiptUoxtlu41t9vlP7q/F73iBKVRTE7Of3LpDKOKumAK0dCKZ12u35i2RVeSzmUEJHrMyhhY+z1Q==}
'@musistudio/llms@1.0.17':
resolution: {integrity: sha512-aoUxO3Bw3IVppQCcm1FQeJ7qXrYrbs/kHmq85qYSF7K4OCc8G6rrGtmfqbjdbMYoSveXc+toxJ2kThel1iqA0Q==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
@@ -1102,7 +1102,7 @@ snapshots:
'@lukeed/ms@2.0.2': {}
'@musistudio/llms@1.0.16(ws@8.18.3)(zod@3.25.67)':
'@musistudio/llms@1.0.17(ws@8.18.3)(zod@3.25.67)':
dependencies:
'@anthropic-ai/sdk': 0.54.0
'@fastify/cors': 11.0.1

View File

@@ -427,7 +427,7 @@ export function Providers() {
{hasFetchedModels[editingProviderIndex] ? (
<ComboInput
ref={comboInputRef}
options={(editingProvider.models || []).map(model => ({ label: model, value: model }))}
options={(editingProvider.models || []).map((model: string) => ({ label: model, value: model }))}
value=""
onChange={() => {
// 只更新输入值,不添加模型
@@ -484,7 +484,7 @@ export function Providers() {
</Button> */}
</div>
<div className="flex flex-wrap gap-2 pt-2">
{(editingProvider.models || []).map((model, modelIndex) => (
{(editingProvider.models || []).map((model: string, modelIndex: number) => (
<Badge key={modelIndex} variant="outline" className="font-normal flex items-center gap-1">
{model}
<button
@@ -653,7 +653,7 @@ export function Providers() {
<div className="space-y-2">
<Label>{t("providers.model_transformers")}</Label>
<div className="space-y-3">
{(editingProvider.models || []).map((model, modelIndex) => (
{(editingProvider.models || []).map((model: string, modelIndex: number) => (
<div key={modelIndex} className="border rounded-md p-3">
<div className="font-medium text-sm mb-2">{model}</div>
{/* Add new transformer */}

View File

@@ -12,8 +12,8 @@
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {