<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4" -->

---
title: Add Azure OpenAI and Foundry models to OpenCode | daily.dev
description: A practical configuration guide for connecting OpenCode (an AI coding assistant) to Azure-hosted models, including Azure OpenAI GPT models, Azure Cognitive...
canonical: https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Add Azure OpenAI and Foundry models to OpenCode | daily.dev
og:description: A practical configuration guide for connecting OpenCode (an AI coding assistant) to Azure-hosted models, including Azure OpenAI GPT models, Azure Cognitive...
og:url: https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4
og:image: https://api.daily.dev/og/posts/LOYzLbAJ4.png
og:image:alt: Add Azure OpenAI and Foundry models to OpenCode
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Azure OpenAI and Foundry models to OpenCode

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 3 min read · 1 upvotes · 0 comments

## Summary

A practical configuration guide for connecting OpenCode (an AI coding assistant) to Azure-hosted models, including Azure OpenAI GPT models, Azure Cognitive Services, and Azure AI Foundry base models like Kimi. The post covers the specific differences in provider configuration: which domain to use (openai.azure.com vs cognitiveservices.azure.com), when to include the /v1 route suffix, and why resourceName must be omitted for Foundry models. It also notes that Codex models require the azure-cognitive-services provider rather than the standard azure or azure-foundry-base-models providers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jan-v.nl/post/2026/add-azure-openai-and-foundry-models-to-opencode/>

---

Tags: [#azure](https://daily.dev/tags/azure), [#azure-openai](https://daily.dev/tags/azure-openai), [#llm](https://daily.dev/tags/llm), [#opencode](https://daily.dev/tags/opencode)

[View this post on daily.dev](https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Add Azure OpenAI and Foundry models to OpenCode","url":"https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4"},"datePublished":"2026-02-28T23:42:36.574Z","dateModified":"2026-06-18T02:16:31.559Z","description":"A practical configuration guide for connecting OpenCode (an AI coding assistant) to Azure-hosted models, including Azure OpenAI GPT models, Azure Cognitive...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5a9766b9b26463811a98cc6a0688f2e0?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5a9766b9b26463811a98cc6a0688f2e0?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"azure,azure-openai,llm,opencode","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Add Azure OpenAI and Foundry models to OpenCode"}]}
```

