ai-shell icon indicating copy to clipboard operation
ai-shell copied to clipboard

OpenRouter support with Google models

Open empz opened this issue 6 months ago • 1 comments

It's already possible to set OpenRouter as an endpoint, but it's not possible to select the model.

Doing ai config and selecting Model throws an error:

✖ Cannot read properties of undefined (reading 'value')
    at LD.changeValue (file:///home/empz/.bun/install/global/node_modules/@clack/core/dist/index.mjs:14:4846)
    at new LD (file:///home/empz/.bun/install/global/node_modules/@clack/core/dist/index.mjs:14:4514)
    at Module.ve (file:///home/empz/.bun/install/global/node_modules/@clack/prompts/dist/index.mjs:22:294)
    at showConfigUI (file:///home/empz/.bun/install/global/node_modules/@builder.io/ai-shell/dist/cli.mjs:1470:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async file:///home/empz/.bun/install/global/node_modules/@builder.io/ai-shell/dist/cli.mjs:1512:9

    ai-shell v1.0.12

I then tried

ai config set MODEL=google/gemini-2.0-flash-001

And it seemed to work, but the responses seems incomplete.

Running ai -s list all files in cwd in bash returns:

┌  AI Shell
│
◇  Your script:

 -l

•
│
◆  Run this script?
│  ● ✅ Yes (Lets go!)
│  ○ 📝 Edit
│  ○ 🔁 Revise
│  ○ 📋 Copy
│  ○ ❌ Cancel

empz avatar May 29 '25 21:05 empz

me too,has it gotten solved?

dongweiq avatar Jul 15 '25 08:07 dongweiq