di-sukharev / di-sukharev/opencommit
[Feature]: Replace manual engine adapters with ai-sdk-core
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 445
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Description
I’ve noticed that the engine implementations for different AI providers (like OpenAI, Anthropic, etc.) are being maintained manually in this repo.
This makes it cumbersome to support each third-party API individually. For example:
- Handling the API response from OpenAI manually:
https://github.com/di-sukharev/opencommit/blob/c1756b85aff7804b194d41cc9e5bde32c73fe22f/src/engine/openAi.ts#L58-L62 - Dealing with Anthropic’s error response shapes:
https://github.com/di-sukharev/opencommit/blob/c1756b85aff7804b194d41cc9e5bde32c73fe22f/src/engine/anthropic.ts#L64-L74
This approach will make it harder to keep up with rapidly evolving APIs and newer models being released. The boilerplate can become difficult to maintain at scale.
Suggested Solution
Instead of manually handling each engine and response type, I’d recommend offloading this work to a well-maintained abstraction layer.
AI SDK Core by Vercel is an excellent candidate. It provides:
- A unified interface for calling different LLM providers
- Built-in support for OpenAI, Anthropic, Mistral, Cohere, Fireworks, Groq, etc.
- Stream handling, errors, and provider-specific quirks abstracted away
- Plug-and-play architecture for future provider support
By integrating ai-sdk-core, opencommit could reduce technical debt and improve forward compatibility while maintaining flexibility.
Let me know your thoughts — happy to help if needed!
Alternatives
No response
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the engine implementations in src/engine, especially openAi.ts and anthropic.ts, then review the linked AI SDK Core overview. Trace how provider responses, errors, and streaming are handled today. Done should mean the supported providers use the shared abstraction without losing current functionality or future provider flexibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- ai, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100