Skip to content

18 feature add anthropic response api support (#19) - #22

Closed
chengzi404-hash wants to merge 1 commit into
masterfrom
dev
Closed

18 feature add anthropic response api support (#19)#22
chengzi404-hash wants to merge 1 commit into
masterfrom
dev

Conversation

@chengzi404-hash

Copy link
Copy Markdown
Collaborator
  • feat: 底部工具栏显示待办清单(横线分隔)

  • ruff: reformatted

  • Update README.md

  • fix: 修复了 build_exe 和对应的测试

  • Clarify branch merging process in CONTRIBUTING.md

Updated contribution guidelines to specify merging into the 'dev' branch instead of 'master'.

  • feat: provider 必须标明 type,支持 Anthropic 与 OpenAI Responses API
  • Provider 新增 type 字段(openai/responses/anthropic),JSON 解析缺失或非法 type 时拒绝该 provider;Config.validate() 在活动 provider 被拒时给出明确 type 错误。
  • use_preset() 把 type 写入生成的 provider 配置。
  • stream_completion 按 provider.type 分发到三个后端:
    • openai: 原有 chat.completions.create 路径
    • responses: OpenAI SDK 的 responses 接口(system -> instructions,工具结果转 function_call_output)
    • anthropic: anthropic SDK 的 messages.stream(system 独立参数,必填 max_tokens)
  • 统一 usage 归一化为 prompt_tokens/completion_tokens/total_tokens,ChatClient 透明累加。
  • 现有 /openai 兼容预设(DeepSeek/GLM/Kimi/Qwen/MiniMax 等)补齐 type=openai;新增 anthropic 预设。
  • requirements.txt 增加 anthropic 依赖。
  • 配套测试:test_provider.py(type 解析/拒绝/use_preset 持久化/validate)、test_client.py(make_client 分发 + 三个后端的流事件解析)、test_ui.py(_setup_providers/_setup_preset 补 type 字段)。
  • docs: README 增补 provider.type 与 Anthropic/Responses API 说明

在「多供应商与模型」章节加入 type 字段说明表(openai/responses/anthropic 三个取值对应的底层传输),并补 Anthropic provider 配置示例。

* feat: 底部工具栏显示待办清单(横线分隔)

* ruff: reformatted

* Update README.md

* fix: 修复了 `build_exe` 和对应的测试

* Clarify branch merging process in CONTRIBUTING.md

Updated contribution guidelines to specify merging into the 'dev' branch instead of 'master'.

* feat: provider 必须标明 type,支持 Anthropic 与 OpenAI Responses API

- Provider 新增 type 字段(openai/responses/anthropic),JSON 解析缺失或非法 type 时拒绝该 provider;Config.validate() 在活动 provider 被拒时给出明确 type 错误。
- use_preset() 把 type 写入生成的 provider 配置。
- stream_completion 按 provider.type 分发到三个后端:
  - openai: 原有 chat.completions.create 路径
  - responses: OpenAI SDK 的 responses 接口(system -> instructions,工具结果转 function_call_output)
  - anthropic: anthropic SDK 的 messages.stream(system 独立参数,必填 max_tokens)
- 统一 usage 归一化为 prompt_tokens/completion_tokens/total_tokens,ChatClient 透明累加。
- 现有 /openai 兼容预设(DeepSeek/GLM/Kimi/Qwen/MiniMax 等)补齐 type=openai;新增 anthropic 预设。
- requirements.txt 增加 anthropic 依赖。
- 配套测试:test_provider.py(type 解析/拒绝/use_preset 持久化/validate)、test_client.py(make_client 分发 + 三个后端的流事件解析)、test_ui.py(_setup_providers/_setup_preset 补 type 字段)。

* docs: README 增补 provider.type 与 Anthropic/Responses API 说明

在「多供应商与模型」章节加入 type 字段说明表(openai/responses/anthropic 三个取值对应的底层传输),并补 Anthropic provider 配置示例。
@github-actions github-actions Bot added the enhancement New feature or request label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant