Feature Request: Support Gemini via OpenAI compatible API on OpenAI MCP client
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
Research direction
Start with index.js and the mcpx.chatCompletionCreate call from the OpenAI MCP client example, then compare the requested Gemini baseURL and model settings with the error shown in the issue. Reproduce the request using Gemini's OpenAI-compatible API and determine what must change for a successful completion; done means Gemini requests work through the client.
Written by the indexing model from the issue text.
Description
-
So recently Gemini made their API compatible with OpenAI library. More details: https://ai.google.dev/gemini-api/docs/openai#node.js
-
Ideally it just requires changing the model and baseURL. I tried making the following changes in index.js from example code at https://docs.mcp.run/tutorials/mcpx-openai-node/
// change baseURL after exporting gemini key instead
// const openai = new OpenAI({ apiKey: OPENAI_API_KEY });
const openai = new OpenAI({
apiKey: OPENAI_API_KEY,
baseURL: "https://generativelanguage.googleapis.com/v1beta/openai/"
});
// change the model
let response = await mcpx.chatCompletionCreate({
model: "gemini-1.5-flash", // Select your preferred model
temperature: 0,
messages,
});
- but seem to be getting the following error.
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from dylibso/mcpx-openai-node
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
dylibso/mcpx-openai-node#3 · 2 comments ·
All issues in dylibso/mcpx-openai-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
keptinventory/kept#336 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
hemi-earn
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vetro-protocol/vetro-monorepo#1013 ·
Maintainers usually reply within 1 day