BuilderIO / micro-agent

An AI agent that writes (actually useful) code for you
https://www.builder.io/blog/micro-agent
MIT License
2.79k stars 222 forks source link

✖ 404 The model `gpt-4o` does not exist or you do not have access to it. #34

Open bHARATHaALETI018 opened 3 months ago

ike5 commented 3 months ago

To add to your opened issue, here's the error message I received along with it:

✖ 404 The model `gpt-4o` does not exist or you do not have access to it.
    at APIError.generate (file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/node_modules/openai/error.mjs:50:20)
    at OpenAI.makeStatusError (file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/node_modules/openai/core.mjs:268:25)
    at OpenAI.makeRequest (file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/node_modules/openai/core.mjs:311:30)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getFileSuggestion (file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/dist/cli.mjs:904:22)
    at async interactiveMode (file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/dist/cli.mjs:671:33)
    at async file:///Users/ike/.nvm/versions/node/v20.13.1/lib/node_modules/@builder.io/micro-agent/dist/cli.mjs:1663:11

    ai-shell v0.0.48

    Please open a Bug report with the information above:
    https://github.com/BuilderIO/micro-agent/issues/new

■  Canceled
steve8708 commented 3 months ago

oh wow, I thought gpt-4o was avaiable to nearly everyone now

claude's 3.5 sonnet just came out and is likely better and faster (and is cheaper too). I would recommend trying that

create an account with anthropic and add your key using micro-agent config and set claude as your model, either through the config or like

MODEL=claude micro-agent

in our experience, anthropic's models are better than openai's (and faster and cheaper with this latest update), especially for complex tasks and/or coding tasks

sainsw commented 3 months ago

I think you need to be in at least Tier 1 in OpenAI to access gpt-4o via API

Check your tier here: https://platform.openai.com/settings/organization/limits

Documentation on the tiers: https://platform.openai.com/docs/guides/rate-limits/usage-tiers

ike5 commented 3 months ago

limits You're right, it appears that I haven't met their $5 spending quota yet. I believe we can close this issue now.

Sudococommunity commented 3 months ago

how to use ollama in microagent

EzraWolf commented 2 months ago

I am not sure when or why they released tiers, and I haven't spent more than $10 on OpenAI's API, but have tier 3.

What fixed this for me was running micro-agent config set MODEL=gpt-4o with the lowercase gpt-4o