How to Use Google Gemini in Xcode 26 Beta
Google offers an OpenAI-compatible API for Gemini, and while working, it is not what Xcode expects in terms of URL layout. In Xcode’s LLM provider config, the custom “URL” parameter is the API’s base URL up to but not including the
v1/
path segment, e.g.https://api.openai.com/
instead of the fullhttps://api.openai.com/v1/
. When making calls to the provider later on, Xcode will automatically append the endpoint path (e.g.v1/models
etc.) to that URL.Now, the Gemini URL structure breaks with the
v1/
convention: its URL ishttps://generativelanguage.googleapis.com/v1beta/openai/
instead ofhttps://generativelanguage.googleapis.com/v1/
. You can see why this might be a problem.So here’s how to set up both Xcode and a proxy app to use Google’s offerings.
Previously: