-
Notifications
You must be signed in to change notification settings - Fork 122
♻️(llm): Migrate from OpenAI to Anthropic API #1242
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
…ate and update related documentation; switch from ChatOpenAI to ChatAnthropic in job prompts for improved integration
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Updates to Preview Branch (replace-to-anthropic-api) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
…ai from package.json
CI Feedback 🧐(Feedback updated until commit f88c375)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
This comment was marked as outdated.
This comment was marked as outdated.
9afddfc
to
097e78e
Compare
f65b44c
to
c83ecb9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
…C_API_KEY; modify prompt configuration and documentation accordingly
c83ecb9
to
f88c375
Compare
» View eval results in CI console « |
This comment was marked as outdated.
This comment was marked as outdated.
…d of direct prompts for improved configuration management Apparently there is a degrade in the new version and the globs passed to `-prompts` are not resolved properly and become empty. - before: https://github.com/liam-hq/liam/actions/runs/14331349081/job/40167883363?pr=1242#step:4:21 - after: https://github.com/liam-hq/liam/actions/runs/14331815812/job/40169382770?pr=1242#step:4:21 - https://github.com/promptfoo/promptfoo-action/blob/6d53c416f2a4fae20a17ae9e300b1db968ad2ecd/src/main.ts#L129
d4be2ef
to
84af65f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
frontend/packages/prompt-test result: View results: https://app.promptfoo.dev/eval/f:46773721-bb17-4ca5-9411-f6db7e9ce07e ✅️ Promptfoo test succeeded
|
This comment was marked as outdated.
This comment was marked as outdated.
…t evaluation consistency
df2b30a
to
c0fd9fd
Compare
» View eval results in CI console « |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
I think migration package can be removed now. In separate issue / PR, we should delete it
"@langchain/core": "0.3.43", | ||
"@langchain/openai": "0.5.4", |
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.
👍
prompt-test package does not follow anthropic API for now 🙏 |
Issue
Why is this change needed?
This change migrates our LLM implementation from OpenAI to Anthropic across the codebase. It updates environment variables, dependencies, and model implementations to use Anthropic's Claude models instead of GPT models.
What would you like reviewers to focus on?
Testing Verification
Tested prompt generation with new Anthropic API and verified outputs match expected format.
What was done
🤖 Generated by PR Agent at 31e3a9c
ChatOpenAI
withChatAnthropic
in multiple files.ANTHROPIC_API_KEY
instead ofOPENAI_API_KEY
.Detailed Changes
3 files
Replaced OpenAI model with Anthropic in docs suggestion generation
Switched from OpenAI to Anthropic for review generation
Migrated schema meta generation to Anthropic API
2 files
Updated environment variable to use Anthropic API key
Replaced OpenAI API key with Anthropic API key in migration prompts
1 files
Updated documentation for Anthropic API key setup
3 files
Removed OpenAI dependencies from app package
Added Anthropic dependency and removed OpenAI dependency
Updated lockfile to reflect dependency changes for Anthropic migration
Additional Notes