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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

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

10
pnpm-lock.yaml generated
View File

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

View File

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

View File

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