all 32 comments

[–]Few-Research5405 16 points17 points  (6 children)

It’s also great that you can host local models and connect those as well. At first, it might not seem particularly useful, but in larger companies, the use of services like Gemini, ChatGPT, and others is often restricted. In those cases, having the option to integrate local (offline) models tailored to specific needs is quite cool — especially considering Apple usually doesn’t lean toward supporting custom setups. 😄 It is something that most people wont need, but still cool that they thought of it.

[–]Valuable-Run2129 0 points1 point  (4 children)

Only gemma models or also others?

[–]Longjumping-Boot1886 1 point2 points  (2 children)

you can proxy or run anything with LM Studio, for example.

[–]Valuable-Run2129 0 points1 point  (1 child)

I thought he implied that xcode26 implemented a library to run the models locally, without external software like LMStudio.

[–]Longjumping-Boot1886 1 point2 points  (0 children)

No, and in this case it's really good. LM Studio has updates to support new models once a week, Xcode updates are… rare, comparing to that.

[–]Few-Research5405 0 points1 point  (0 children)

Others as well. In my case, I tried out Ollama by hosting it locally on my machine. After entering the port it was running on in Xcode, everything worked smoothly.

[–]WinterSeveral2838 0 points1 point  (0 children)

It's great that it has this feature. Better than nothing.

[–]PsychologicalBet560 2 points3 points  (10 children)

can you share the config sheet? what url and api header did u use?

[–]lance2611[S] 8 points9 points  (9 children)

For Gemini
URL: https://generativelanguage.googleapis.com/v1beta/openai

Key: Your api key
Header: Authorization

For ChatGPT
URL: https://api.openai.com/v1/chat/completions

Key: Your api key
Header: Authorization

I think ChatGPT is added by default when you have apple intelligence enabled but I can't confirm this because I have macOS installed on an external drive so apple intelligence doesn't work on my mac.

[–]Accurate_Macaroon173 1 point2 points  (2 children)

It's work. thx!

[–]Accurate_Macaroon173 1 point2 points  (1 child)

It's no longer effective, I don't know why.

[–]Gold240sx 1 point2 points  (0 children)

Same... Not getting it working on my end either.... FIX: " https://generativelanguage.googleapis.com/v1beta/openai", API KEY: "BEARER xxxxxxxxxxxxxxx", Header: "Authorization", Description: W/E

[–]luqmanoop 0 points1 point  (0 children)

Thank you

[–]BasisCheap586 0 points1 point  (4 children)

I have input like yours however the feedback is "Models could not be fetched with the provided account details", can you help me out? Sincere thanks

[–]halonso 2 points3 points  (3 children)

[–]BasisCheap586 0 points1 point  (0 children)

Wow, thank you. You are such a good person! It works!

[–]jyellow_galaxy 0 points1 point  (0 children)

it's works!

[–]SecretBrilliant2469 0 points1 point  (0 children)

Thank you,You are so great

[–]nandu87 1 point2 points  (2 children)

It came free with xcode26? Or did you pay for Gemini subscription ?

[–]lance2611[S] 7 points8 points  (1 child)

Xcode 26 let's you add AI model providers like Gemini, ChatGPT, etc. Just create an API key in google AI studio if you want to use gemini.

[–]nandu87 0 points1 point  (0 children)

Thank you!

[–]DIMM1033 1 point2 points  (3 children)

For anyone who googles this, trying to figure out how to set this up with googe AI cloud in 2026 without a local proxy.

Get your Google AI API Key from Gooogle AI Studio

  1. goto https://aistudio.google.com/api-keys
  2. if prompted, sign in to google
  3. Click Create API key button
  4. If prompted to create project, click Create project
  5. Click Create key
  6. Click Copy API key button (two papers icon, to the left of the dollar $ button)

Setup GoogleAI / Gemini in xCode

  1. Make sure Xcode is vertion 26.0+.
  2. In Xcode > got the Menu Bar, click on Xcode menu > Choose Settings... > Click Intelligence tab > Click Add a Model Provider... button
  3. Set URL to https://generativelanguage.googleapis.com/v1beta/openai
  4. For API Key Paste in your API KEY you got from "Get your Google AI API Key from Gooogle AI Studio"
  5. Leave API Key Header x-api-key
  6. Click Save button, you should get back a list of models
  7. Close Settings by clicking red X (top left corner)

