Skip to main content
Xcode includes a coding assistant that can answer questions about your project, write and refactor code, and fix errors. Besides its built-in providers, Xcode accepts any chat provider that supports the Chat Completions API, so you can add Venice in Xcode’s Intelligence settings and use Venice models in coding assistant conversations.

Coding Assistant

Ask questions, generate code, and refactor with Venice models

Direct Connection

Xcode sends requests from your Mac straight to Venice

Privacy Choice

Pick a model with the privacy tier your code needs

Prerequisites

  • A Venice API key from venice.ai/settings/api
  • Xcode 26.3 or later (earlier Xcode 26 releases can lose custom chat providers when Xcode relaunches)
  • macOS Tahoe 26 or later (Xcode 27 requires macOS Tahoe 26.6 or later and an Apple silicon Mac)

Setup

1

Get your Venice API key

Generate a key from venice.ai/settings/api. An Inference Only key is enough for Xcode.Consider creating a dedicated key with an Epoch Consumption Limit, so you can cap what Xcode spends and revoke the key without affecting other apps. See Generating an API Key.
2

Open Intelligence settings

In Xcode, choose Xcode > Settings and select Intelligence in the sidebar.
3

Add Venice as a chat provider

Under Chat, click Add a Chat Provider and select Internet Hosted. Some Xcode 26 releases label the button Add a Model Provider.Enter the following values, then click Add:Keep the URL exactly as shown, with no /v1 and no trailing slash. Xcode appends /v1/models and /v1/chat/completions to it, which produces Venice’s standard endpoints under https://api.venice.ai/api/v1.Xcode sends the API Key field as the entire value of the Authorization header. Replace your-venice-api-key with your key and keep the Bearer prefix.
4

Choose your models

Select the Venice provider under Chat. Xcode fetches the model list from Venice. Turn on the models you want to use, and star the ones you use most so they appear at the top of the model menu.The list includes every Venice text model, but the coding assistant only works with models that support tool calling. Check the model requirements before you choose, or start with z-ai-glm-5-3-flash.
5

Start a conversation

Open a project, then click the Coding Assistant button or press Command-0. Click New Conversation and choose a Venice model under Chat. The placeholder text in the message field shows which model the conversation uses.Send a short prompt to test the connection:

Verify the Setup

Sending the test prompt is the real check. A full model list in Xcode doesn’t prove that your key works, because Venice’s GET /models endpoint returns the catalog with or without a valid key. Venice only checks the key when you send a message. If the prompt fails, verify your API key outside Xcode:
This endpoint requires a valid key, so a 401 here points at the key rather than at Xcode’s configuration. If the key works, compare the provider settings against Troubleshooting.

Model Requirements

The model must support tool calling. In chat conversations, Xcode gives the model tools for searching and editing your project, so a model without tool calling can’t handle the coding assistant’s requests.
The text model catalog lists this capability as Function Calling, and most Venice text models support it. Ideally, the model should also have a context window of 200K tokens or more. Xcode has no context-window setting for chat providers, and with Project Context on, a request can include a lot of project code on top of Xcode’s tool definitions. To list the Venice models that meet both requirements:

Choosing Models

These models meet both requirements: When you compare other models: Venice retires and replaces models regularly. If a model stops working, check Deprecations and switch to a current one.

Agents

Chat providers power chat conversations only. Xcode’s built-in agents, such as Claude Agent and Codex, and any agents you add over the Agent Client Protocol (ACP) are configured separately and don’t send requests through a chat provider. Agents also get more of Xcode’s capabilities than chat does, such as building and testing your app. To run an agent on Venice models with access to your Xcode project, configure a terminal agent for Venice and connect it to the Model Context Protocol (MCP) server that Xcode 26.3 and later provide:
1

Allow external agents

In Xcode’s Intelligence settings, under Model Context Protocol, turn on Allow external agents to use Xcode tools.
2

Set up the agent with Venice

Follow the Codex CLI or Claude Code guide.
3

Connect the agent to Xcode

Register Xcode’s MCP server with the agent:
4

Prompt the agent

Open your project in Xcode first, then prompt the agent in Terminal. Xcode alerts you when the agent connects.

Privacy

Xcode sends chat requests from your Mac directly to Venice. Project Context is on by default in chat conversations, so Xcode includes relevant code and other context from your project in each request. To limit what Xcode sends, turn off Project Context in the message field and reference files and symbols explicitly with @. Venice does not store or log prompt and response content at its proxy. The model you choose determines the runtime privacy tier:
  • Private models use zero-data-retention infrastructure.
  • Anonymized models hide your identity from the upstream provider, but that provider can process your code.
  • TEE models, with e2ee- model IDs, run inside a hardware enclave. Xcode can’t encrypt prompts on your Mac, so these models run in TEE mode rather than end-to-end encrypted mode when you use them from Xcode.
Check each model’s privacy label in the text model catalog and read Venice privacy before sending proprietary code.

Troubleshooting

Confirm that API Key is Bearer followed by a Venice key from venice.ai/settings/api, with no extra spaces. Xcode loads the model list even with a wrong key, because that list is public, so authentication errors only appear when you send a message. Test the key with the command in Verify the Setup.
Check that the URL is exactly https://api.venice.ai/api. A URL ending in /v1 makes Xcode request /api/v1/v1/models, and a trailing slash produces /api//v1/models. Venice returns 404 for both. Add the provider again with the corrected URL.
Check that the conversation uses a model that supports tool calling and, ideally, has a context window of 200K tokens or more. Xcode sends tool definitions and project context with each request: a model without tool calling can’t handle them, and a large project can overflow a smaller context window. Turn on a model that meets the model requirements, then start a new conversation with it.
Venice returns 402 in two cases:
  • The request reached Venice without an Authorization header. Venice ignores other headers, such as x-api-key, and answers with an x402 payment challenge. Set API Key Header to Authorization.
  • The key reached its spend limit, or your balance ran out. See Troubleshooting spend limit errors.
Venice may have retired the model. Check Deprecations, choose a current model from the provider’s model list, and start a new conversation.

Resources

Setting Up Coding Intelligence

Apple’s guide to agents and chat providers in Xcode

Writing Code with Intelligence

Use the coding assistant, project context, and history

Venice Text Models

Browse current model IDs, capabilities, and privacy tiers

Generate an API Key

Create a dedicated key with spend limits