Skip to content

Conversation

@quanru
Copy link
Collaborator

@quanru quanru commented Oct 16, 2025

No description provided.

quanru and others added 2 commits October 16, 2025 18:46
This commit removes support for Anthropic SDK and Azure OpenAI, simplifying
the codebase to use only the standard OpenAI SDK with OpenAI-style APIs.

Changes:
- Remove Anthropic SDK (@anthropic-ai/sdk) dependency
- Remove Azure OpenAI specific code and @azure/identity dependency
- Remove langsmith wrapper support
- Remove proxy agent support (https-proxy-agent, socks-proxy-agent)
- Upgrade OpenAI SDK from 4.81.0 to 6.3.0
- Simplify createChatClient function to only create standard OpenAI clients
- Remove 'style' parameter from createChatClient return type
- Remove all Anthropic-specific message handling code
- Add openai 6.3.0 as devDependency to @midscene/shared

Benefits:
- Cleaner, more maintainable codebase
- Reduced dependencies (removed 5 packages)
- All AI providers can now be accessed through OpenAI-compatible APIs

Breaking Changes:
- Anthropic SDK mode no longer supported
- Azure OpenAI specific configuration removed
- MIDSCENE_LANGSMITH_DEBUG no longer supported
- httpAgent/socksProxy removed from createChatClient

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@quanru quanru requested review from Copilot and yuyutaotao October 17, 2025 02:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes Anthropic and Azure OpenAI SDK support and upgrades the OpenAI SDK to 6.x, consolidating all AI calls through the standard OpenAI client.

  • Removes Anthropic/Azure-specific code paths and dependencies
  • Simplifies config parsing and client creation to OpenAI-only
  • Updates docs to reflect OpenAI-only support and removes Azure/Anthropic sections

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/core/src/ai-model/service-caller/index.ts Refactors client creation and call flow to OpenAI-only; removes proxy agents, Azure/Anthropic branches
packages/core/package.json Drops Anthropic/Azure/proxy deps; upgrades openai to 6.3.0
packages/shared/src/env/decide-model-config.ts Simplifies to always return OpenAI config only
packages/shared/src/env/constants.ts Removes Azure/Anthropic keys from model config mapping
packages/shared/src/env/types.ts Removes Azure/Anthropic env keys and interfaces; keeps OpenAI keys
packages/shared/src/env/helper.ts Updates masking to only handle OpenAI fields
packages/shared/package.json Adds openai 6.3.0 as a devDependency for shared types
packages/shared/tests/unit-test/env/helper.test.ts Updates snapshot to match simplified config shape
packages/shared/tests/unit-test/env/decide-sdk.test.ts Removes Azure/Anthropic decision tests; keeps default OpenAI tests
packages/core/tests/ai/connectivity.test.ts Removes .env.anthropic coverage
apps/site/docs/en/model-provider.mdx Removes Azure/Anthropic sections; keeps OpenAI config docs
apps/site/docs/zh/model-provider.mdx Removes Azure/Anthropic sections; keeps OpenAI config docs
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/core/src/ai-model/service-caller/index.ts:1

  • The Qwen-VL specific option vl_high_resolution_images was removed from commonConfig, which may degrade Qwen-VL and Qwen3-VL image handling. Please reintroduce the conditional spread to preserve previous behavior.
import { AIResponseFormat, type AIUsageInfo } from '@/types';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@quanru quanru merged commit 46ffc1d into 1.0 Oct 17, 2025
1 check passed
@quanru quanru deleted the refactor/remove-non-openai-sdk-support branch October 17, 2025 09:43
quanru added a commit that referenced this pull request Oct 23, 2025
….x (#1325)

* refactor(core): remove non-OpenAI SDK support and upgrade to OpenAI 6.x

This commit removes support for Anthropic SDK and Azure OpenAI, simplifying
the codebase to use only the standard OpenAI SDK with OpenAI-style APIs.

Changes:
- Remove Anthropic SDK (@anthropic-ai/sdk) dependency
- Remove Azure OpenAI specific code and @azure/identity dependency
- Remove langsmith wrapper support
- Remove proxy agent support (https-proxy-agent, socks-proxy-agent)
- Upgrade OpenAI SDK from 4.81.0 to 6.3.0
- Simplify createChatClient function to only create standard OpenAI clients
- Remove 'style' parameter from createChatClient return type
- Remove all Anthropic-specific message handling code
- Add openai 6.3.0 as devDependency to @midscene/shared

Benefits:
- Cleaner, more maintainable codebase
- Reduced dependencies (removed 5 packages)
- All AI providers can now be accessed through OpenAI-compatible APIs

Breaking Changes:
- Anthropic SDK mode no longer supported
- Azure OpenAI specific configuration removed
- MIDSCENE_LANGSMITH_DEBUG no longer supported
- httpAgent/socksProxy removed from createChatClient

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(core): model provider documentation and remove Azure and Anthropic configurations

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat(core): add proxy support for OpenAI client with HTTP and SOCKS configurations

* feat(core): add qwen-vl specific configuration for high resolution images

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: yuyutaotao <167746126+yuyutaotao@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants