Tried using Gemini and Groq but still asking for Openai credits

I tried creating an agent using both Gemini aistudio and Groq but both are giving me the same Openai error

openai.NotFoundError: Error code: 404 - {‘error’: {‘message’: ‘The model gpt-4o does not exist or you do not have access to it.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘model_not_found’}}

Hey @xbhinav can you run pip install -U phidata in your terminal? We recently fixed this issue

above is the link of my post

i am also getting the same error i updated the library but the issue isnt solved
i pip install -U phidata i have (2.7.6) version but the error isnt solved

the reason you are getting open ai error would be because of two reason

  1. you are using memory and vector dbs
  2. you are not passing your google api key correctly

in your case it looks like there might be problem with how you are passing the api key ill suggest some tips try that
in terminal enter this (setx GOOGLE_API_KEY your private key)
or go to your environment variable and there create new user variable with variable name as (GOOGLE_API_KEY) and in variable value put your api key

use setx GOOGLE_API_KEY <API>

or use this conventoin using python-dotenv library

from dotenv import load_dotenv
load_dotenv()

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
GOOGLE_ENGINE_ID = os.getenv("GOOGLE_ENGINE_ID")

and make sure you restart your terminal after running the setx.