-
Couldn't load subscription status.
- Fork 715
refactor(core): remove non-OpenAI SDK support and upgrade to OpenAI 6.x #1325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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>
…hropic configurations
There was a problem hiding this 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
….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>
No description provided.