[GH-ISSUE #170] 跨协议模型 Fallback 映射不起作用 #131

Closed
opened 2026-02-27 07:18:08 +03:00 by kerem · 8 comments
Owner

Originally created by @adeewu on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/170

配置跨协议模型后完全没效果,不知道是不是我配置的有问题,能否出个示例呢?

{
  "gpt-5.1-codex-max": {
    "targetProviderType": "openai-qwen-oauth",
    "targetModel": "claude-sonnet-4-5"
  }
}
Originally created by @adeewu on GitHub (Jan 6, 2026). Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/170 配置跨协议模型后完全没效果,不知道是不是我配置的有问题,能否出个示例呢? ``` { "gpt-5.1-codex-max": { "targetProviderType": "openai-qwen-oauth", "targetModel": "claude-sonnet-4-5" } } ```
kerem closed this issue 2026-02-27 07:18:09 +03:00
Author
Owner

@ZqinKing commented on GitHub (Jan 6, 2026):

openai-qwen-oauth里有claude-sonnet-4-5吗?应该改成这样

{
    "gpt-5.1-codex-max": {
        "targetProviderType": "claude-kiro-oauth",
        "targetModel": "claude-sonnet-4-5"
      }
}
<!-- gh-comment-id:3713863987 --> @ZqinKing commented on GitHub (Jan 6, 2026): openai-qwen-oauth里有claude-sonnet-4-5吗?应该改成这样 ``` { "gpt-5.1-codex-max": { "targetProviderType": "claude-kiro-oauth", "targetModel": "claude-sonnet-4-5" } } ```
Author
Owner

@ZqinKing commented on GitHub (Jan 6, 2026):

示例配置文件中有跨协议回退的配置样例。反重力和kiro中的claude模型可相互回退。

<!-- gh-comment-id:3713874531 --> @ZqinKing commented on GitHub (Jan 6, 2026): 示例配置文件中有跨协议回退的配置样例。反重力和kiro中的claude模型可相互回退。
Author
Owner

@adeewu commented on GitHub (Jan 6, 2026):

意思是没办法从openai兼容模式回退到qwen吗?

<!-- gh-comment-id:3714630131 --> @adeewu commented on GitHub (Jan 6, 2026): 意思是没办法从openai兼容模式回退到qwen吗?
Author
Owner

@adeewu commented on GitHub (Jan 6, 2026):

配置贴错了,应该是这样的:

{
  "gpt-5.1-codex-max": {
    "targetProviderType": "openai-qwen-oauth",
    "targetModel": "qwen3-coder-plus"
  }
}

预想的过程是:在kilo code通过 http://localhost:3000/v1/messages 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意

<!-- gh-comment-id:3714657580 --> @adeewu commented on GitHub (Jan 6, 2026): 配置贴错了,应该是这样的: ```json { "gpt-5.1-codex-max": { "targetProviderType": "openai-qwen-oauth", "targetModel": "qwen3-coder-plus" } } ``` 预想的过程是:在kilo code通过 **http://localhost:3000/v1/messages** 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意
Author
Owner

@ZqinKing commented on GitHub (Jan 6, 2026):

配置贴错了,应该是这样的:

{
"gpt-5.1-codex-max": {
"targetProviderType": "openai-qwen-oauth",
"targetModel": "qwen3-coder-plus"
}
}
预想的过程是:在kilo code通过 http://localhost:3000/v1/messages 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意

可以啊,gpt凭证不健康的时候就会回退的,如果出错那可能是模型字段不兼容,具体可以看下回退日志。测试可以将gpt凭证中的codex-max模型勾选过滤,应该就可以触发回退。做功能时只是测了反重力和kiro中的claude模型,这两只是渠道不同。

<!-- gh-comment-id:3714778544 --> @ZqinKing commented on GitHub (Jan 6, 2026): > 配置贴错了,应该是这样的: > > { > "gpt-5.1-codex-max": { > "targetProviderType": "openai-qwen-oauth", > "targetModel": "qwen3-coder-plus" > } > } > 预想的过程是:在kilo code通过 **http://localhost:3000/v1/messages** 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意 可以啊,gpt凭证不健康的时候就会回退的,如果出错那可能是模型字段不兼容,具体可以看下回退日志。测试可以将gpt凭证中的codex-max模型勾选过滤,应该就可以触发回退。做功能时只是测了反重力和kiro中的claude模型,这两只是渠道不同。
Author
Owner

@ZqinKing commented on GitHub (Jan 6, 2026):

配置贴错了,应该是这样的:

{
"gpt-5.1-codex-max": {
"targetProviderType": "openai-qwen-oauth",
"targetModel": "qwen3-coder-plus"
}
}
预想的过程是:在kilo code通过 http://localhost:3000/v1/messages 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意

话说,你这个codex模型是咋弄出来的?刚好有个chatgpt的plus订阅号,能挂反代用吗?

<!-- gh-comment-id:3714864709 --> @ZqinKing commented on GitHub (Jan 6, 2026): > 配置贴错了,应该是这样的: > > { > "gpt-5.1-codex-max": { > "targetProviderType": "openai-qwen-oauth", > "targetModel": "qwen3-coder-plus" > } > } > 预想的过程是:在kilo code通过 **http://localhost:3000/v1/messages** 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意 话说,你这个codex模型是咋弄出来的?刚好有个chatgpt的plus订阅号,能挂反代用吗?
Author
Owner

@adeewu commented on GitHub (Jan 7, 2026):

配置贴错了,应该是这样的:
{
"gpt-5.1-codex-max": {
"targetProviderType": "openai-qwen-oauth",
"targetModel": "qwen3-coder-plus"
}
}
预想的过程是:在kilo code通过 http://localhost:3000/v1/messages 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意

话说,你这个codex模型是咋弄出来的?刚好有个chatgpt的plus订阅号,能挂反代用吗?

没弄到codex模型,自己填写的,kilo code的配置可以一直不用变,预想在aiclient2api中降级走modelscope的Qwen/Qwen3-Coder-480B-A35B-Instruct

实际上我没在日志看到回退处理,第一步走gpt-5.1-codex-max就出现500后停下,从代码上看,走的是getApiService,没走getApiServiceWithFallback,觉得是我使用方式有问题

<!-- gh-comment-id:3717206105 --> @adeewu commented on GitHub (Jan 7, 2026): > > 配置贴错了,应该是这样的: > > { > > "gpt-5.1-codex-max": { > > "targetProviderType": "openai-qwen-oauth", > > "targetModel": "qwen3-coder-plus" > > } > > } > > 预想的过程是:在kilo code通过 **http://localhost:3000/v1/messages** 走openai兼容模式使用gpt-5.1-codex-max模型,先消耗modelscope的2000额度,等消耗完,根据跨协议模型回退走qwen code的qwen3-coder-plus模型,这样能走通吗? modelscope其实没有gpt-5.1-codex-max,看过程就好,细节不要太在意 > > 话说,你这个codex模型是咋弄出来的?刚好有个chatgpt的plus订阅号,能挂反代用吗? 没弄到codex模型,自己填写的,kilo code的配置可以一直不用变,预想在aiclient2api中降级走modelscope的`Qwen/Qwen3-Coder-480B-A35B-Instruct` 实际上我没在日志看到回退处理,第一步走gpt-5.1-codex-max就出现500后停下,从代码上看,走的是getApiService,没走getApiServiceWithFallback,觉得是我使用方式有问题
Author
Owner

@justlovemaki commented on GitHub (Jan 8, 2026):

第一步走gpt-5.1-codex-max就出现500,这和fallback就没关系

<!-- gh-comment-id:3722963781 --> @justlovemaki commented on GitHub (Jan 8, 2026): 第一步走gpt-5.1-codex-max就出现500,这和fallback就没关系
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AIClient-2-API-justlovemaki#131
No description provided.