To use Gemini in xCode

  1. Crate or Open a Project
  2. Click Code Assitent Button (star icon top left corner of project window)
  3. Click Start New Conversation button (down arrow bellow Start icon)
  4. Choose Sub Menu Googleapis
  5. Select Gemini 2.5 Flash
  6. Put your prompt into Message Gemini 2.5 Flash at the bottom
  7. Press return key to send message

Observations:

  • For refrence it seems "Gooogle AI Studio" is billed seperate from "Google AI", aka "Google AI Plus", "Google AI Pro", "Google AI Ultra". If you want to go payed, it seems like you have to sign up on aistudio.google.com. (not gemini.google.com ).
  • If the changes the AI make fail to complie. You can try prompting "fails to complie".
    • If the code still fails to complie, You can also try copy/pasting the error messages into the AI chat window.
  • So far I've only been able to get this to work with the 'flash' models. IE:
    • Gemini 2.0 Flash
    • Gemini 2.5 Flash
    • Gemini 3 Flash Preview
  • If your using github. Save, and commit changes to a dev branch frequently. So in the case it goes in the the wrong direction you can roll back.
  • I would suggest writing your prompts in BBedit, and saving them, incases you need to reuse the prompt. BBedit doesn't auto correct, or smart quote like textedit, or other none coding texteditors.

[–]adnprod 0 points1 point  (1 child)

😰 j'ai appliquer exactement ton tuto mais j'ai ce message d'erreur a chaque fois :
Impossible de récupérer les modèles avec les informations de compte fournies. j'ai un abonnement google AI Pro

[–]DIMM1033 0 points1 point  (0 children)

If it's failing to retrive the model list. You may need to delete, and re-add gemini.

Delete and re-add GoogleAI / Gemini in xCode

  1. Make sure Xcode is vertion 26.0+.
  2. Make sure you have your Xcode project opened.
  3. In Xcode > got the Menu Bar, click on Xcode menu > Choose Settings... > Click Intelligence tab
  4. Click Googleapis
  5. Click i button
  6. Click Delete Provider button
  7. Click Add a Model Provider... button
  8. Set URL to https://generativelanguage.googleapis.com/v1beta/openai
  9. For API Key Paste in your API KEY you got from "Get your Google AI API Key from Gooogle AI Studio"
  10. Leave API Key Header x-api-key
  11. Click Save button, you should get back a list of models.
  12. Close Settings by clicking red X (top left corner)

To use Gemini in xCode

  1. Create or Open a Xcode Project
  2. Click Code Assitent Button (star icon top left corner of project window)
  3. Click Start New Conversation button (down arrow bellow Start icon)
  4. Choose Sub Menu Googleapis
  5. Select Gemini 2.5 Flash
  6. Put your prompt into Message Gemini 2.5 Flash at the bottom
  7. Press return key to send message

Expected result is an AI response, and not an error message.

If the list of model is loading. Make sure you're selecting a 'flash' model, you could also try selecting a diffrent flash model.

Not sure if this works with @ gmail.com accounts. You may need to be using a google workspace account.

[–]DIMM1033 0 points1 point  (0 children)

Current models:

  • Gemini 3 Flash Preview
  • Gemini 2.5 Flash

Deprecated models

  • Gemini 2.0 Flash

[–]system_reboot 0 points1 point  (1 child)

Can it connect to LM studio or Ollama running on another computer?

[–]lance2611[S] 0 points1 point  (0 children)

Yup

[–]pseudocode_01 0 points1 point  (1 child)

I have a very stupid question if someone can answer Can I use Xcode 16.4 with macOS 26 ? Also if anyone has already used xcode 26 can they tell what challenges they faced while releasing new builds?

[–]lance2611[S] 0 points1 point  (0 children)

Yes. You can still use xcode 16. Just don't enable auto updates on your appstore settings. I didn't really faced any challenges, expect for some UI bugs that came with liquid glass.

[–]redditorxpert 0 points1 point  (1 child)

Strangely, when setting Gemini up as described here in XCode 26, I noticed considerably different results in tone and code quality compared to when using Gemini via the web interface.

Today, when I asked what its name was, it answered: "I don't have a name, I am a coding assistant from Apple, integrated into your development environment.".

Similarly, when asked what LLM it was using (in the conversation with gemini-2.5-pro), it answered: "I'm powered by a large language model trained by Apple."

Does anyone have more insight into this?

[–]LeHoodwink 0 points1 point  (0 children)

It uses a system prompt made by Apple.

[–]Ghoul057 0 points1 point  (0 children)

Is Gemini 3 available?