From 4abac2a43127830fd6165c743f9359d88d96ce21 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 8 Jun 2026 13:23:59 +0200 Subject: [PATCH 01/11] feat(opencode): added oauth to azure through MS Entra ID and az cli --- packages/opencode/src/plugin/azure.ts | 139 +++++++++++++++++++-- packages/opencode/src/plugin/index.ts | 3 +- packages/opencode/src/provider/provider.ts | 11 +- 3 files changed, 139 insertions(+), 14 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index 62792b3bd27b..9489a6640abf 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -1,26 +1,143 @@ import type { Hooks, PluginInput } from "@opencode-ai/plugin" +import { OAUTH_DUMMY_KEY } from "../auth" +import { InstallationVersion } from "@opencode-ai/core/installation/version" + +const AZURE_SCOPE = "https://cognitiveservices.azure.com" +const AZURE_TOKEN_REFRESH_BUFFER = 60_000 export async function AzureAuthPlugin(_input: PluginInput): Promise { - const prompts = [] - if (!process.env.AZURE_RESOURCE_NAME) { - prompts.push({ - type: "text" as const, - key: "resourceName", - message: "Enter Azure Resource Name", - placeholder: "e.g. my-models", - }) - } + return azureAuthPlugin({ + provider: "azure", + resourceEnv: "AZURE_RESOURCE_NAME", + prompts: process.env.AZURE_RESOURCE_NAME + ? [] + : [ + { + type: "text" as const, + key: "resourceName", + message: "Enter Azure Resource Name", + placeholder: "e.g. my-models", + }, + ], + providerOptions: (resourceName) => ({ resourceName }), + }) +} + +export async function AzureCognitiveServicesAuthPlugin(_input: PluginInput): Promise { + return azureAuthPlugin({ + provider: "azure-cognitive-services", + resourceEnv: "AZURE_COGNITIVE_SERVICES_RESOURCE_NAME", + prompts: process.env.AZURE_COGNITIVE_SERVICES_RESOURCE_NAME + ? [] + : [ + { + type: "text" as const, + key: "resourceName", + message: "Enter Azure Cognitive Services Resource Name", + placeholder: "e.g. my-models", + }, + ], + providerOptions: (resourceName) => ({ baseURL: `https://${resourceName}.cognitiveservices.azure.com/openai` }), + }) +} +function azureAuthPlugin(input: { + provider: string + resourceEnv: string + prompts: NonNullable["methods"][number]["prompts"] + providerOptions: (resourceName: string) => Record +}): Hooks { return { auth: { - provider: "azure", + provider: input.provider, + async loader(getAuth) { + const auth = await getAuth() + if (auth.type !== "oauth") return {} + + const resourceName = process.env[input.resourceEnv] || auth.accountId + const tokenProvider = azureCliTokenProvider() + + return { + ...((resourceName && input.providerOptions(resourceName)) ?? {}), + apiKey: OAUTH_DUMMY_KEY, + async fetch(requestInput: RequestInfo | URL, init?: RequestInit) { + const currentAuth = await getAuth() + if (currentAuth.type !== "oauth") return fetch(requestInput, init) + + const headers = new Headers(requestInput instanceof Request ? requestInput.headers : undefined) + if (init?.headers) { + const entries = + init.headers instanceof Headers + ? init.headers.entries() + : Array.isArray(init.headers) + ? init.headers + : Object.entries(init.headers as Record) + for (const [key, value] of entries) { + if (value !== undefined) headers.set(key, String(value)) + } + } + headers.delete("api-key") + headers.set("authorization", `Bearer ${await tokenProvider()}`) + headers.set("User-Agent", `opencode/${InstallationVersion}`) + + return fetch(requestInput, { ...init, headers }) + }, + } + }, methods: [ { type: "api", label: "API key", - prompts, + prompts: input.prompts, + }, + { + type: "oauth", + label: "Microsoft Entra ID (OAuth via az login)", + prompts: input.prompts, + authorize: async (inputs) => ({ + url: "https://learn.microsoft.com/azure/developer/ai/keyless-connections", + instructions: + "Sign in with `az login`. The signed-in Azure identity must have the Cognitive Services OpenAI User role for this resource.", + method: "auto" as const, + callback: async () => ({ + type: "success" as const, + access: OAUTH_DUMMY_KEY, + refresh: OAUTH_DUMMY_KEY, + expires: Date.now() + 365 * 24 * 60 * 60 * 1000, + accountId: inputs?.resourceName || process.env[input.resourceEnv], + }), + }), }, ], }, } } + +function azureCliTokenProvider() { + let cached: { token: string; expires: number } | undefined + return async () => { + if (cached && cached.expires - Date.now() > AZURE_TOKEN_REFRESH_BUFFER) return cached.token + + const proc = Bun.spawn( + ["az", "account", "get-access-token", "--resource", AZURE_SCOPE, "--output", "json"], + { stdout: "pipe", stderr: "pipe" }, + ) + const [stdout, stderr, exitCode] = await Promise.all([ + new Response(proc.stdout).text(), + new Response(proc.stderr).text(), + proc.exited, + ]) + if (exitCode !== 0) { + throw new Error(stderr.trim() || "Failed to get Azure access token. Run `az login` and try again.") + } + + const result = JSON.parse(stdout) as { accessToken?: string; expiresOn?: string } + if (!result.accessToken) throw new Error("Azure CLI did not return an access token") + + cached = { + token: result.accessToken, + expires: result.expiresOn ? new Date(result.expiresOn).getTime() : Date.now() + 30 * 60 * 1000, + } + return cached.token + } +} diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index 478114209207..905fac9acb3a 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -16,7 +16,7 @@ import { CopilotAuthPlugin } from "./github-copilot/copilot" import { gitlabAuthPlugin as GitlabAuthPlugin } from "opencode-gitlab-auth" import { PoeAuthPlugin } from "opencode-poe-auth" import { CloudflareAIGatewayAuthPlugin, CloudflareWorkersAuthPlugin } from "./cloudflare" -import { AzureAuthPlugin } from "./azure" +import { AzureAuthPlugin, AzureCognitiveServicesAuthPlugin } from "./azure" import { DigitalOceanAuthPlugin } from "./digitalocean" import { XaiAuthPlugin } from "./xai" import { Effect, Layer, Context } from "effect" @@ -76,6 +76,7 @@ function internalPlugins(flags: RuntimeFlags.Info): PluginInstance[] { CloudflareWorkersAuthPlugin, CloudflareAIGatewayAuthPlugin, AzureAuthPlugin, + AzureCognitiveServicesAuthPlugin, DigitalOceanAuthPlugin, XaiAuthPlugin, ] diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 85a582e47d5c..f6dcef7c3bb7 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -234,6 +234,7 @@ function custom(dep: CustomDep): Record { return [ provider.options?.resourceName, auth?.type === "api" ? auth.metadata?.resourceName : undefined, + auth?.type === "oauth" ? auth.accountId : undefined, env["AZURE_RESOURCE_NAME"], ].find((name) => typeof name === "string" && name.trim() !== "") }) @@ -267,8 +268,14 @@ function custom(dep: CustomDep): Record { }, } }), - "azure-cognitive-services": Effect.fnUntraced(function* () { - const resourceName = yield* dep.get("AZURE_COGNITIVE_SERVICES_RESOURCE_NAME") + "azure-cognitive-services": Effect.fnUntraced(function* (provider: Info) { + const env = yield* dep.env() + const auth = yield* dep.auth(provider.id) + const resourceName = [ + auth?.type === "api" ? auth.metadata?.resourceName : undefined, + auth?.type === "oauth" ? auth.accountId : undefined, + env["AZURE_COGNITIVE_SERVICES_RESOURCE_NAME"], + ].find((name) => typeof name === "string" && name.trim() !== "") return { autoload: false, async getModel(sdk: any, modelID: string, options?: Record) { From d862d02d0edb1e4b9d81a469737e62f2a252a940 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 8 Jun 2026 13:24:28 +0200 Subject: [PATCH 02/11] docs: added more docs on new methods to connect azure and az cognitive --- .../web/src/content/docs/ar/providers.mdx | 60 ++++++---- .../web/src/content/docs/bs/providers.mdx | 104 +++++++++++------- .../web/src/content/docs/da/providers.mdx | 60 ++++++---- .../web/src/content/docs/de/providers.mdx | 64 +++++++---- .../web/src/content/docs/es/providers.mdx | 46 ++++++-- .../web/src/content/docs/fr/providers.mdx | 64 +++++++---- .../web/src/content/docs/it/providers.mdx | 56 +++++++--- .../web/src/content/docs/ja/providers.mdx | 76 ++++++++----- .../web/src/content/docs/ko/providers.mdx | 64 +++++++---- .../web/src/content/docs/nb/providers.mdx | 56 +++++++--- .../web/src/content/docs/pl/providers.mdx | 56 +++++++--- packages/web/src/content/docs/providers.mdx | 46 ++++++-- .../web/src/content/docs/pt-br/providers.mdx | 52 ++++++--- .../web/src/content/docs/ru/providers.mdx | 58 ++++++---- .../web/src/content/docs/th/providers.mdx | 46 ++++++-- .../web/src/content/docs/tr/providers.mdx | 46 ++++++-- .../web/src/content/docs/zh-cn/providers.mdx | 64 +++++++---- .../web/src/content/docs/zh-tw/providers.mdx | 64 +++++++---- 18 files changed, 738 insertions(+), 344 deletions(-) diff --git a/packages/web/src/content/docs/ar/providers.mdx b/packages/web/src/content/docs/ar/providers.mdx index c4812fe5d5ee..ddd1af9fa0a6 100644 --- a/packages/web/src/content/docs/ar/providers.mdx +++ b/packages/web/src/content/docs/ar/providers.mdx @@ -360,17 +360,15 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص ### Azure OpenAI :::note -إذا واجهت أخطاء "I'm sorry, but I cannot assist with that request"، فجرّب تغيير مرشح المحتوى من **DefaultV2** إلى **Default** في مورد Azure الخاص بك. +إذا واجهت أخطاء مثل "أنا آسف، لكن لا يمكنني المساعدة في هذا الطلب"، فجرّب تغيير عامل تصفية المحتوى من **DefaultV2** إلى **Default** في مورد Azure الخاص بك. ::: -1. توجّه إلى [Azure portal](https://portal.azure.com/) وأنشئ موردا من نوع **Azure OpenAI**. ستحتاج إلى: - - **Resource name**: يصبح جزءا من نقطة نهاية API لديك (`https://RESOURCE_NAME.openai.azure.com/`) - - **API key**: إما `KEY 1` أو `KEY 2` من موردك +1. انتقل إلى [مدخل Azure](https://portal.azure.com/) وأنشئ مورد **Azure OpenAI**. ستحتاج إلى **اسم المورد**؛ ويصبح هذا جزءًا من نقطة نهاية API الخاصة بك (`https://RESOURCE_NAME.openai.azure.com/`). -2. اذهب إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجا. +2. انتقل إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجًا. :::note - يجب أن يطابق اسم النشر اسم النموذج كي يعمل opencode بشكل صحيح. + يجب أن يتطابق اسم النشر مع اسم النموذج حتى يعمل opencode بشكل صحيح. ::: 3. شغّل الأمر `/connect` وابحث عن **Azure**. @@ -379,7 +377,20 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص /connect ``` -4. أدخل مفتاح API. +4. اختر طريقة المصادقة. + + - **مفتاح API**: الصق `KEY 1` أو `KEY 2` من موردك. + - **Microsoft Entra ID (OAuth عبر az login)**: شغّل `az login` أولًا. يجب أن تكون هوية Azure التي سجّلت الدخول بها مالكة لدور `Cognitive Services OpenAI User` لهذا المورد. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. إذا اخترت مفتاح API، فأدخل مفتاح API الخاص بك. ```txt ┌ API key @@ -388,19 +399,19 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص └ enter ``` -5. عيّن اسم المورد كمتغير بيئة: +6. اختياري: عيّن اسم المورد كمتغير بيئة لتخطي طلب اسم المورد أثناء `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - أو أضفه إلى bash profile: + أو أضفه إلى ملف تعريف bash الخاص بك: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. شغّل الأمر `/models` لاختيار النموذج الذي قمت بنشره. +7. شغّل الأمر `/models` لتحديد النموذج المنشور. ```txt /models @@ -410,14 +421,12 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص ### Azure Cognitive Services -1. توجّه إلى [Azure portal](https://portal.azure.com/) وأنشئ موردا من نوع **Azure OpenAI**. ستحتاج إلى: - - **Resource name**: يصبح جزءا من نقطة نهاية API لديك (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API key**: إما `KEY 1` أو `KEY 2` من موردك +1. انتقل إلى [مدخل Azure](https://portal.azure.com/) وأنشئ مورد **Azure OpenAI**. ستحتاج إلى **اسم المورد**؛ ويصبح هذا جزءًا من نقطة نهاية API الخاصة بك (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. اذهب إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجا. +2. انتقل إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجًا. :::note - يجب أن يطابق اسم النشر اسم النموذج كي يعمل opencode بشكل صحيح. + يجب أن يتطابق اسم النشر مع اسم النموذج حتى يعمل opencode بشكل صحيح. ::: 3. شغّل الأمر `/connect` وابحث عن **Azure Cognitive Services**. @@ -426,7 +435,20 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص /connect ``` -4. أدخل مفتاح API. +4. اختر طريقة المصادقة. + + - **مفتاح API**: الصق `KEY 1` أو `KEY 2` من موردك. + - **Microsoft Entra ID (OAuth عبر az login)**: شغّل `az login` أولًا. يجب أن تكون هوية Azure التي سجّلت الدخول بها مالكة لدور `Cognitive Services OpenAI User` لهذا المورد. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. إذا اخترت مفتاح API، فأدخل مفتاح API الخاص بك. ```txt ┌ API key @@ -435,19 +457,19 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص └ enter ``` -5. عيّن اسم المورد كمتغير بيئة: +6. اختياري: عيّن اسم المورد كمتغير بيئة لتخطي طلب اسم المورد أثناء `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - أو أضفه إلى bash profile: + أو أضفه إلى ملف تعريف bash الخاص بك: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. شغّل الأمر `/models` لاختيار النموذج الذي قمت بنشره. +7. شغّل الأمر `/models` لتحديد النموذج المنشور. ```txt /models diff --git a/packages/web/src/content/docs/bs/providers.mdx b/packages/web/src/content/docs/bs/providers.mdx index f6e54fc6ad15..3f9924b32ebc 100644 --- a/packages/web/src/content/docs/bs/providers.mdx +++ b/packages/web/src/content/docs/bs/providers.mdx @@ -365,98 +365,120 @@ Ako pozivi alata ne rade dobro, odaberite učitani model sa jakom podrškom za t ### Azure OpenAI :::note -Ako naiđete na greške "Žao mi je, ali ne mogu pomoći s tim zahtjevom", pokušajte promijeniti filter sadržaja iz **DefaultV2** u **Default** u vašem Azure resursu. +Ako naiđete na greške "Žao mi je, ali ne mogu pomoći s tim zahtjevom", pokušajte promijeniti filter sadržaja sa **DefaultV2** na **Default** u svom Azure resursu. ::: -1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. trebat će vam: - - **Naziv resursa**: Ovo postaje dio vaše krajnje tačke API-ja (`https://RESOURCE_NAME.openai.azure.com/`) - - **API ključ**: Ili `KEY 1` ili `KEY 2` sa vašeg izvora +1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. Trebat će vam **naziv resursa**; on postaje dio vašeg API endpointa (`https://RESOURCE_NAME.openai.azure.com/`). -2. Idite na [Azure AI Foundry](https://ai.azure.com/) i implementirajte model. +2. Idite na [Azure AI Foundry](https://ai.azure.com/) i deployajte model. :::note - Ime implementacije mora odgovarati imenu modela da bi opencode ispravno radio. + Naziv deploymenta mora odgovarati nazivu modela da bi opencode ispravno radio. ::: -3. Pokrenite naredbu `/connect` i potražite **Azure**. +3. Pokrenite komandu `/connect` i potražite **Azure**. -```txt + ```txt /connect -``` + ``` -4. Unesite svoj API ključ. +4. Odaberite način autentifikacije. -```txt + - **API ključ**: zalijepite `KEY 1` ili `KEY 2` iz svog resursa. + - **Microsoft Entra ID (OAuth preko az login)**: prvo pokrenite `az login`. Prijavljeni Azure identitet mora imati ulogu `Cognitive Services OpenAI User` za taj resurs. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Ako ste odabrali API ključ, unesite svoj API ključ. + + ```txt ┌ API key │ │ └ enter -``` + ``` -5. Postavite ime vašeg resursa kao varijablu okruženja: +6. Opcionalno: postavite naziv resursa kao varijablu okruženja da preskočite pitanje za naziv resursa tokom `/connect`. -```bash + ```bash AZURE_RESOURCE_NAME=XXX opencode -``` + ``` -Ili ga dodajte na svoj bash profil: + Ili ga dodajte u svoj bash profil: -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX -``` + ``` -6. Pokrenite naredbu `/models` da odaberete svoj raspoređeni model. +7. Pokrenite komandu `/models` da odaberete deployani model. -```txt + ```txt /models -``` + ``` --- ### Azure Cognitive Services -1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. trebat će vam: - - **Naziv resursa**: Ovo postaje dio vaše krajnje tačke API-ja (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API ključ**: Ili `KEY 1` ili `KEY 2` sa vašeg izvora +1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. Trebat će vam **naziv resursa**; on postaje dio vašeg API endpointa (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. Idite na [Azure AI Foundry](https://ai.azure.com/) i implementirajte model. +2. Idite na [Azure AI Foundry](https://ai.azure.com/) i deployajte model. :::note - Ime implementacije mora odgovarati imenu modela da bi opencode ispravno radio. + Naziv deploymenta mora odgovarati nazivu modela da bi opencode ispravno radio. ::: -3. Pokrenite naredbu `/connect` i potražite **Azure kognitivne usluge**. +3. Pokrenite komandu `/connect` i potražite **Azure Cognitive Services**. -```txt + ```txt /connect -``` + ``` -4. Unesite svoj API ključ. +4. Odaberite način autentifikacije. -```txt + - **API ključ**: zalijepite `KEY 1` ili `KEY 2` iz svog resursa. + - **Microsoft Entra ID (OAuth preko az login)**: prvo pokrenite `az login`. Prijavljeni Azure identitet mora imati ulogu `Cognitive Services OpenAI User` za taj resurs. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Ako ste odabrali API ključ, unesite svoj API ključ. + + ```txt ┌ API key │ │ └ enter -``` + ``` -5. Postavite ime vašeg resursa kao varijablu okruženja: +6. Opcionalno: postavite naziv resursa kao varijablu okruženja da preskočite pitanje za naziv resursa tokom `/connect`. -```bash + ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode -``` + ``` -Ili ga dodajte na svoj bash profil: + Ili ga dodajte u svoj bash profil: -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX -``` + ``` -6. Pokrenite naredbu `/models` da odaberete svoj raspoređeni model. +7. Pokrenite komandu `/models` da odaberete deployani model. -```txt + ```txt /models -``` + ``` --- diff --git a/packages/web/src/content/docs/da/providers.mdx b/packages/web/src/content/docs/da/providers.mdx index 9b04d6be82f9..1f5bf12ab7ae 100644 --- a/packages/web/src/content/docs/da/providers.mdx +++ b/packages/web/src/content/docs/da/providers.mdx @@ -356,17 +356,15 @@ Hvis værktøjskald ikke fungerer godt, så vælg en indlæst model med god tool ### Azure OpenAI :::note -Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, kan du prøve at ændre indholdsfilteret fra **DefaultV2** til **Default** i Azure-ressourcen. +Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du prøve at ændre indholdsfilteret fra **DefaultV2** til **Default** i din Azure-ressource. ::: -1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge: - - **Ressourcenavn**: Dette bliver en del af API-endpointet (`https://RESOURCE_NAME.openai.azure.com/`) - - **API-nøgle**: Enten `KEY 1` eller `KEY 2` fra din ressource +1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge **ressourcenavnet**; det bliver en del af dit API-endpoint (`https://RESOURCE_NAME.openai.azure.com/`). -2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en model. +2. Gå til [Azure AI Foundry](https://ai.azure.com/) og udrul en model. :::note - Distributionsnavnet skal matche modelnavnet for at opencode skal fungere korrekt. + Udrulningsnavnet skal matche modelnavnet, for at opencode fungerer korrekt. ::: 3. Kør kommandoen `/connect` og søg efter **Azure**. @@ -375,7 +373,20 @@ Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, /connect ``` -4. Indtast API-nøglen. +4. Vælg en godkendelsesmetode. + + - **API-nøgle**: indsæt `KEY 1` eller `KEY 2` fra din ressource. + - **Microsoft Entra ID (OAuth via az login)**: kør først `az login`. Den indloggede Azure-identitet skal have rollen `Cognitive Services OpenAI User` for ressourcen. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Hvis du valgte API-nøgle, skal du indtaste din API-nøgle. ```txt ┌ API key @@ -384,19 +395,19 @@ Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, └ enter ``` -5. Angiv dit ressourcenavn som en miljøvariabel: +6. Valgfrit: angiv ressourcenavnet som en miljøvariabel for at springe prompten om ressourcenavn over under `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Eller tilføj den til din bash-profil: + Eller føj det til din bash-profil: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. Kør kommandoen `/models` for at vælge den distribuerede model. +7. Kør kommandoen `/models` for at vælge din udrullede model. ```txt /models @@ -406,14 +417,12 @@ Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, ### Azure Cognitive Services -1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge: - - **Ressourcenavn**: Dette bliver en del af API-endpointet (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API-nøgle**: Enten `KEY 1` eller `KEY 2` fra din ressource +1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge **ressourcenavnet**; det bliver en del af dit API-endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en model. +2. Gå til [Azure AI Foundry](https://ai.azure.com/) og udrul en model. :::note - Distributionsnavnet skal matche modelnavnet for at opencode skal fungere korrekt. + Udrulningsnavnet skal matche modelnavnet, for at opencode fungerer korrekt. ::: 3. Kør kommandoen `/connect` og søg efter **Azure Cognitive Services**. @@ -422,7 +431,20 @@ Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, /connect ``` -4. Indtast API-nøglen. +4. Vælg en godkendelsesmetode. + + - **API-nøgle**: indsæt `KEY 1` eller `KEY 2` fra din ressource. + - **Microsoft Entra ID (OAuth via az login)**: kør først `az login`. Den indloggede Azure-identitet skal have rollen `Cognitive Services OpenAI User` for ressourcen. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Hvis du valgte API-nøgle, skal du indtaste din API-nøgle. ```txt ┌ API key @@ -431,19 +453,19 @@ Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, └ enter ``` -5. Angiv dit ressourcenavn som en miljøvariabel: +6. Valgfrit: angiv ressourcenavnet som en miljøvariabel for at springe prompten om ressourcenavn over under `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Eller tilføj den til din bash-profil: + Eller føj det til din bash-profil: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Kør kommandoen `/models` for at vælge den distribuerede model. +7. Kør kommandoen `/models` for at vælge din udrullede model. ```txt /models diff --git a/packages/web/src/content/docs/de/providers.mdx b/packages/web/src/content/docs/de/providers.mdx index 92981469309c..4a652a678cca 100644 --- a/packages/web/src/content/docs/de/providers.mdx +++ b/packages/web/src/content/docs/de/providers.mdx @@ -362,26 +362,37 @@ Wenn Tool-Aufrufe nicht zuverlässig funktionieren, wählen Sie ein geladenes Mo ### Azure OpenAI :::note -Wenn Sie auf die Fehlermeldung „Es tut mir leid, aber ich kann Ihnen bei dieser Anfrage nicht weiterhelfen“ stoßen, versuchen Sie, den Inhaltsfilter in Ihrer Azure-Ressource von **DefaultV2** in **Default** zu ändern. +Wenn Fehler wie "I'm sorry, but I cannot assist with that request" auftreten, ändere in deiner Azure-Ressource den Inhaltsfilter von **DefaultV2** auf **Default**. ::: -1. Gehen Sie zu [Azure portal](https://portal.azure.com/) und erstellen Sie eine **Azure OpenAI**-Ressource. Sie benötigen: - - **Ressourcenname**: Dies wird Teil Ihres API-Endpunkts (`https://RESOURCE_NAME.openai.azure.com/`) - - **API-Schlüssel**: Entweder `KEY 1` oder `KEY 2` aus Ihrer Ressource +1. Gehe zum [Azure-Portal](https://portal.azure.com/) und erstelle eine **Azure OpenAI**-Ressource. Du benötigst den **Ressourcennamen**; er wird Teil deines API-Endpunkts (`https://RESOURCE_NAME.openai.azure.com/`). -2. Gehen Sie zu [Azure AI Foundry](https://ai.azure.com/) und stellen Sie ein Modell bereit. +2. Gehe zu [Azure AI Foundry](https://ai.azure.com/) und stelle ein Modell bereit. :::note - Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit OpenCode ordnungsgemäß funktioniert. + Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit opencode korrekt funktioniert. ::: -3. Führen Sie den Befehl `/connect` aus und suchen Sie nach **Azure**. +3. Führe den Befehl `/connect` aus und suche nach **Azure**. ```txt /connect ``` -4. Geben Sie Ihren API-Schlüssel ein. +4. Wähle eine Authentifizierungsmethode. + + - **API-Schlüssel**: Füge `KEY 1` oder `KEY 2` aus deiner Ressource ein. + - **Microsoft Entra ID (OAuth über az login)**: Führe zuerst `az login` aus. Die angemeldete Azure-Identität muss für die Ressource die Rolle `Cognitive Services OpenAI User` haben. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Wenn du API-Schlüssel gewählt hast, gib deinen API-Schlüssel ein. ```txt ┌ API key @@ -390,19 +401,19 @@ Wenn Sie auf die Fehlermeldung „Es tut mir leid, aber ich kann Ihnen bei diese └ enter ``` -5. Legen Sie Ihren Ressourcennamen als Umgebungsvariable fest: +6. Optional: Lege den Ressourcennamen als Umgebungsvariable fest, um die Abfrage des Ressourcennamens während `/connect` zu überspringen. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Oder fügen Sie es Ihrem Bash-Profil hinzu: + Oder füge ihn deinem Bash-Profil hinzu: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. Führen Sie den Befehl `/models` aus, um Ihr bereitgestelltes Modell auszuwählen. +7. Führe den Befehl `/models` aus, um dein bereitgestelltes Modell auszuwählen. ```txt /models @@ -412,23 +423,34 @@ Wenn Sie auf die Fehlermeldung „Es tut mir leid, aber ich kann Ihnen bei diese ### Azure Cognitive Services -1. Gehen Sie zu [Azure portal](https://portal.azure.com/) und erstellen Sie eine **Azure OpenAI**-Ressource. Sie benötigen: - - **Ressourcenname**: Dies wird Teil Ihres API-Endpunkts (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API-Schlüssel**: Entweder `KEY 1` oder `KEY 2` aus Ihrer Ressource +1. Gehe zum [Azure-Portal](https://portal.azure.com/) und erstelle eine **Azure OpenAI**-Ressource. Du benötigst den **Ressourcennamen**; er wird Teil deines API-Endpunkts (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. Gehen Sie zu [Azure AI Foundry](https://ai.azure.com/) und stellen Sie ein Modell bereit. +2. Gehe zu [Azure AI Foundry](https://ai.azure.com/) und stelle ein Modell bereit. :::note - Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit OpenCode ordnungsgemäß funktioniert. + Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit opencode korrekt funktioniert. ::: -3. Führen Sie den Befehl `/connect` aus und suchen Sie nach **Azure Cognitive Services**. +3. Führe den Befehl `/connect` aus und suche nach **Azure Cognitive Services**. ```txt /connect ``` -4. Geben Sie Ihren API-Schlüssel ein. +4. Wähle eine Authentifizierungsmethode. + + - **API-Schlüssel**: Füge `KEY 1` oder `KEY 2` aus deiner Ressource ein. + - **Microsoft Entra ID (OAuth über az login)**: Führe zuerst `az login` aus. Die angemeldete Azure-Identität muss für die Ressource die Rolle `Cognitive Services OpenAI User` haben. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Wenn du API-Schlüssel gewählt hast, gib deinen API-Schlüssel ein. ```txt ┌ API key @@ -437,19 +459,19 @@ Wenn Sie auf die Fehlermeldung „Es tut mir leid, aber ich kann Ihnen bei diese └ enter ``` -5. Legen Sie Ihren Ressourcennamen als Umgebungsvariable fest: +6. Optional: Lege den Ressourcennamen als Umgebungsvariable fest, um die Abfrage des Ressourcennamens während `/connect` zu überspringen. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Oder fügen Sie es Ihrem Bash-Profil hinzu: + Oder füge ihn deinem Bash-Profil hinzu: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Führen Sie den Befehl `/models` aus, um Ihr bereitgestelltes Modell auszuwählen. +7. Führe den Befehl `/models` aus, um dein bereitgestelltes Modell auszuwählen. ```txt /models diff --git a/packages/web/src/content/docs/es/providers.mdx b/packages/web/src/content/docs/es/providers.mdx index 11489609bc64..6f7a3820d664 100644 --- a/packages/web/src/content/docs/es/providers.mdx +++ b/packages/web/src/content/docs/es/providers.mdx @@ -366,9 +366,7 @@ Si las llamadas a herramientas no funcionan bien, elige un modelo cargado con bu Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud", intente cambiar el filtro de contenido de **DefaultV2** a **Default** en su recurso de Azure. ::: -1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitarás: - - **Nombre del recurso**: esto pasa a formar parte de su punto final API (`https://RESOURCE_NAME.openai.azure.com/`) - - **Clave API**: `KEY 1` o `KEY 2` de su recurso +1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitará el **nombre del recurso**; este pasa a formar parte de su punto final API (`https://RESOURCE_NAME.openai.azure.com/`). 2. Vaya a [Azure AI Foundry](https://ai.azure.com/) e implemente un modelo. @@ -382,7 +380,20 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud /connect ``` -4. Ingrese su clave API. +4. Elija un método de autenticación. + + - **Clave API**: pegue `KEY 1` o `KEY 2` de su recurso. + - **Microsoft Entra ID (OAuth mediante az login)**: primero ejecute `az login`. La identidad de Azure con la sesión iniciada debe tener el rol `Cognitive Services OpenAI User` para el recurso. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Si eligió clave API, ingrese su clave API. ```txt ┌ API key @@ -391,7 +402,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud └ enter ``` -5. Configure el nombre de su recurso como una variable de entorno: +6. Opcional: configure el nombre del recurso como una variable de entorno para omitir la solicitud del nombre del recurso durante `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -403,7 +414,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud export AZURE_RESOURCE_NAME=XXX ``` -6. Ejecute el comando `/models` para seleccionar su modelo implementado. +7. Ejecute el comando `/models` para seleccionar su modelo implementado. ```txt /models @@ -413,9 +424,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud ### Servicios cognitivos de Azure -1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitarás: - - **Nombre del recurso**: esto pasa a formar parte de su punto final API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **Clave API**: `KEY 1` o `KEY 2` de su recurso +1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitará el **nombre del recurso**; este pasa a formar parte de su punto final API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Vaya a [Azure AI Foundry](https://ai.azure.com/) e implemente un modelo. @@ -429,7 +438,20 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud /connect ``` -4. Ingrese su clave API. +4. Elija un método de autenticación. + + - **Clave API**: pegue `KEY 1` o `KEY 2` de su recurso. + - **Microsoft Entra ID (OAuth mediante az login)**: primero ejecute `az login`. La identidad de Azure con la sesión iniciada debe tener el rol `Cognitive Services OpenAI User` para el recurso. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Si eligió clave API, ingrese su clave API. ```txt ┌ API key @@ -438,7 +460,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud └ enter ``` -5. Configure el nombre de su recurso como una variable de entorno: +6. Opcional: configure el nombre del recurso como una variable de entorno para omitir la solicitud del nombre del recurso durante `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -450,7 +472,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Ejecute el comando `/models` para seleccionar su modelo implementado. +7. Ejecute el comando `/models` para seleccionar su modelo implementado. ```txt /models diff --git a/packages/web/src/content/docs/fr/providers.mdx b/packages/web/src/content/docs/fr/providers.mdx index 90bdb1fbc304..26fdf4621a36 100644 --- a/packages/web/src/content/docs/fr/providers.mdx +++ b/packages/web/src/content/docs/fr/providers.mdx @@ -366,17 +366,15 @@ Si les appels d'outils ne fonctionnent pas bien, choisissez un modèle chargé a ### Azure OpenAI :::note -Si vous rencontrez des erreurs « Je suis désolé, mais je ne peux pas vous aider avec cette demande », essayez de modifier le filtre de contenu de **DefaultV2** à **Default** dans votre ressource Azure. +Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that request", essayez de remplacer le filtre de contenu **DefaultV2** par **Default** dans votre ressource Azure. ::: -1. Rendez-vous sur le [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin de : - - **Nom de la ressource** : cela fait partie de votre point de terminaison API (`https://RESOURCE_NAME.openai.azure.com/`) - - **Clé API** : soit `KEY 1` ou `KEY 2` de votre ressource +1. Accédez au [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin du **nom de la ressource** ; il fera partie de votre point de terminaison API (`https://RESOURCE_NAME.openai.azure.com/`). 2. Accédez à [Azure AI Foundry](https://ai.azure.com/) et déployez un modèle. :::note - Le nom du déploiement doit correspondre au nom du modèle pour que opencode fonctionne correctement. + Le nom du déploiement doit correspondre au nom du modèle pour qu’opencode fonctionne correctement. ::: 3. Exécutez la commande `/connect` et recherchez **Azure**. @@ -385,7 +383,20 @@ Si vous rencontrez des erreurs « Je suis désolé, mais je ne peux pas vous aid /connect ``` -4. Entrez votre clé API. +4. Choisissez une méthode d’authentification. + + - **Clé API** : collez `KEY 1` ou `KEY 2` depuis votre ressource. + - **Microsoft Entra ID (OAuth via az login)** : exécutez d’abord `az login`. L’identité Azure connectée doit disposer du rôle `Cognitive Services OpenAI User` pour la ressource. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Si vous avez choisi la clé API, saisissez votre clé API. ```txt ┌ API key @@ -394,19 +405,19 @@ Si vous rencontrez des erreurs « Je suis désolé, mais je ne peux pas vous aid └ enter ``` -5. Définissez le nom de votre ressource comme variable d'environnement : +6. Facultatif : définissez le nom de la ressource comme variable d’environnement pour ignorer la demande du nom de ressource pendant `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` -Ou ajoutez-le à votre profil bash : + Ou ajoutez-le à votre profil bash : -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX -``` + ``` -6. Exécutez la commande `/models` pour sélectionner votre modèle déployé. +7. Exécutez la commande `/models` pour sélectionner votre modèle déployé. ```txt /models @@ -416,14 +427,12 @@ Ou ajoutez-le à votre profil bash : ### Azure Cognitive Services -1. Rendez-vous sur le [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin de : - - **Nom de la ressource** : cela fait partie de votre point de terminaison API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **Clé API** : soit `KEY 1` ou `KEY 2` de votre ressource +1. Accédez au [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin du **nom de la ressource** ; il fera partie de votre point de terminaison API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Accédez à [Azure AI Foundry](https://ai.azure.com/) et déployez un modèle. :::note - Le nom du déploiement doit correspondre au nom du modèle pour que opencode fonctionne correctement. + Le nom du déploiement doit correspondre au nom du modèle pour qu’opencode fonctionne correctement. ::: 3. Exécutez la commande `/connect` et recherchez **Azure Cognitive Services**. @@ -432,7 +441,20 @@ Ou ajoutez-le à votre profil bash : /connect ``` -4. Entrez votre clé API. +4. Choisissez une méthode d’authentification. + + - **Clé API** : collez `KEY 1` ou `KEY 2` depuis votre ressource. + - **Microsoft Entra ID (OAuth via az login)** : exécutez d’abord `az login`. L’identité Azure connectée doit disposer du rôle `Cognitive Services OpenAI User` pour la ressource. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Si vous avez choisi la clé API, saisissez votre clé API. ```txt ┌ API key @@ -441,19 +463,19 @@ Ou ajoutez-le à votre profil bash : └ enter ``` -5. Définissez le nom de votre ressource comme variable d'environnement : +6. Facultatif : définissez le nom de la ressource comme variable d’environnement pour ignorer la demande du nom de ressource pendant `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` -Ou ajoutez-le à votre profil bash : + Ou ajoutez-le à votre profil bash : -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX -``` + ``` -6. Exécutez la commande `/models` pour sélectionner votre modèle déployé. +7. Exécutez la commande `/models` pour sélectionner votre modèle déployé. ```txt /models diff --git a/packages/web/src/content/docs/it/providers.mdx b/packages/web/src/content/docs/it/providers.mdx index f2d195d7218b..99eb6df59b2e 100644 --- a/packages/web/src/content/docs/it/providers.mdx +++ b/packages/web/src/content/docs/it/providers.mdx @@ -340,17 +340,15 @@ Se le chiamate agli strumenti non funzionano bene, scegli un modello caricato co ### Azure OpenAI :::note -Se incontri errori "I'm sorry, but I cannot assist with that request", prova a cambiare il filtro contenuti da **DefaultV2** a **Default** nella tua risorsa Azure. +Se incontri errori come "I'm sorry, but I cannot assist with that request", prova a cambiare il filtro dei contenuti da **DefaultV2** a **Default** nella tua risorsa Azure. ::: -1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti serviranno: - - **Resource name**: Diventa parte del tuo endpoint API (`https://RESOURCE_NAME.openai.azure.com/`) - - **API key**: O `KEY 1` o `KEY 2` dalla tua risorsa +1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti servirà il **nome della risorsa**; diventa parte del tuo endpoint API (`https://RESOURCE_NAME.openai.azure.com/`). -2. Vai su [Azure AI Foundry](https://ai.azure.com/) e fai il deploy di un modello. +2. Vai ad [Azure AI Foundry](https://ai.azure.com/) e distribuisci un modello. :::note - Il nome del deployment deve corrispondere al nome del modello affinché opencode funzioni correttamente. + Il nome della distribuzione deve corrispondere al nome del modello affinché opencode funzioni correttamente. ::: 3. Esegui il comando `/connect` e cerca **Azure**. @@ -359,7 +357,20 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c /connect ``` -4. Inserisci la tua chiave API. +4. Scegli un metodo di autenticazione. + + - **Chiave API**: incolla `KEY 1` o `KEY 2` dalla tua risorsa. + - **Microsoft Entra ID (OAuth tramite az login)**: esegui prima `az login`. L’identità Azure connessa deve avere il ruolo `Cognitive Services OpenAI User` per la risorsa. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Se hai scelto la chiave API, inserisci la tua chiave API. ```txt ┌ API key @@ -368,7 +379,7 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c └ enter ``` -5. Imposta il nome della risorsa come variabile d'ambiente: +6. Opzionale: imposta il nome della risorsa come variabile d’ambiente per saltare la richiesta del nome della risorsa durante `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -380,7 +391,7 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c export AZURE_RESOURCE_NAME=XXX ``` -6. Esegui il comando `/models` per selezionare il tuo modello deployato. +7. Esegui il comando `/models` per selezionare il modello distribuito. ```txt /models @@ -390,14 +401,12 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c ### Azure Cognitive Services -1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti serviranno: - - **Resource name**: Diventa parte del tuo endpoint API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API key**: O `KEY 1` o `KEY 2` dalla tua risorsa +1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti servirà il **nome della risorsa**; diventa parte del tuo endpoint API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. Vai su [Azure AI Foundry](https://ai.azure.com/) e fai il deploy di un modello. +2. Vai ad [Azure AI Foundry](https://ai.azure.com/) e distribuisci un modello. :::note - Il nome del deployment deve corrispondere al nome del modello affinché opencode funzioni correttamente. + Il nome della distribuzione deve corrispondere al nome del modello affinché opencode funzioni correttamente. ::: 3. Esegui il comando `/connect` e cerca **Azure Cognitive Services**. @@ -406,7 +415,20 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c /connect ``` -4. Inserisci la tua chiave API. +4. Scegli un metodo di autenticazione. + + - **Chiave API**: incolla `KEY 1` o `KEY 2` dalla tua risorsa. + - **Microsoft Entra ID (OAuth tramite az login)**: esegui prima `az login`. L’identità Azure connessa deve avere il ruolo `Cognitive Services OpenAI User` per la risorsa. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Se hai scelto la chiave API, inserisci la tua chiave API. ```txt ┌ API key @@ -415,7 +437,7 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c └ enter ``` -5. Imposta il nome della risorsa come variabile d'ambiente: +6. Opzionale: imposta il nome della risorsa come variabile d’ambiente per saltare la richiesta del nome della risorsa durante `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -427,7 +449,7 @@ Se incontri errori "I'm sorry, but I cannot assist with that request", prova a c export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Esegui il comando `/models` per selezionare il tuo modello deployato. +7. Esegui il comando `/models` per selezionare il modello distribuito. ```txt /models diff --git a/packages/web/src/content/docs/ja/providers.mdx b/packages/web/src/content/docs/ja/providers.mdx index c969c6d4a0de..6dacec905a68 100644 --- a/packages/web/src/content/docs/ja/providers.mdx +++ b/packages/web/src/content/docs/ja/providers.mdx @@ -370,26 +370,37 @@ opencode は、OpenAI 互換の API サーバーの背後でローカル LLM を ### Azure OpenAI :::note -「申し訳ありませんが、そのリクエストには対応できません」エラーが発生した場合は、Azure リソースのコンテンツフィルターを **DefaultV2** から **Default** に変更してみてください。 +「I'm sorry, but I cannot assist with that request」のようなエラーが発生する場合は、Azure リソースのコンテンツ フィルターを **DefaultV2** から **Default** に変更してみてください。 ::: -1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。必要なものは次のとおりです。 - - **リソース名**: これは API エンドポイント (`https://RESOURCE_NAME.openai.azure.com/`) の一部になります。 - - **API キー**: リソースの `KEY 1` または `KEY 2` のいずれか +1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。**リソース名**が必要です。これは API エンドポイントの一部になります (`https://RESOURCE_NAME.openai.azure.com/`). 2. [Azure AI Foundry](https://ai.azure.com/) に移動し、モデルをデプロイします。 -:::note -OpenCode が正しく動作するには、デプロイメント名がモデル名と一致する必要があります。 -::: + :::note + opencode が正しく動作するには、デプロイ名がモデル名と一致している必要があります。 + ::: -3. `/connect` コマンドを実行し、**Azure** を検索します。 +3. `/connect` コマンドを実行して **Azure**. ```txt /connect ``` -4. API キーを入力します。 +4. 認証方法を選択します。 + + - **API キー**: リソースの `KEY 1` または `KEY 2` を貼り付けます。 + - **Microsoft Entra ID (az login による OAuth)**: 先に `az login` を実行します。サインインしている Azure ID には、そのリソースに対する `Cognitive Services OpenAI User` ロールが必要です。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API キーを選択した場合は、API キーを入力します。 ```txt ┌ API key @@ -398,19 +409,19 @@ OpenCode が正しく動作するには、デプロイメント名がモデル └ enter ``` -5. リソース名を環境変数として設定します。 +6. 任意: `/connect` 中のリソース名の入力を省略するには、リソース名を環境変数として設定します。 ```bash AZURE_RESOURCE_NAME=XXX opencode ``` -または、bash プロファイルに追加します。 + または bash プロファイルに追加します: -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX -``` + ``` -6. `/models` コマンドを実行して、デプロイされたモデルを選択します。 +7. `/models` コマンドを実行して、デプロイ済みモデルを選択します。 ```txt /models @@ -420,23 +431,34 @@ OpenCode が正しく動作するには、デプロイメント名がモデル ### Azure Cognitive Services -1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。必要なものは次のとおりです。 - - **リソース名**: これは API エンドポイント (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) の一部になります。 - - **API キー**: リソースの `KEY 1` または `KEY 2` のいずれか +1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。**リソース名**が必要です。これは API エンドポイントの一部になります (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. [Azure AI Foundry](https://ai.azure.com/) に移動し、モデルをデプロイします。 -:::note -OpenCode が正しく動作するには、デプロイメント名がモデル名と一致する必要があります。 -::: + :::note + opencode が正しく動作するには、デプロイ名がモデル名と一致している必要があります。 + ::: -3. `/connect` コマンドを実行し、**Azure Cognitive Services** を検索します。 +3. `/connect` コマンドを実行して **Azure Cognitive Services**. ```txt /connect ``` -4. API キーを入力します。 +4. 認証方法を選択します。 + + - **API キー**: リソースの `KEY 1` または `KEY 2` を貼り付けます。 + - **Microsoft Entra ID (az login による OAuth)**: 先に `az login` を実行します。サインインしている Azure ID には、そのリソースに対する `Cognitive Services OpenAI User` ロールが必要です。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API キーを選択した場合は、API キーを入力します。 ```txt ┌ API key @@ -445,19 +467,19 @@ OpenCode が正しく動作するには、デプロイメント名がモデル └ enter ``` -5. リソース名を環境変数として設定します。 +6. 任意: `/connect` 中のリソース名の入力を省略するには、リソース名を環境変数として設定します。 ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` -または、bash プロファイルに追加します。 + または bash プロファイルに追加します: -```bash title="~/.bash_profile" + ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX -``` + ``` -6. `/models` コマンドを実行して、デプロイされたモデルを選択します。 +7. `/models` コマンドを実行して、デプロイ済みモデルを選択します。 ```txt /models diff --git a/packages/web/src/content/docs/ko/providers.mdx b/packages/web/src/content/docs/ko/providers.mdx index 87278bef23f9..1cf35262d92c 100644 --- a/packages/web/src/content/docs/ko/providers.mdx +++ b/packages/web/src/content/docs/ko/providers.mdx @@ -366,26 +366,37 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 ### Azure OpenAI :::note -"I'm sorry, but I cannot assist with that request" 오류가 발생하면, Azure 리소스의 콘텐츠 필터를 **DefaultV2**에서 **Default**로 변경해 보세요. +"I'm sorry, but I cannot assist with that request" 같은 오류가 발생하면 Azure 리소스에서 콘텐츠 필터를 **DefaultV2**에서 **Default**로 변경해 보세요. ::: -1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만듭니다. 다음이 필요합니다: - - **리소스 이름**: API 엔드포인트의 일부가 됩니다 (`https://RESOURCE_NAME.openai.azure.com/`) - - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2` +1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만드세요. **리소스 이름**이 필요하며, 이는 API 엔드포인트의 일부가 됩니다 (`https://RESOURCE_NAME.openai.azure.com/`). -2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포합니다. +2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포하세요. :::note - 배포 이름은 제대로 작동하려면 OpenCode의 모델 이름과 일치해야 합니다. + opencode가 올바르게 작동하려면 배포 이름이 모델 이름과 일치해야 합니다. ::: -3. `/connect` 명령을 실행하고 **Azure**를 검색하십시오. +3. `/connect` 명령을 실행하고 **Azure**. ```txt /connect ``` -4. API 키를 입력하십시오. +4. 인증 방법을 선택하세요. + + - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2`를 붙여넣으세요. + - **Microsoft Entra ID (az login을 통한 OAuth)**: 먼저 `az login`을 실행하세요. 로그인한 Azure ID에는 해당 리소스에 대한 `Cognitive Services OpenAI User` 역할이 있어야 합니다. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API 키를 선택했다면 API 키를 입력하세요. ```txt ┌ API key @@ -394,19 +405,19 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 └ enter ``` -5. 리소스 이름을 환경 변수로 설정: +6. 선택 사항: `/connect` 중 리소스 이름 프롬프트를 건너뛰려면 리소스 이름을 환경 변수로 설정하세요. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 또는 bash 프로필에 추가: + 또는 bash 프로필에 추가하세요: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. `/models` 명령을 실행하여 배포된 모델을 선택하십시오. +7. `/models` 명령을 실행하여 배포된 모델을 선택하세요. ```txt /models @@ -416,23 +427,34 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 ### Azure Cognitive Services -1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만듭니다. 다음이 필요합니다: - - **리소스 이름**: API 엔드포인트의 일부가 됩니다 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2` +1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만드세요. **리소스 이름**이 필요하며, 이는 API 엔드포인트의 일부가 됩니다 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포합니다. +2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포하세요. :::note - 배포 이름은 제대로 작동하려면 OpenCode의 모델 이름과 일치해야 합니다. + opencode가 올바르게 작동하려면 배포 이름이 모델 이름과 일치해야 합니다. ::: -3. `/connect` 명령을 실행하고 **Azure Cognitive Services**를 검색하십시오. +3. `/connect` 명령을 실행하고 **Azure Cognitive Services**. ```txt /connect ``` -4. API 키를 입력하십시오. +4. 인증 방법을 선택하세요. + + - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2`를 붙여넣으세요. + - **Microsoft Entra ID (az login을 통한 OAuth)**: 먼저 `az login`을 실행하세요. 로그인한 Azure ID에는 해당 리소스에 대한 `Cognitive Services OpenAI User` 역할이 있어야 합니다. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API 키를 선택했다면 API 키를 입력하세요. ```txt ┌ API key @@ -441,19 +463,19 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 └ enter ``` -5. 리소스 이름을 환경 변수로 설정: +6. 선택 사항: `/connect` 중 리소스 이름 프롬프트를 건너뛰려면 리소스 이름을 환경 변수로 설정하세요. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 또는 bash 프로필에 추가: + 또는 bash 프로필에 추가하세요: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. `/models` 명령을 실행하여 배포된 모델을 선택하십시오. +7. `/models` 명령을 실행하여 배포된 모델을 선택하세요. ```txt /models diff --git a/packages/web/src/content/docs/nb/providers.mdx b/packages/web/src/content/docs/nb/providers.mdx index bf276918a9ba..83a1a24a2e3f 100644 --- a/packages/web/src/content/docs/nb/providers.mdx +++ b/packages/web/src/content/docs/nb/providers.mdx @@ -364,17 +364,15 @@ Hvis verktøykall ikke fungerer godt, velg en lastet modell med god tool calling ### Azure OpenAI :::note -Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen»-feil, kan du prøve å endre innholdsfilteret fra **DefaultV2** til **Default** i Azure-ressursen. +Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du prøve å endre innholdsfilteret fra **DefaultV2** til **Default** i Azure-ressursen din. ::: -1. Gå over til [Azure-portalen](https://portal.azure.com/) og lag en **Azure OpenAI**-ressurs. Du trenger: - - **Ressursnavn**: Dette blir en del av API-endepunktet (`https://RESOURCE_NAME.openai.azure.com/`) - - **API nøkkel**: Enten `KEY 1` eller `KEY 2` fra ressursen din +1. Gå til [Azure-portalen](https://portal.azure.com/) og opprett en **Azure OpenAI**-ressurs. Du trenger **ressursnavnet**; det blir en del av API-endepunktet ditt (`https://RESOURCE_NAME.openai.azure.com/`). 2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en modell. :::note - Distribusjonsnavnet må samsvare med modellnavnet for at OpenCode skal fungere skikkelig. + Distribusjonsnavnet må samsvare med modellnavnet for at opencode skal fungere riktig. ::: 3. Kjør kommandoen `/connect` og søk etter **Azure**. @@ -383,7 +381,20 @@ Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen» /connect ``` -4. Skriv inn API-nøkkelen. +4. Velg en autentiseringsmetode. + + - **API-nøkkel**: lim inn `KEY 1` eller `KEY 2` fra ressursen din. + - **Microsoft Entra ID (OAuth via az login)**: kjør `az login` først. Den påloggede Azure-identiteten må ha rollen `Cognitive Services OpenAI User` for ressursen. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Hvis du valgte API-nøkkel, skriver du inn API-nøkkelen. ```txt ┌ API key @@ -392,19 +403,19 @@ Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen» └ enter ``` -5. Angi ressursnavnet ditt som en miljøvariabel: +6. Valgfritt: angi ressursnavnet som en miljøvariabel for å hoppe over ressursnavnsprompten under `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Eller legg den til bash-profilen din: + Eller legg det til i bash-profilen din: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. Kjør kommandoen `/models` for å velge den distribuerte modellen. +7. Kjør kommandoen `/models` for å velge den distribuerte modellen. ```txt /models @@ -414,14 +425,12 @@ Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen» ### Azure Cognitive Services -1. Gå over til [Azure-portalen](https://portal.azure.com/) og lag en **Azure OpenAI**-ressurs. Du trenger: - - **Ressursnavn**: Dette blir en del av API-endepunktet (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API nøkkel**: Enten `KEY 1` eller `KEY 2` fra ressursen din +1. Gå til [Azure-portalen](https://portal.azure.com/) og opprett en **Azure OpenAI**-ressurs. Du trenger **ressursnavnet**; det blir en del av API-endepunktet ditt (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en modell. :::note - Distribusjonsnavnet må samsvare med modellnavnet for at OpenCode skal fungere skikkelig. + Distribusjonsnavnet må samsvare med modellnavnet for at opencode skal fungere riktig. ::: 3. Kjør kommandoen `/connect` og søk etter **Azure Cognitive Services**. @@ -430,7 +439,20 @@ Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen» /connect ``` -4. Skriv inn API-nøkkelen. +4. Velg en autentiseringsmetode. + + - **API-nøkkel**: lim inn `KEY 1` eller `KEY 2` fra ressursen din. + - **Microsoft Entra ID (OAuth via az login)**: kjør `az login` først. Den påloggede Azure-identiteten må ha rollen `Cognitive Services OpenAI User` for ressursen. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Hvis du valgte API-nøkkel, skriver du inn API-nøkkelen. ```txt ┌ API key @@ -439,19 +461,19 @@ Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen» └ enter ``` -5. Angi ressursnavnet ditt som en miljøvariabel: +6. Valgfritt: angi ressursnavnet som en miljøvariabel for å hoppe over ressursnavnsprompten under `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Eller legg den til bash-profilen din: + Eller legg det til i bash-profilen din: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Kjør kommandoen `/models` for å velge den distribuerte modellen. +7. Kjør kommandoen `/models` for å velge den distribuerte modellen. ```txt /models diff --git a/packages/web/src/content/docs/pl/providers.mdx b/packages/web/src/content/docs/pl/providers.mdx index 0e722d5fde2e..d57c04ecc12d 100644 --- a/packages/web/src/content/docs/pl/providers.mdx +++ b/packages/web/src/content/docs/pl/providers.mdx @@ -362,17 +362,15 @@ Jeśli wywołania narzędzi nie działają dobrze, wybierz załadowany model z d ### Azure OpenAI :::note -Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, spróbuj zmienić filtr zawartości z **DefaultV2** na **Default** w zasobie platformy Azure. +Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that request", spróbuj zmienić filtr treści z **DefaultV2** na **Default** w swoim zasobie Azure. ::: -1. Przejdź do [Azure portal](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Będziesz potrzebować: - - **Nazwa zasobu**: staje się częścią punktu końcowego API (`https://RESOURCE_NAME.openai.azure.com/`) - - **Klucz API**: `KEY 1` lub `KEY 2` z Twojego zasobu +1. Przejdź do [portalu Azure](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Potrzebujesz **nazwy zasobu**; stanie się ona częścią punktu końcowego API (`https://RESOURCE_NAME.openai.azure.com/`). 2. Przejdź do [Azure AI Foundry](https://ai.azure.com/) i wdróż model. :::note - Aby kod opencode działał poprawnie, nazwa wdrożenia musi być zgodna z nazwą modelu. + Nazwa wdrożenia musi odpowiadać nazwie modelu, aby opencode działał poprawnie. ::: 3. Uruchom polecenie `/connect` i wyszukaj **Azure**. @@ -381,7 +379,20 @@ Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, /connect ``` -4. Wpisz swój klucz API. +4. Wybierz metodę uwierzytelniania. + + - **Klucz API**: wklej `KEY 1` lub `KEY 2` ze swojego zasobu. + - **Microsoft Entra ID (OAuth przez az login)**: najpierw uruchom `az login`. Zalogowana tożsamość Azure musi mieć rolę `Cognitive Services OpenAI User` dla tego zasobu. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Jeśli wybrano klucz API, wpisz swój klucz API. ```txt ┌ API key @@ -390,19 +401,19 @@ Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, └ enter ``` -5. Ustaw nazwę zasobu jako zmienną środowiskową: +6. Opcjonalnie: ustaw nazwę zasobu jako zmienną środowiskową, aby pominąć pytanie o nazwę zasobu podczas `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Lub dodaj go do swojego profilu bash: + Albo dodaj ją do profilu bash: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. Uruchom komendę `/models`, aby wybrać wdrożony model. +7. Uruchom polecenie `/models`, aby wybrać wdrożony model. ```txt /models @@ -412,14 +423,12 @@ Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, ### Azure Cognitive Services -1. Przejdź do [Azure portal](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Będziesz potrzebować: - - **Nazwa zasobu**: staje się częścią punktu końcowego API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **Klucz API**: `KEY 1` lub `KEY 2` z Twojego zasobu +1. Przejdź do [portalu Azure](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Potrzebujesz **nazwy zasobu**; stanie się ona częścią punktu końcowego API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Przejdź do [Azure AI Foundry](https://ai.azure.com/) i wdróż model. :::note - Aby kod opencode działał poprawnie, nazwa wdrożenia musi być zgodna z nazwą modelu. + Nazwa wdrożenia musi odpowiadać nazwie modelu, aby opencode działał poprawnie. ::: 3. Uruchom polecenie `/connect` i wyszukaj **Azure Cognitive Services**. @@ -428,7 +437,20 @@ Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, /connect ``` -4. Wpisz swój klucz API. +4. Wybierz metodę uwierzytelniania. + + - **Klucz API**: wklej `KEY 1` lub `KEY 2` ze swojego zasobu. + - **Microsoft Entra ID (OAuth przez az login)**: najpierw uruchom `az login`. Zalogowana tożsamość Azure musi mieć rolę `Cognitive Services OpenAI User` dla tego zasobu. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Jeśli wybrano klucz API, wpisz swój klucz API. ```txt ┌ API key @@ -437,19 +459,19 @@ Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, └ enter ``` -5. Ustaw nazwę zasobu jako zmienną środowiskową: +6. Opcjonalnie: ustaw nazwę zasobu jako zmienną środowiskową, aby pominąć pytanie o nazwę zasobu podczas `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Lub dodaj go do swojego profilu bash: + Albo dodaj ją do profilu bash: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Uruchom komendę `/models`, aby wybrać wdrożony model. +7. Uruchom polecenie `/models`, aby wybrać wdrożony model. ```txt /models diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 628e2244e03c..d56540a523d0 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -378,9 +378,7 @@ If tool calls aren't working well, pick a loaded model with strong tool-calling If you encounter "I'm sorry, but I cannot assist with that request" errors, try changing the content filter from **DefaultV2** to **Default** in your Azure resource. ::: -1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need: - - **Resource name**: This becomes part of your API endpoint (`https://RESOURCE_NAME.openai.azure.com/`) - - **API key**: Either `KEY 1` or `KEY 2` from your resource +1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need the **Resource name**; this becomes part of your API endpoint (`https://RESOURCE_NAME.openai.azure.com/`). 2. Go to [Azure AI Foundry](https://ai.azure.com/) and deploy a model. @@ -394,7 +392,20 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try /connect ``` -4. Enter your API key. +4. Choose an auth method. + + - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. + - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. If you chose API key, enter your API key. ```txt ┌ API key @@ -403,7 +414,7 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try └ enter ``` -5. Set your resource name as an environment variable: +6. Optional: set your resource name as an environment variable to skip the resource name prompt during `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -415,7 +426,7 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try export AZURE_RESOURCE_NAME=XXX ``` -6. Run the `/models` command to select your deployed model. +7. Run the `/models` command to select your deployed model. ```txt /models @@ -425,9 +436,7 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try ### Azure Cognitive Services -1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need: - - **Resource name**: This becomes part of your API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API key**: Either `KEY 1` or `KEY 2` from your resource +1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need the **Resource name**; this becomes part of your API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Go to [Azure AI Foundry](https://ai.azure.com/) and deploy a model. @@ -441,7 +450,20 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try /connect ``` -4. Enter your API key. +4. Choose an auth method. + + - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. + - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. If you chose API key, enter your API key. ```txt ┌ API key @@ -450,7 +472,7 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try └ enter ``` -5. Set your resource name as an environment variable: +6. Optional: set your resource name as an environment variable to skip the resource name prompt during `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -462,7 +484,7 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Run the `/models` command to select your deployed model. +7. Run the `/models` command to select your deployed model. ```txt /models diff --git a/packages/web/src/content/docs/pt-br/providers.mdx b/packages/web/src/content/docs/pt-br/providers.mdx index 174bc1679b61..f9eaa762091a 100644 --- a/packages/web/src/content/docs/pt-br/providers.mdx +++ b/packages/web/src/content/docs/pt-br/providers.mdx @@ -366,14 +366,12 @@ Se as chamadas de ferramentas não estiverem funcionando bem, escolha um modelo ### Azure OpenAI :::note -Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tente mudar o filtro de conteúdo de **DefaultV2** para **Default** em seu recurso Azure. +Se encontrar erros como "I'm sorry, but I cannot assist with that request", tente alterar o filtro de conteúdo de **DefaultV2** para **Default** no seu recurso do Azure. ::: -1. Acesse o [portal Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará: - - **Nome do recurso**: Isso se torna parte do seu endpoint da API (`https://RESOURCE_NAME.openai.azure.com/`) - - **Chave da API**: Seja `KEY 1` ou `KEY 2` do seu recurso +1. Acesse o [portal do Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará do **nome do recurso**; ele se torna parte do endpoint da API (`https://RESOURCE_NAME.openai.azure.com/`). -2. Vá para [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. +2. Acesse o [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. :::note O nome da implantação deve corresponder ao nome do modelo para que o opencode funcione corretamente. @@ -385,7 +383,20 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent /connect ``` -4. Insira sua chave da API. +4. Escolha um método de autenticação. + + - **Chave de API**: cole `KEY 1` ou `KEY 2` do seu recurso. + - **Microsoft Entra ID (OAuth via az login)**: execute `az login` primeiro. A identidade do Azure conectada deve ter a função `Cognitive Services OpenAI User` para o recurso. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Se você escolheu chave de API, insira sua chave de API. ```txt ┌ API key @@ -394,7 +405,7 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent └ enter ``` -5. Defina o nome do seu recurso como uma variável de ambiente: +6. Opcional: defina o nome do recurso como uma variável de ambiente para pular a solicitação do nome do recurso durante `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -406,7 +417,7 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent export AZURE_RESOURCE_NAME=XXX ``` -6. Execute o comando `/models` para selecionar seu modelo implantado. +7. Execute o comando `/models` para selecionar o modelo implantado. ```txt /models @@ -416,11 +427,9 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent ### Azure Cognitive Services -1. Acesse o [portal Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará: - - **Nome do recurso**: Isso se torna parte do seu endpoint da API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **Chave da API**: Seja `KEY 1` ou `KEY 2` do seu recurso +1. Acesse o [portal do Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará do **nome do recurso**; ele se torna parte do endpoint da API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. Vá para [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. +2. Acesse o [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. :::note O nome da implantação deve corresponder ao nome do modelo para que o opencode funcione corretamente. @@ -432,7 +441,20 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent /connect ``` -4. Insira sua chave da API. +4. Escolha um método de autenticação. + + - **Chave de API**: cole `KEY 1` ou `KEY 2` do seu recurso. + - **Microsoft Entra ID (OAuth via az login)**: execute `az login` primeiro. A identidade do Azure conectada deve ter a função `Cognitive Services OpenAI User` para o recurso. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Se você escolheu chave de API, insira sua chave de API. ```txt ┌ API key @@ -441,7 +463,7 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent └ enter ``` -5. Defina o nome do seu recurso como uma variável de ambiente: +6. Opcional: defina o nome do recurso como uma variável de ambiente para pular a solicitação do nome do recurso durante `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -453,7 +475,7 @@ Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tent export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Execute o comando `/models` para selecionar seu modelo implantado. +7. Execute o comando `/models` para selecionar o modelo implantado. ```txt /models diff --git a/packages/web/src/content/docs/ru/providers.mdx b/packages/web/src/content/docs/ru/providers.mdx index 39aae9e09630..4c9ffb7f987c 100644 --- a/packages/web/src/content/docs/ru/providers.mdx +++ b/packages/web/src/content/docs/ru/providers.mdx @@ -362,17 +362,15 @@ OpenCode Go — это недорогой план подписки, обесп ### Azure OpenAI :::note -Если вы столкнулись с ошибками «Извините, но я не могу помочь с этим запросом», попробуйте изменить фильтр содержимого с **DefaultV2** на **Default** в своем ресурсе Azure. +Если появляются ошибки вроде "I'm sorry, but I cannot assist with that request", попробуйте изменить фильтр содержимого с **DefaultV2** на **Default** в вашем ресурсе Azure. ::: -1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится: - - **Имя ресурса**: оно становится частью вашей конечной точки API (`https://RESOURCE_NAME.openai.azure.com/`). - - **Ключ API**: `KEY 1` или `KEY 2` из вашего ресурса. +1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится **имя ресурса**; оно станет частью вашего API endpoint (`https://RESOURCE_NAME.openai.azure.com/`). 2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель. - :::примечание - Для правильной работы opencode имя развертывания должно совпадать с именем модели. + :::note + Имя развертывания должно совпадать с именем модели, чтобы opencode работал правильно. ::: 3. Запустите команду `/connect` и найдите **Azure**. @@ -381,7 +379,19 @@ OpenCode Go — это недорогой план подписки, обесп /connect ``` -4. Введите свой ключ API. +4. Выберите способ аутентификации. + - **API-ключ**: вставьте `KEY 1` или `KEY 2` из вашего ресурса. + - **Microsoft Entra ID (OAuth через az login)**: сначала выполните `az login`. Вошедшая идентичность Azure должна иметь роль `Cognitive Services OpenAI User` для этого ресурса. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Если вы выбрали API-ключ, введите свой API-ключ. ```txt ┌ API key @@ -390,19 +400,19 @@ OpenCode Go — это недорогой план подписки, обесп └ enter ``` -5. Задайте имя ресурса как переменную среды: +6. Необязательно: задайте имя ресурса как переменную окружения, чтобы пропустить запрос имени ресурса во время `/connect`. ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Или добавьте его в свой профиль bash: + Или добавьте его в свой bash-профиль: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. Запустите команду `/models`, чтобы выбрать развернутую модель. +7. Запустите команду `/models`, чтобы выбрать развернутую модель. ```txt /models @@ -412,14 +422,12 @@ OpenCode Go — это недорогой план подписки, обесп ### Azure Cognitive Services -1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится: - - **Имя ресурса**: оно становится частью вашей конечной точки API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). - - **Ключ API**: `KEY 1` или `KEY 2` из вашего ресурса. +1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится **имя ресурса**; оно станет частью вашего API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). 2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель. - :::примечание - Для правильной работы opencode имя развертывания должно совпадать с именем модели. + :::note + Имя развертывания должно совпадать с именем модели, чтобы opencode работал правильно. ::: 3. Запустите команду `/connect` и найдите **Azure Cognitive Services**. @@ -428,7 +436,19 @@ OpenCode Go — это недорогой план подписки, обесп /connect ``` -4. Введите свой ключ API. +4. Выберите способ аутентификации. + - **API-ключ**: вставьте `KEY 1` или `KEY 2` из вашего ресурса. + - **Microsoft Entra ID (OAuth через az login)**: сначала выполните `az login`. Вошедшая идентичность Azure должна иметь роль `Cognitive Services OpenAI User` для этого ресурса. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. Если вы выбрали API-ключ, введите свой API-ключ. ```txt ┌ API key @@ -437,19 +457,19 @@ OpenCode Go — это недорогой план подписки, обесп └ enter ``` -5. Задайте имя ресурса как переменную среды: +6. Необязательно: задайте имя ресурса как переменную окружения, чтобы пропустить запрос имени ресурса во время `/connect`. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Или добавьте его в свой профиль bash: + Или добавьте его в свой bash-профиль: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Запустите команду `/models`, чтобы выбрать развернутую модель. +7. Запустите команду `/models`, чтобы выбрать развернутую модель. ```txt /models diff --git a/packages/web/src/content/docs/th/providers.mdx b/packages/web/src/content/docs/th/providers.mdx index 07008de218e2..2b3251155c1c 100644 --- a/packages/web/src/content/docs/th/providers.mdx +++ b/packages/web/src/content/docs/th/providers.mdx @@ -365,9 +365,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา หากคุณพบข้อผิดพลาด "ฉันขอโทษ แต่ฉันไม่สามารถช่วยเหลือคำขอนั้นได้" ให้ลองเปลี่ยนตัวกรองเนื้อหาจาก **DefaultV2** เป็น **Default** ในทรัพยากร Azure ของคุณ ::: -1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ: - - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://RESOURCE_NAME.openai.azure.com/`) - - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ +1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องใช้ **ชื่อทรัพยากร** ซึ่งจะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://RESOURCE_NAME.openai.azure.com/`) 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล @@ -381,7 +379,20 @@ OpenCode Go คือแผนการสมัครสมาชิกรา /connect ``` -4. ป้อน API ของคุณ +4. เลือกวิธีการยืนยันตัวตน + + - **API key**: วาง `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ + - **Microsoft Entra ID (OAuth ผ่าน az login)**: เรียกใช้ `az login` ก่อน ตัวตน Azure ที่ลงชื่อเข้าใช้ต้องมีบทบาท `Cognitive Services OpenAI User` สำหรับทรัพยากรนี้ + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. หากเลือก API key ให้ป้อน API key ของคุณ ```txt ┌ API key @@ -390,7 +401,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา └ enter ``` -5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม: +6. ไม่บังคับ: ตั้งชื่อทรัพยากรเป็นตัวแปรสภาพแวดล้อมเพื่อข้ามการถามชื่อทรัพยากรระหว่าง `/connect` ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -402,7 +413,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา export AZURE_RESOURCE_NAME=XXX ``` -6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ +7. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ ```txt /models @@ -412,9 +423,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา ### Azure Cognitive Services -1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ: - - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ +1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องใช้ **ชื่อทรัพยากร** ซึ่งจะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล @@ -428,7 +437,20 @@ OpenCode Go คือแผนการสมัครสมาชิกรา /connect ``` -4. ป้อน API ของคุณ +4. เลือกวิธีการยืนยันตัวตน + + - **API key**: วาง `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ + - **Microsoft Entra ID (OAuth ผ่าน az login)**: เรียกใช้ `az login` ก่อน ตัวตน Azure ที่ลงชื่อเข้าใช้ต้องมีบทบาท `Cognitive Services OpenAI User` สำหรับทรัพยากรนี้ + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. หากเลือก API key ให้ป้อน API key ของคุณ ```txt ┌ API key @@ -437,7 +459,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา └ enter ``` -5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม: +6. ไม่บังคับ: ตั้งชื่อทรัพยากรเป็นตัวแปรสภาพแวดล้อมเพื่อข้ามการถามชื่อทรัพยากรระหว่าง `/connect` ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -449,7 +471,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ +7. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ ```txt /models diff --git a/packages/web/src/content/docs/tr/providers.mdx b/packages/web/src/content/docs/tr/providers.mdx index 8c6ef23fee31..4719849f8cd4 100644 --- a/packages/web/src/content/docs/tr/providers.mdx +++ b/packages/web/src/content/docs/tr/providers.mdx @@ -367,9 +367,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y "Üzgünüm ama bu isteğe yardımcı olamıyorum" hatalarıyla karşılaşırsanız Azure kaynağınızda içerik filtresini **DefaultV2** yerine **Default** olarak değiştirmeyi deneyin. ::: -1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. İhtiyacınız olacak: - - **Kaynak adı**: Bu, API bitiş noktanızın (`https://RESOURCE_NAME.openai.azure.com/`) parçası olur - - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` +1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. **Kaynak adına** ihtiyacınız olacak; bu, API bitiş noktanızın (`https://RESOURCE_NAME.openai.azure.com/`) parçası olur. 2. [Azure AI Foundry](https://ai.azure.com/)'a gidin ve bir model dağıtın. @@ -383,7 +381,20 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y /connect ``` -4. API anahtarınızı girin. +4. Bir kimlik doğrulama yöntemi seçin. + + - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` değerini yapıştırın. + - **Microsoft Entra ID (az login ile OAuth)**: Önce `az login` çalıştırın. Oturum açmış Azure kimliğinin bu kaynak için `Cognitive Services OpenAI User` rolüne sahip olması gerekir. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API anahtarını seçtiyseniz API anahtarınızı girin. ```txt ┌ API key @@ -392,7 +403,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y └ enter ``` -5. Kaynak adınızı ortam değişkeni olarak ayarlayın: +6. İsteğe bağlı: `/connect` sırasında kaynak adı sorusunu atlamak için kaynak adınızı ortam değişkeni olarak ayarlayın. ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -404,7 +415,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y export AZURE_RESOURCE_NAME=XXX ``` -6. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. +7. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. ```txt /models @@ -414,9 +425,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y ### Azure Cognitive Services -1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. İhtiyacınız olacak: - - **Kaynak adı**: Bu, API bitiş noktanızın (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) parçası olur - - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` +1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. **Kaynak adına** ihtiyacınız olacak; bu, API bitiş noktanızın (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) parçası olur. 2. [Azure AI Foundry](https://ai.azure.com/)'a gidin ve bir model dağıtın. @@ -430,7 +439,20 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y /connect ``` -4. API anahtarınızı girin. +4. Bir kimlik doğrulama yöntemi seçin. + + - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` değerini yapıştırın. + - **Microsoft Entra ID (az login ile OAuth)**: Önce `az login` çalıştırın. Oturum açmış Azure kimliğinin bu kaynak için `Cognitive Services OpenAI User` rolüne sahip olması gerekir. + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. API anahtarını seçtiyseniz API anahtarınızı girin. ```txt ┌ API key @@ -439,7 +461,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y └ enter ``` -5. Kaynak adınızı ortam değişkeni olarak ayarlayın: +6. İsteğe bağlı: `/connect` sırasında kaynak adı sorusunu atlamak için kaynak adınızı ortam değişkeni olarak ayarlayın. ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -451,7 +473,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. +7. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. ```txt /models diff --git a/packages/web/src/content/docs/zh-cn/providers.mdx b/packages/web/src/content/docs/zh-cn/providers.mdx index 9c0a5d8a3bd5..f6890395d8bf 100644 --- a/packages/web/src/content/docs/zh-cn/providers.mdx +++ b/packages/web/src/content/docs/zh-cn/providers.mdx @@ -336,26 +336,37 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 ### Azure OpenAI :::note -如果遇到 "I'm sorry, but I cannot assist with that request" 错误,请尝试将 Azure 资源中的内容过滤器从 **DefaultV2** 更改为 **Default**。 +如果遇到 “I'm sorry, but I cannot assist with that request” 之类的错误,请尝试在 Azure 资源中将内容筛选器从 **DefaultV2** 更改为 **Default**。 ::: -1. 前往 [Azure 门户](https://portal.azure.com/)并创建 **Azure OpenAI** 资源。你需要: - - **资源名称**:这会成为你的 API 端点的一部分(`https://RESOURCE_NAME.openai.azure.com/`) - - **API 密钥**:资源中的 `KEY 1` 或 `KEY 2` +1. 前往 [Azure 门户](https://portal.azure.com/) 并创建 **Azure OpenAI** 资源。你需要 **资源名称**;它会成为 API 终结点的一部分 (`https://RESOURCE_NAME.openai.azure.com/`). -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署一个模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署模型。 :::note - 部署名称必须与模型名称一致,OpenCode 才能正常工作。 + 部署名称必须与模型名称匹配,opencode 才能正常工作。 ::: -3. 执行 `/connect` 命令并搜索 **Azure**。 +3. 运行 `/connect` 命令并搜索 **Azure**. ```txt /connect ``` -4. 输入你的 API 密钥。 +4. 选择身份验证方法。 + + - **API 密钥**:粘贴资源中的 `KEY 1` 或 `KEY 2`。 + - **Microsoft Entra ID(通过 az login 使用 OAuth)**:先运行 `az login`。已登录的 Azure 标识必须拥有该资源的 `Cognitive Services OpenAI User` 角色。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. 如果选择 API 密钥,请输入你的 API 密钥。 ```txt ┌ API key @@ -364,19 +375,19 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 └ enter ``` -5. 将资源名称设置为环境变量: +6. 可选:将资源名称设置为环境变量,以跳过 `/connect` 期间的资源名称提示。 ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 或者添加到你的 bash 配置文件中: + 或将其添加到 bash 配置文件: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. 执行 `/models` 命令选择你已部署的模型。 +7. 运行 `/models` 命令以选择已部署的模型。 ```txt /models @@ -386,23 +397,34 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 ### Azure Cognitive Services -1. 前往 [Azure 门户](https://portal.azure.com/)并创建 **Azure OpenAI** 资源。你需要: - - **资源名称**:这会成为你的 API 端点的一部分(`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API 密钥**:资源中的 `KEY 1` 或 `KEY 2` +1. 前往 [Azure 门户](https://portal.azure.com/) 并创建 **Azure OpenAI** 资源。你需要 **资源名称**;它会成为 API 终结点的一部分 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署一个模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署模型。 :::note - 部署名称必须与模型名称一致,OpenCode 才能正常工作。 + 部署名称必须与模型名称匹配,opencode 才能正常工作。 ::: -3. 执行 `/connect` 命令并搜索 **Azure Cognitive Services**。 +3. 运行 `/connect` 命令并搜索 **Azure Cognitive Services**. ```txt /connect ``` -4. 输入你的 API 密钥。 +4. 选择身份验证方法。 + + - **API 密钥**:粘贴资源中的 `KEY 1` 或 `KEY 2`。 + - **Microsoft Entra ID(通过 az login 使用 OAuth)**:先运行 `az login`。已登录的 Azure 标识必须拥有该资源的 `Cognitive Services OpenAI User` 角色。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. 如果选择 API 密钥,请输入你的 API 密钥。 ```txt ┌ API key @@ -411,19 +433,19 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 └ enter ``` -5. 将资源名称设置为环境变量: +6. 可选:将资源名称设置为环境变量,以跳过 `/connect` 期间的资源名称提示。 ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 或者添加到你的 bash 配置文件中: + 或将其添加到 bash 配置文件: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. 执行 `/models` 命令选择你已部署的模型。 +7. 运行 `/models` 命令以选择已部署的模型。 ```txt /models diff --git a/packages/web/src/content/docs/zh-tw/providers.mdx b/packages/web/src/content/docs/zh-tw/providers.mdx index d4e55ed712e2..fedfee6f4e95 100644 --- a/packages/web/src/content/docs/zh-tw/providers.mdx +++ b/packages/web/src/content/docs/zh-tw/providers.mdx @@ -357,26 +357,37 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 ### Azure OpenAI :::note -如果遇到 "I'm sorry, but I cannot assist with that request" 錯誤,請嘗試將 Azure 資源中的內容篩選器從 **DefaultV2** 更改為 **Default**。 +如果遇到「I'm sorry, but I cannot assist with that request」之類的錯誤,請嘗試在 Azure 資源中將內容篩選器從 **DefaultV2** 改為 **Default**。 ::: -1. 前往 [Azure 入口網站](https://portal.azure.com/)並建立 **Azure OpenAI** 資源。您需要: - - **資源名稱**:這會成為您的 API 端點的一部分(`https://RESOURCE_NAME.openai.azure.com/`) - - **API 金鑰**:資源中的 `KEY 1` 或 `KEY 2` +1. 前往 [Azure 入口網站](https://portal.azure.com/) 並建立 **Azure OpenAI** 資源。你需要 **資源名稱**;它會成為 API 端點的一部分 (`https://RESOURCE_NAME.openai.azure.com/`). -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署一個模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署模型。 :::note - 部署名稱必須與模型名稱一致,OpenCode 才能正常運作。 + 部署名稱必須與模型名稱相符,opencode 才能正常運作。 ::: -3. 執行 `/connect` 指令並搜尋 **Azure**。 +3. 執行 `/connect` 命令並搜尋 **Azure**. ```txt /connect ``` -4. 輸入您的 API 金鑰。 +4. 選擇驗證方法。 + + - **API 金鑰**:貼上資源中的 `KEY 1` 或 `KEY 2`。 + - **Microsoft Entra ID(透過 az login 使用 OAuth)**:先執行 `az login`。已登入的 Azure 身分必須擁有該資源的 `Cognitive Services OpenAI User` 角色。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. 如果選擇 API 金鑰,請輸入你的 API 金鑰。 ```txt ┌ API key @@ -385,19 +396,19 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 └ enter ``` -5. 將資源名稱設定為環境變數: +6. 選用:將資源名稱設為環境變數,以略過 `/connect` 期間的資源名稱提示。 ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 或者新增到您的 bash 設定檔中: + 或將它加入你的 bash 設定檔: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -6. 執行 `/models` 指令選擇您已部署的模型。 +7. 執行 `/models` 命令以選擇已部署的模型。 ```txt /models @@ -407,23 +418,34 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 ### Azure Cognitive Services -1. 前往 [Azure 入口網站](https://portal.azure.com/)並建立 **Azure OpenAI** 資源。您需要: - - **資源名稱**:這會成為您的 API 端點的一部分(`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) - - **API 金鑰**:資源中的 `KEY 1` 或 `KEY 2` +1. 前往 [Azure 入口網站](https://portal.azure.com/) 並建立 **Azure OpenAI** 資源。你需要 **資源名稱**;它會成為 API 端點的一部分 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署一個模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署模型。 :::note - 部署名稱必須與模型名稱一致,OpenCode 才能正常運作。 + 部署名稱必須與模型名稱相符,opencode 才能正常運作。 ::: -3. 執行 `/connect` 指令並搜尋 **Azure Cognitive Services**。 +3. 執行 `/connect` 命令並搜尋 **Azure Cognitive Services**. ```txt /connect ``` -4. 輸入您的 API 金鑰。 +4. 選擇驗證方法。 + + - **API 金鑰**:貼上資源中的 `KEY 1` 或 `KEY 2`。 + - **Microsoft Entra ID(透過 az login 使用 OAuth)**:先執行 `az login`。已登入的 Azure 身分必須擁有該資源的 `Cognitive Services OpenAI User` 角色。 + + ```txt + ┌ Select auth method + │ + │ API key + │ Microsoft Entra ID (OAuth via az login) + └ + ``` + +5. 如果選擇 API 金鑰,請輸入你的 API 金鑰。 ```txt ┌ API key @@ -432,19 +454,19 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 └ enter ``` -5. 將資源名稱設定為環境變數: +6. 選用:將資源名稱設為環境變數,以略過 `/connect` 期間的資源名稱提示。 ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 或者新增到您的 bash 設定檔中: + 或將它加入你的 bash 設定檔: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -6. 執行 `/models` 指令選擇您已部署的模型。 +7. 執行 `/models` 命令以選擇已部署的模型。 ```txt /models From db43ee0b0582bdd2cf44f0c4d38a0e9c0a08a7eb Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Tue, 16 Jun 2026 16:00:21 +0200 Subject: [PATCH 03/11] docs: revert localized provider updates --- .../web/src/content/docs/ar/providers.mdx | 60 ++++------ .../web/src/content/docs/bs/providers.mdx | 104 +++++++----------- .../web/src/content/docs/da/providers.mdx | 60 ++++------ .../web/src/content/docs/de/providers.mdx | 64 ++++------- .../web/src/content/docs/es/providers.mdx | 46 ++------ .../web/src/content/docs/fr/providers.mdx | 64 ++++------- .../web/src/content/docs/it/providers.mdx | 56 +++------- .../web/src/content/docs/ja/providers.mdx | 76 +++++-------- .../web/src/content/docs/ko/providers.mdx | 64 ++++------- .../web/src/content/docs/nb/providers.mdx | 56 +++------- .../web/src/content/docs/pl/providers.mdx | 56 +++------- .../web/src/content/docs/pt-br/providers.mdx | 52 +++------ .../web/src/content/docs/ru/providers.mdx | 58 ++++------ .../web/src/content/docs/th/providers.mdx | 46 ++------ .../web/src/content/docs/tr/providers.mdx | 46 ++------ .../web/src/content/docs/zh-cn/providers.mdx | 64 ++++------- .../web/src/content/docs/zh-tw/providers.mdx | 64 ++++------- 17 files changed, 332 insertions(+), 704 deletions(-) diff --git a/packages/web/src/content/docs/ar/providers.mdx b/packages/web/src/content/docs/ar/providers.mdx index ddd1af9fa0a6..c4812fe5d5ee 100644 --- a/packages/web/src/content/docs/ar/providers.mdx +++ b/packages/web/src/content/docs/ar/providers.mdx @@ -360,15 +360,17 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص ### Azure OpenAI :::note -إذا واجهت أخطاء مثل "أنا آسف، لكن لا يمكنني المساعدة في هذا الطلب"، فجرّب تغيير عامل تصفية المحتوى من **DefaultV2** إلى **Default** في مورد Azure الخاص بك. +إذا واجهت أخطاء "I'm sorry, but I cannot assist with that request"، فجرّب تغيير مرشح المحتوى من **DefaultV2** إلى **Default** في مورد Azure الخاص بك. ::: -1. انتقل إلى [مدخل Azure](https://portal.azure.com/) وأنشئ مورد **Azure OpenAI**. ستحتاج إلى **اسم المورد**؛ ويصبح هذا جزءًا من نقطة نهاية API الخاصة بك (`https://RESOURCE_NAME.openai.azure.com/`). +1. توجّه إلى [Azure portal](https://portal.azure.com/) وأنشئ موردا من نوع **Azure OpenAI**. ستحتاج إلى: + - **Resource name**: يصبح جزءا من نقطة نهاية API لديك (`https://RESOURCE_NAME.openai.azure.com/`) + - **API key**: إما `KEY 1` أو `KEY 2` من موردك -2. انتقل إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجًا. +2. اذهب إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجا. :::note - يجب أن يتطابق اسم النشر مع اسم النموذج حتى يعمل opencode بشكل صحيح. + يجب أن يطابق اسم النشر اسم النموذج كي يعمل opencode بشكل صحيح. ::: 3. شغّل الأمر `/connect` وابحث عن **Azure**. @@ -377,20 +379,7 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص /connect ``` -4. اختر طريقة المصادقة. - - - **مفتاح API**: الصق `KEY 1` أو `KEY 2` من موردك. - - **Microsoft Entra ID (OAuth عبر az login)**: شغّل `az login` أولًا. يجب أن تكون هوية Azure التي سجّلت الدخول بها مالكة لدور `Cognitive Services OpenAI User` لهذا المورد. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. إذا اخترت مفتاح API، فأدخل مفتاح API الخاص بك. +4. أدخل مفتاح API. ```txt ┌ API key @@ -399,19 +388,19 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص └ enter ``` -6. اختياري: عيّن اسم المورد كمتغير بيئة لتخطي طلب اسم المورد أثناء `/connect`. +5. عيّن اسم المورد كمتغير بيئة: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - أو أضفه إلى ملف تعريف bash الخاص بك: + أو أضفه إلى bash profile: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. شغّل الأمر `/models` لتحديد النموذج المنشور. +6. شغّل الأمر `/models` لاختيار النموذج الذي قمت بنشره. ```txt /models @@ -421,12 +410,14 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص ### Azure Cognitive Services -1. انتقل إلى [مدخل Azure](https://portal.azure.com/) وأنشئ مورد **Azure OpenAI**. ستحتاج إلى **اسم المورد**؛ ويصبح هذا جزءًا من نقطة نهاية API الخاصة بك (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. توجّه إلى [Azure portal](https://portal.azure.com/) وأنشئ موردا من نوع **Azure OpenAI**. ستحتاج إلى: + - **Resource name**: يصبح جزءا من نقطة نهاية API لديك (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API key**: إما `KEY 1` أو `KEY 2` من موردك -2. انتقل إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجًا. +2. اذهب إلى [Azure AI Foundry](https://ai.azure.com/) وانشر نموذجا. :::note - يجب أن يتطابق اسم النشر مع اسم النموذج حتى يعمل opencode بشكل صحيح. + يجب أن يطابق اسم النشر اسم النموذج كي يعمل opencode بشكل صحيح. ::: 3. شغّل الأمر `/connect` وابحث عن **Azure Cognitive Services**. @@ -435,20 +426,7 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص /connect ``` -4. اختر طريقة المصادقة. - - - **مفتاح API**: الصق `KEY 1` أو `KEY 2` من موردك. - - **Microsoft Entra ID (OAuth عبر az login)**: شغّل `az login` أولًا. يجب أن تكون هوية Azure التي سجّلت الدخول بها مالكة لدور `Cognitive Services OpenAI User` لهذا المورد. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. إذا اخترت مفتاح API، فأدخل مفتاح API الخاص بك. +4. أدخل مفتاح API. ```txt ┌ API key @@ -457,19 +435,19 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص └ enter ``` -6. اختياري: عيّن اسم المورد كمتغير بيئة لتخطي طلب اسم المورد أثناء `/connect`. +5. عيّن اسم المورد كمتغير بيئة: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - أو أضفه إلى ملف تعريف bash الخاص بك: + أو أضفه إلى bash profile: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. شغّل الأمر `/models` لتحديد النموذج المنشور. +6. شغّل الأمر `/models` لاختيار النموذج الذي قمت بنشره. ```txt /models diff --git a/packages/web/src/content/docs/bs/providers.mdx b/packages/web/src/content/docs/bs/providers.mdx index 3f9924b32ebc..f6e54fc6ad15 100644 --- a/packages/web/src/content/docs/bs/providers.mdx +++ b/packages/web/src/content/docs/bs/providers.mdx @@ -365,120 +365,98 @@ Ako pozivi alata ne rade dobro, odaberite učitani model sa jakom podrškom za t ### Azure OpenAI :::note -Ako naiđete na greške "Žao mi je, ali ne mogu pomoći s tim zahtjevom", pokušajte promijeniti filter sadržaja sa **DefaultV2** na **Default** u svom Azure resursu. +Ako naiđete na greške "Žao mi je, ali ne mogu pomoći s tim zahtjevom", pokušajte promijeniti filter sadržaja iz **DefaultV2** u **Default** u vašem Azure resursu. ::: -1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. Trebat će vam **naziv resursa**; on postaje dio vašeg API endpointa (`https://RESOURCE_NAME.openai.azure.com/`). +1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. trebat će vam: + - **Naziv resursa**: Ovo postaje dio vaše krajnje tačke API-ja (`https://RESOURCE_NAME.openai.azure.com/`) + - **API ključ**: Ili `KEY 1` ili `KEY 2` sa vašeg izvora -2. Idite na [Azure AI Foundry](https://ai.azure.com/) i deployajte model. +2. Idite na [Azure AI Foundry](https://ai.azure.com/) i implementirajte model. :::note - Naziv deploymenta mora odgovarati nazivu modela da bi opencode ispravno radio. + Ime implementacije mora odgovarati imenu modela da bi opencode ispravno radio. ::: -3. Pokrenite komandu `/connect` i potražite **Azure**. +3. Pokrenite naredbu `/connect` i potražite **Azure**. - ```txt +```txt /connect - ``` - -4. Odaberite način autentifikacije. - - - **API ključ**: zalijepite `KEY 1` ili `KEY 2` iz svog resursa. - - **Microsoft Entra ID (OAuth preko az login)**: prvo pokrenite `az login`. Prijavljeni Azure identitet mora imati ulogu `Cognitive Services OpenAI User` za taj resurs. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` +``` -5. Ako ste odabrali API ključ, unesite svoj API ključ. +4. Unesite svoj API ključ. - ```txt +```txt ┌ API key │ │ └ enter - ``` +``` -6. Opcionalno: postavite naziv resursa kao varijablu okruženja da preskočite pitanje za naziv resursa tokom `/connect`. +5. Postavite ime vašeg resursa kao varijablu okruženja: - ```bash +```bash AZURE_RESOURCE_NAME=XXX opencode - ``` +``` - Ili ga dodajte u svoj bash profil: +Ili ga dodajte na svoj bash profil: - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX - ``` +``` -7. Pokrenite komandu `/models` da odaberete deployani model. +6. Pokrenite naredbu `/models` da odaberete svoj raspoređeni model. - ```txt +```txt /models - ``` +``` --- ### Azure Cognitive Services -1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. Trebat će vam **naziv resursa**; on postaje dio vašeg API endpointa (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Idite na [Azure portal](https://portal.azure.com/) i kreirajte **Azure OpenAI** resurs. trebat će vam: + - **Naziv resursa**: Ovo postaje dio vaše krajnje tačke API-ja (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API ključ**: Ili `KEY 1` ili `KEY 2` sa vašeg izvora -2. Idite na [Azure AI Foundry](https://ai.azure.com/) i deployajte model. +2. Idite na [Azure AI Foundry](https://ai.azure.com/) i implementirajte model. :::note - Naziv deploymenta mora odgovarati nazivu modela da bi opencode ispravno radio. + Ime implementacije mora odgovarati imenu modela da bi opencode ispravno radio. ::: -3. Pokrenite komandu `/connect` i potražite **Azure Cognitive Services**. +3. Pokrenite naredbu `/connect` i potražite **Azure kognitivne usluge**. - ```txt +```txt /connect - ``` - -4. Odaberite način autentifikacije. - - - **API ključ**: zalijepite `KEY 1` ili `KEY 2` iz svog resursa. - - **Microsoft Entra ID (OAuth preko az login)**: prvo pokrenite `az login`. Prijavljeni Azure identitet mora imati ulogu `Cognitive Services OpenAI User` za taj resurs. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` +``` -5. Ako ste odabrali API ključ, unesite svoj API ključ. +4. Unesite svoj API ključ. - ```txt +```txt ┌ API key │ │ └ enter - ``` +``` -6. Opcionalno: postavite naziv resursa kao varijablu okruženja da preskočite pitanje za naziv resursa tokom `/connect`. +5. Postavite ime vašeg resursa kao varijablu okruženja: - ```bash +```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode - ``` +``` - Ili ga dodajte u svoj bash profil: +Ili ga dodajte na svoj bash profil: - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX - ``` +``` -7. Pokrenite komandu `/models` da odaberete deployani model. +6. Pokrenite naredbu `/models` da odaberete svoj raspoređeni model. - ```txt +```txt /models - ``` +``` --- diff --git a/packages/web/src/content/docs/da/providers.mdx b/packages/web/src/content/docs/da/providers.mdx index 1f5bf12ab7ae..9b04d6be82f9 100644 --- a/packages/web/src/content/docs/da/providers.mdx +++ b/packages/web/src/content/docs/da/providers.mdx @@ -356,15 +356,17 @@ Hvis værktøjskald ikke fungerer godt, så vælg en indlæst model med god tool ### Azure OpenAI :::note -Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du prøve at ændre indholdsfilteret fra **DefaultV2** til **Default** i din Azure-ressource. +Hvis du støder på "Beklager, men jeg kan ikke hjælpe med den anmodning"-fejl, kan du prøve at ændre indholdsfilteret fra **DefaultV2** til **Default** i Azure-ressourcen. ::: -1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge **ressourcenavnet**; det bliver en del af dit API-endpoint (`https://RESOURCE_NAME.openai.azure.com/`). +1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge: + - **Ressourcenavn**: Dette bliver en del af API-endpointet (`https://RESOURCE_NAME.openai.azure.com/`) + - **API-nøgle**: Enten `KEY 1` eller `KEY 2` fra din ressource -2. Gå til [Azure AI Foundry](https://ai.azure.com/) og udrul en model. +2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en model. :::note - Udrulningsnavnet skal matche modelnavnet, for at opencode fungerer korrekt. + Distributionsnavnet skal matche modelnavnet for at opencode skal fungere korrekt. ::: 3. Kør kommandoen `/connect` og søg efter **Azure**. @@ -373,20 +375,7 @@ Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du /connect ``` -4. Vælg en godkendelsesmetode. - - - **API-nøgle**: indsæt `KEY 1` eller `KEY 2` fra din ressource. - - **Microsoft Entra ID (OAuth via az login)**: kør først `az login`. Den indloggede Azure-identitet skal have rollen `Cognitive Services OpenAI User` for ressourcen. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Hvis du valgte API-nøgle, skal du indtaste din API-nøgle. +4. Indtast API-nøglen. ```txt ┌ API key @@ -395,19 +384,19 @@ Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du └ enter ``` -6. Valgfrit: angiv ressourcenavnet som en miljøvariabel for at springe prompten om ressourcenavn over under `/connect`. +5. Angiv dit ressourcenavn som en miljøvariabel: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Eller føj det til din bash-profil: + Eller tilføj den til din bash-profil: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. Kør kommandoen `/models` for at vælge din udrullede model. +6. Kør kommandoen `/models` for at vælge den distribuerede model. ```txt /models @@ -417,12 +406,14 @@ Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du ### Azure Cognitive Services -1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge **ressourcenavnet**; det bliver en del af dit API-endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Gå til [Azure-portalen](https://portal.azure.com/) og opret en **Azure OpenAI**-ressource. Du skal bruge: + - **Ressourcenavn**: Dette bliver en del af API-endpointet (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API-nøgle**: Enten `KEY 1` eller `KEY 2` fra din ressource -2. Gå til [Azure AI Foundry](https://ai.azure.com/) og udrul en model. +2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en model. :::note - Udrulningsnavnet skal matche modelnavnet, for at opencode fungerer korrekt. + Distributionsnavnet skal matche modelnavnet for at opencode skal fungere korrekt. ::: 3. Kør kommandoen `/connect` og søg efter **Azure Cognitive Services**. @@ -431,20 +422,7 @@ Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du /connect ``` -4. Vælg en godkendelsesmetode. - - - **API-nøgle**: indsæt `KEY 1` eller `KEY 2` fra din ressource. - - **Microsoft Entra ID (OAuth via az login)**: kør først `az login`. Den indloggede Azure-identitet skal have rollen `Cognitive Services OpenAI User` for ressourcen. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Hvis du valgte API-nøgle, skal du indtaste din API-nøgle. +4. Indtast API-nøglen. ```txt ┌ API key @@ -453,19 +431,19 @@ Hvis du får fejl som "I'm sorry, but I cannot assist with that request", kan du └ enter ``` -6. Valgfrit: angiv ressourcenavnet som en miljøvariabel for at springe prompten om ressourcenavn over under `/connect`. +5. Angiv dit ressourcenavn som en miljøvariabel: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Eller føj det til din bash-profil: + Eller tilføj den til din bash-profil: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Kør kommandoen `/models` for at vælge din udrullede model. +6. Kør kommandoen `/models` for at vælge den distribuerede model. ```txt /models diff --git a/packages/web/src/content/docs/de/providers.mdx b/packages/web/src/content/docs/de/providers.mdx index 4a652a678cca..92981469309c 100644 --- a/packages/web/src/content/docs/de/providers.mdx +++ b/packages/web/src/content/docs/de/providers.mdx @@ -362,37 +362,26 @@ Wenn Tool-Aufrufe nicht zuverlässig funktionieren, wählen Sie ein geladenes Mo ### Azure OpenAI :::note -Wenn Fehler wie "I'm sorry, but I cannot assist with that request" auftreten, ändere in deiner Azure-Ressource den Inhaltsfilter von **DefaultV2** auf **Default**. +Wenn Sie auf die Fehlermeldung „Es tut mir leid, aber ich kann Ihnen bei dieser Anfrage nicht weiterhelfen“ stoßen, versuchen Sie, den Inhaltsfilter in Ihrer Azure-Ressource von **DefaultV2** in **Default** zu ändern. ::: -1. Gehe zum [Azure-Portal](https://portal.azure.com/) und erstelle eine **Azure OpenAI**-Ressource. Du benötigst den **Ressourcennamen**; er wird Teil deines API-Endpunkts (`https://RESOURCE_NAME.openai.azure.com/`). +1. Gehen Sie zu [Azure portal](https://portal.azure.com/) und erstellen Sie eine **Azure OpenAI**-Ressource. Sie benötigen: + - **Ressourcenname**: Dies wird Teil Ihres API-Endpunkts (`https://RESOURCE_NAME.openai.azure.com/`) + - **API-Schlüssel**: Entweder `KEY 1` oder `KEY 2` aus Ihrer Ressource -2. Gehe zu [Azure AI Foundry](https://ai.azure.com/) und stelle ein Modell bereit. +2. Gehen Sie zu [Azure AI Foundry](https://ai.azure.com/) und stellen Sie ein Modell bereit. :::note - Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit opencode korrekt funktioniert. + Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit OpenCode ordnungsgemäß funktioniert. ::: -3. Führe den Befehl `/connect` aus und suche nach **Azure**. +3. Führen Sie den Befehl `/connect` aus und suchen Sie nach **Azure**. ```txt /connect ``` -4. Wähle eine Authentifizierungsmethode. - - - **API-Schlüssel**: Füge `KEY 1` oder `KEY 2` aus deiner Ressource ein. - - **Microsoft Entra ID (OAuth über az login)**: Führe zuerst `az login` aus. Die angemeldete Azure-Identität muss für die Ressource die Rolle `Cognitive Services OpenAI User` haben. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Wenn du API-Schlüssel gewählt hast, gib deinen API-Schlüssel ein. +4. Geben Sie Ihren API-Schlüssel ein. ```txt ┌ API key @@ -401,19 +390,19 @@ Wenn Fehler wie "I'm sorry, but I cannot assist with that request" auftreten, ä └ enter ``` -6. Optional: Lege den Ressourcennamen als Umgebungsvariable fest, um die Abfrage des Ressourcennamens während `/connect` zu überspringen. +5. Legen Sie Ihren Ressourcennamen als Umgebungsvariable fest: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Oder füge ihn deinem Bash-Profil hinzu: + Oder fügen Sie es Ihrem Bash-Profil hinzu: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. Führe den Befehl `/models` aus, um dein bereitgestelltes Modell auszuwählen. +6. Führen Sie den Befehl `/models` aus, um Ihr bereitgestelltes Modell auszuwählen. ```txt /models @@ -423,34 +412,23 @@ Wenn Fehler wie "I'm sorry, but I cannot assist with that request" auftreten, ä ### Azure Cognitive Services -1. Gehe zum [Azure-Portal](https://portal.azure.com/) und erstelle eine **Azure OpenAI**-Ressource. Du benötigst den **Ressourcennamen**; er wird Teil deines API-Endpunkts (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Gehen Sie zu [Azure portal](https://portal.azure.com/) und erstellen Sie eine **Azure OpenAI**-Ressource. Sie benötigen: + - **Ressourcenname**: Dies wird Teil Ihres API-Endpunkts (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API-Schlüssel**: Entweder `KEY 1` oder `KEY 2` aus Ihrer Ressource -2. Gehe zu [Azure AI Foundry](https://ai.azure.com/) und stelle ein Modell bereit. +2. Gehen Sie zu [Azure AI Foundry](https://ai.azure.com/) und stellen Sie ein Modell bereit. :::note - Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit opencode korrekt funktioniert. + Der Bereitstellungsname muss mit dem Modellnamen übereinstimmen, damit OpenCode ordnungsgemäß funktioniert. ::: -3. Führe den Befehl `/connect` aus und suche nach **Azure Cognitive Services**. +3. Führen Sie den Befehl `/connect` aus und suchen Sie nach **Azure Cognitive Services**. ```txt /connect ``` -4. Wähle eine Authentifizierungsmethode. - - - **API-Schlüssel**: Füge `KEY 1` oder `KEY 2` aus deiner Ressource ein. - - **Microsoft Entra ID (OAuth über az login)**: Führe zuerst `az login` aus. Die angemeldete Azure-Identität muss für die Ressource die Rolle `Cognitive Services OpenAI User` haben. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Wenn du API-Schlüssel gewählt hast, gib deinen API-Schlüssel ein. +4. Geben Sie Ihren API-Schlüssel ein. ```txt ┌ API key @@ -459,19 +437,19 @@ Wenn Fehler wie "I'm sorry, but I cannot assist with that request" auftreten, ä └ enter ``` -6. Optional: Lege den Ressourcennamen als Umgebungsvariable fest, um die Abfrage des Ressourcennamens während `/connect` zu überspringen. +5. Legen Sie Ihren Ressourcennamen als Umgebungsvariable fest: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Oder füge ihn deinem Bash-Profil hinzu: + Oder fügen Sie es Ihrem Bash-Profil hinzu: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Führe den Befehl `/models` aus, um dein bereitgestelltes Modell auszuwählen. +6. Führen Sie den Befehl `/models` aus, um Ihr bereitgestelltes Modell auszuwählen. ```txt /models diff --git a/packages/web/src/content/docs/es/providers.mdx b/packages/web/src/content/docs/es/providers.mdx index 6f7a3820d664..11489609bc64 100644 --- a/packages/web/src/content/docs/es/providers.mdx +++ b/packages/web/src/content/docs/es/providers.mdx @@ -366,7 +366,9 @@ Si las llamadas a herramientas no funcionan bien, elige un modelo cargado con bu Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud", intente cambiar el filtro de contenido de **DefaultV2** a **Default** en su recurso de Azure. ::: -1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitará el **nombre del recurso**; este pasa a formar parte de su punto final API (`https://RESOURCE_NAME.openai.azure.com/`). +1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitarás: + - **Nombre del recurso**: esto pasa a formar parte de su punto final API (`https://RESOURCE_NAME.openai.azure.com/`) + - **Clave API**: `KEY 1` o `KEY 2` de su recurso 2. Vaya a [Azure AI Foundry](https://ai.azure.com/) e implemente un modelo. @@ -380,20 +382,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud /connect ``` -4. Elija un método de autenticación. - - - **Clave API**: pegue `KEY 1` o `KEY 2` de su recurso. - - **Microsoft Entra ID (OAuth mediante az login)**: primero ejecute `az login`. La identidad de Azure con la sesión iniciada debe tener el rol `Cognitive Services OpenAI User` para el recurso. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Si eligió clave API, ingrese su clave API. +4. Ingrese su clave API. ```txt ┌ API key @@ -402,7 +391,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud └ enter ``` -6. Opcional: configure el nombre del recurso como una variable de entorno para omitir la solicitud del nombre del recurso durante `/connect`. +5. Configure el nombre de su recurso como una variable de entorno: ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -414,7 +403,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud export AZURE_RESOURCE_NAME=XXX ``` -7. Ejecute el comando `/models` para seleccionar su modelo implementado. +6. Ejecute el comando `/models` para seleccionar su modelo implementado. ```txt /models @@ -424,7 +413,9 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud ### Servicios cognitivos de Azure -1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitará el **nombre del recurso**; este pasa a formar parte de su punto final API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Diríjase al [portal de Azure](https://portal.azure.com/) y cree un recurso **Azure OpenAI**. Necesitarás: + - **Nombre del recurso**: esto pasa a formar parte de su punto final API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **Clave API**: `KEY 1` o `KEY 2` de su recurso 2. Vaya a [Azure AI Foundry](https://ai.azure.com/) e implemente un modelo. @@ -438,20 +429,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud /connect ``` -4. Elija un método de autenticación. - - - **Clave API**: pegue `KEY 1` o `KEY 2` de su recurso. - - **Microsoft Entra ID (OAuth mediante az login)**: primero ejecute `az login`. La identidad de Azure con la sesión iniciada debe tener el rol `Cognitive Services OpenAI User` para el recurso. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Si eligió clave API, ingrese su clave API. +4. Ingrese su clave API. ```txt ┌ API key @@ -460,7 +438,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud └ enter ``` -6. Opcional: configure el nombre del recurso como una variable de entorno para omitir la solicitud del nombre del recurso durante `/connect`. +5. Configure el nombre de su recurso como una variable de entorno: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -472,7 +450,7 @@ Si encuentra errores del tipo "Lo siento, pero no puedo ayudar con esa solicitud export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Ejecute el comando `/models` para seleccionar su modelo implementado. +6. Ejecute el comando `/models` para seleccionar su modelo implementado. ```txt /models diff --git a/packages/web/src/content/docs/fr/providers.mdx b/packages/web/src/content/docs/fr/providers.mdx index 26fdf4621a36..90bdb1fbc304 100644 --- a/packages/web/src/content/docs/fr/providers.mdx +++ b/packages/web/src/content/docs/fr/providers.mdx @@ -366,15 +366,17 @@ Si les appels d'outils ne fonctionnent pas bien, choisissez un modèle chargé a ### Azure OpenAI :::note -Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that request", essayez de remplacer le filtre de contenu **DefaultV2** par **Default** dans votre ressource Azure. +Si vous rencontrez des erreurs « Je suis désolé, mais je ne peux pas vous aider avec cette demande », essayez de modifier le filtre de contenu de **DefaultV2** à **Default** dans votre ressource Azure. ::: -1. Accédez au [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin du **nom de la ressource** ; il fera partie de votre point de terminaison API (`https://RESOURCE_NAME.openai.azure.com/`). +1. Rendez-vous sur le [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin de : + - **Nom de la ressource** : cela fait partie de votre point de terminaison API (`https://RESOURCE_NAME.openai.azure.com/`) + - **Clé API** : soit `KEY 1` ou `KEY 2` de votre ressource 2. Accédez à [Azure AI Foundry](https://ai.azure.com/) et déployez un modèle. :::note - Le nom du déploiement doit correspondre au nom du modèle pour qu’opencode fonctionne correctement. + Le nom du déploiement doit correspondre au nom du modèle pour que opencode fonctionne correctement. ::: 3. Exécutez la commande `/connect` et recherchez **Azure**. @@ -383,20 +385,7 @@ Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that /connect ``` -4. Choisissez une méthode d’authentification. - - - **Clé API** : collez `KEY 1` ou `KEY 2` depuis votre ressource. - - **Microsoft Entra ID (OAuth via az login)** : exécutez d’abord `az login`. L’identité Azure connectée doit disposer du rôle `Cognitive Services OpenAI User` pour la ressource. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Si vous avez choisi la clé API, saisissez votre clé API. +4. Entrez votre clé API. ```txt ┌ API key @@ -405,19 +394,19 @@ Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that └ enter ``` -6. Facultatif : définissez le nom de la ressource comme variable d’environnement pour ignorer la demande du nom de ressource pendant `/connect`. +5. Définissez le nom de votre ressource comme variable d'environnement : ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Ou ajoutez-le à votre profil bash : +Ou ajoutez-le à votre profil bash : - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX - ``` +``` -7. Exécutez la commande `/models` pour sélectionner votre modèle déployé. +6. Exécutez la commande `/models` pour sélectionner votre modèle déployé. ```txt /models @@ -427,12 +416,14 @@ Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that ### Azure Cognitive Services -1. Accédez au [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin du **nom de la ressource** ; il fera partie de votre point de terminaison API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Rendez-vous sur le [portail Azure](https://portal.azure.com/) et créez une ressource **Azure OpenAI**. Vous aurez besoin de : + - **Nom de la ressource** : cela fait partie de votre point de terminaison API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **Clé API** : soit `KEY 1` ou `KEY 2` de votre ressource 2. Accédez à [Azure AI Foundry](https://ai.azure.com/) et déployez un modèle. :::note - Le nom du déploiement doit correspondre au nom du modèle pour qu’opencode fonctionne correctement. + Le nom du déploiement doit correspondre au nom du modèle pour que opencode fonctionne correctement. ::: 3. Exécutez la commande `/connect` et recherchez **Azure Cognitive Services**. @@ -441,20 +432,7 @@ Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that /connect ``` -4. Choisissez une méthode d’authentification. - - - **Clé API** : collez `KEY 1` ou `KEY 2` depuis votre ressource. - - **Microsoft Entra ID (OAuth via az login)** : exécutez d’abord `az login`. L’identité Azure connectée doit disposer du rôle `Cognitive Services OpenAI User` pour la ressource. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Si vous avez choisi la clé API, saisissez votre clé API. +4. Entrez votre clé API. ```txt ┌ API key @@ -463,19 +441,19 @@ Si vous rencontrez des erreurs du type "I'm sorry, but I cannot assist with that └ enter ``` -6. Facultatif : définissez le nom de la ressource comme variable d’environnement pour ignorer la demande du nom de ressource pendant `/connect`. +5. Définissez le nom de votre ressource comme variable d'environnement : ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Ou ajoutez-le à votre profil bash : +Ou ajoutez-le à votre profil bash : - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX - ``` +``` -7. Exécutez la commande `/models` pour sélectionner votre modèle déployé. +6. Exécutez la commande `/models` pour sélectionner votre modèle déployé. ```txt /models diff --git a/packages/web/src/content/docs/it/providers.mdx b/packages/web/src/content/docs/it/providers.mdx index 99eb6df59b2e..f2d195d7218b 100644 --- a/packages/web/src/content/docs/it/providers.mdx +++ b/packages/web/src/content/docs/it/providers.mdx @@ -340,15 +340,17 @@ Se le chiamate agli strumenti non funzionano bene, scegli un modello caricato co ### Azure OpenAI :::note -Se incontri errori come "I'm sorry, but I cannot assist with that request", prova a cambiare il filtro dei contenuti da **DefaultV2** a **Default** nella tua risorsa Azure. +Se incontri errori "I'm sorry, but I cannot assist with that request", prova a cambiare il filtro contenuti da **DefaultV2** a **Default** nella tua risorsa Azure. ::: -1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti servirà il **nome della risorsa**; diventa parte del tuo endpoint API (`https://RESOURCE_NAME.openai.azure.com/`). +1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti serviranno: + - **Resource name**: Diventa parte del tuo endpoint API (`https://RESOURCE_NAME.openai.azure.com/`) + - **API key**: O `KEY 1` o `KEY 2` dalla tua risorsa -2. Vai ad [Azure AI Foundry](https://ai.azure.com/) e distribuisci un modello. +2. Vai su [Azure AI Foundry](https://ai.azure.com/) e fai il deploy di un modello. :::note - Il nome della distribuzione deve corrispondere al nome del modello affinché opencode funzioni correttamente. + Il nome del deployment deve corrispondere al nome del modello affinché opencode funzioni correttamente. ::: 3. Esegui il comando `/connect` e cerca **Azure**. @@ -357,20 +359,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov /connect ``` -4. Scegli un metodo di autenticazione. - - - **Chiave API**: incolla `KEY 1` o `KEY 2` dalla tua risorsa. - - **Microsoft Entra ID (OAuth tramite az login)**: esegui prima `az login`. L’identità Azure connessa deve avere il ruolo `Cognitive Services OpenAI User` per la risorsa. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Se hai scelto la chiave API, inserisci la tua chiave API. +4. Inserisci la tua chiave API. ```txt ┌ API key @@ -379,7 +368,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov └ enter ``` -6. Opzionale: imposta il nome della risorsa come variabile d’ambiente per saltare la richiesta del nome della risorsa durante `/connect`. +5. Imposta il nome della risorsa come variabile d'ambiente: ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -391,7 +380,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov export AZURE_RESOURCE_NAME=XXX ``` -7. Esegui il comando `/models` per selezionare il modello distribuito. +6. Esegui il comando `/models` per selezionare il tuo modello deployato. ```txt /models @@ -401,12 +390,14 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov ### Azure Cognitive Services -1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti servirà il **nome della risorsa**; diventa parte del tuo endpoint API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Vai al [portale Azure](https://portal.azure.com/) e crea una risorsa **Azure OpenAI**. Ti serviranno: + - **Resource name**: Diventa parte del tuo endpoint API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API key**: O `KEY 1` o `KEY 2` dalla tua risorsa -2. Vai ad [Azure AI Foundry](https://ai.azure.com/) e distribuisci un modello. +2. Vai su [Azure AI Foundry](https://ai.azure.com/) e fai il deploy di un modello. :::note - Il nome della distribuzione deve corrispondere al nome del modello affinché opencode funzioni correttamente. + Il nome del deployment deve corrispondere al nome del modello affinché opencode funzioni correttamente. ::: 3. Esegui il comando `/connect` e cerca **Azure Cognitive Services**. @@ -415,20 +406,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov /connect ``` -4. Scegli un metodo di autenticazione. - - - **Chiave API**: incolla `KEY 1` o `KEY 2` dalla tua risorsa. - - **Microsoft Entra ID (OAuth tramite az login)**: esegui prima `az login`. L’identità Azure connessa deve avere il ruolo `Cognitive Services OpenAI User` per la risorsa. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Se hai scelto la chiave API, inserisci la tua chiave API. +4. Inserisci la tua chiave API. ```txt ┌ API key @@ -437,7 +415,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov └ enter ``` -6. Opzionale: imposta il nome della risorsa come variabile d’ambiente per saltare la richiesta del nome della risorsa durante `/connect`. +5. Imposta il nome della risorsa come variabile d'ambiente: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -449,7 +427,7 @@ Se incontri errori come "I'm sorry, but I cannot assist with that request", prov export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Esegui il comando `/models` per selezionare il modello distribuito. +6. Esegui il comando `/models` per selezionare il tuo modello deployato. ```txt /models diff --git a/packages/web/src/content/docs/ja/providers.mdx b/packages/web/src/content/docs/ja/providers.mdx index 6dacec905a68..c969c6d4a0de 100644 --- a/packages/web/src/content/docs/ja/providers.mdx +++ b/packages/web/src/content/docs/ja/providers.mdx @@ -370,37 +370,26 @@ opencode は、OpenAI 互換の API サーバーの背後でローカル LLM を ### Azure OpenAI :::note -「I'm sorry, but I cannot assist with that request」のようなエラーが発生する場合は、Azure リソースのコンテンツ フィルターを **DefaultV2** から **Default** に変更してみてください。 +「申し訳ありませんが、そのリクエストには対応できません」エラーが発生した場合は、Azure リソースのコンテンツフィルターを **DefaultV2** から **Default** に変更してみてください。 ::: -1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。**リソース名**が必要です。これは API エンドポイントの一部になります (`https://RESOURCE_NAME.openai.azure.com/`). +1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。必要なものは次のとおりです。 + - **リソース名**: これは API エンドポイント (`https://RESOURCE_NAME.openai.azure.com/`) の一部になります。 + - **API キー**: リソースの `KEY 1` または `KEY 2` のいずれか 2. [Azure AI Foundry](https://ai.azure.com/) に移動し、モデルをデプロイします。 - :::note - opencode が正しく動作するには、デプロイ名がモデル名と一致している必要があります。 - ::: +:::note +OpenCode が正しく動作するには、デプロイメント名がモデル名と一致する必要があります。 +::: -3. `/connect` コマンドを実行して **Azure**. +3. `/connect` コマンドを実行し、**Azure** を検索します。 ```txt /connect ``` -4. 認証方法を選択します。 - - - **API キー**: リソースの `KEY 1` または `KEY 2` を貼り付けます。 - - **Microsoft Entra ID (az login による OAuth)**: 先に `az login` を実行します。サインインしている Azure ID には、そのリソースに対する `Cognitive Services OpenAI User` ロールが必要です。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API キーを選択した場合は、API キーを入力します。 +4. API キーを入力します。 ```txt ┌ API key @@ -409,19 +398,19 @@ opencode は、OpenAI 互換の API サーバーの背後でローカル LLM を └ enter ``` -6. 任意: `/connect` 中のリソース名の入力を省略するには、リソース名を環境変数として設定します。 +5. リソース名を環境変数として設定します。 ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - または bash プロファイルに追加します: +または、bash プロファイルに追加します。 - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX - ``` +``` -7. `/models` コマンドを実行して、デプロイ済みモデルを選択します。 +6. `/models` コマンドを実行して、デプロイされたモデルを選択します。 ```txt /models @@ -431,34 +420,23 @@ opencode は、OpenAI 互換の API サーバーの背後でローカル LLM を ### Azure Cognitive Services -1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。**リソース名**が必要です。これは API エンドポイントの一部になります (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. [Azure portal](https://portal.azure.com/) に移動し、**Azure OpenAI** リソースを作成します。必要なものは次のとおりです。 + - **リソース名**: これは API エンドポイント (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) の一部になります。 + - **API キー**: リソースの `KEY 1` または `KEY 2` のいずれか 2. [Azure AI Foundry](https://ai.azure.com/) に移動し、モデルをデプロイします。 - :::note - opencode が正しく動作するには、デプロイ名がモデル名と一致している必要があります。 - ::: +:::note +OpenCode が正しく動作するには、デプロイメント名がモデル名と一致する必要があります。 +::: -3. `/connect` コマンドを実行して **Azure Cognitive Services**. +3. `/connect` コマンドを実行し、**Azure Cognitive Services** を検索します。 ```txt /connect ``` -4. 認証方法を選択します。 - - - **API キー**: リソースの `KEY 1` または `KEY 2` を貼り付けます。 - - **Microsoft Entra ID (az login による OAuth)**: 先に `az login` を実行します。サインインしている Azure ID には、そのリソースに対する `Cognitive Services OpenAI User` ロールが必要です。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API キーを選択した場合は、API キーを入力します。 +4. API キーを入力します。 ```txt ┌ API key @@ -467,19 +445,19 @@ opencode は、OpenAI 互換の API サーバーの背後でローカル LLM を └ enter ``` -6. 任意: `/connect` 中のリソース名の入力を省略するには、リソース名を環境変数として設定します。 +5. リソース名を環境変数として設定します。 ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - または bash プロファイルに追加します: +または、bash プロファイルに追加します。 - ```bash title="~/.bash_profile" +```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX - ``` +``` -7. `/models` コマンドを実行して、デプロイ済みモデルを選択します。 +6. `/models` コマンドを実行して、デプロイされたモデルを選択します。 ```txt /models diff --git a/packages/web/src/content/docs/ko/providers.mdx b/packages/web/src/content/docs/ko/providers.mdx index 1cf35262d92c..87278bef23f9 100644 --- a/packages/web/src/content/docs/ko/providers.mdx +++ b/packages/web/src/content/docs/ko/providers.mdx @@ -366,37 +366,26 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 ### Azure OpenAI :::note -"I'm sorry, but I cannot assist with that request" 같은 오류가 발생하면 Azure 리소스에서 콘텐츠 필터를 **DefaultV2**에서 **Default**로 변경해 보세요. +"I'm sorry, but I cannot assist with that request" 오류가 발생하면, Azure 리소스의 콘텐츠 필터를 **DefaultV2**에서 **Default**로 변경해 보세요. ::: -1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만드세요. **리소스 이름**이 필요하며, 이는 API 엔드포인트의 일부가 됩니다 (`https://RESOURCE_NAME.openai.azure.com/`). +1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만듭니다. 다음이 필요합니다: + - **리소스 이름**: API 엔드포인트의 일부가 됩니다 (`https://RESOURCE_NAME.openai.azure.com/`) + - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2` -2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포하세요. +2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포합니다. :::note - opencode가 올바르게 작동하려면 배포 이름이 모델 이름과 일치해야 합니다. + 배포 이름은 제대로 작동하려면 OpenCode의 모델 이름과 일치해야 합니다. ::: -3. `/connect` 명령을 실행하고 **Azure**. +3. `/connect` 명령을 실행하고 **Azure**를 검색하십시오. ```txt /connect ``` -4. 인증 방법을 선택하세요. - - - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2`를 붙여넣으세요. - - **Microsoft Entra ID (az login을 통한 OAuth)**: 먼저 `az login`을 실행하세요. 로그인한 Azure ID에는 해당 리소스에 대한 `Cognitive Services OpenAI User` 역할이 있어야 합니다. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API 키를 선택했다면 API 키를 입력하세요. +4. API 키를 입력하십시오. ```txt ┌ API key @@ -405,19 +394,19 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 └ enter ``` -6. 선택 사항: `/connect` 중 리소스 이름 프롬프트를 건너뛰려면 리소스 이름을 환경 변수로 설정하세요. +5. 리소스 이름을 환경 변수로 설정: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 또는 bash 프로필에 추가하세요: + 또는 bash 프로필에 추가: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. `/models` 명령을 실행하여 배포된 모델을 선택하세요. +6. `/models` 명령을 실행하여 배포된 모델을 선택하십시오. ```txt /models @@ -427,34 +416,23 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 ### Azure Cognitive Services -1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만드세요. **리소스 이름**이 필요하며, 이는 API 엔드포인트의 일부가 됩니다 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. [Azure 포털](https://portal.azure.com/)로 이동하여 **Azure OpenAI** 리소스를 만듭니다. 다음이 필요합니다: + - **리소스 이름**: API 엔드포인트의 일부가 됩니다 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2` -2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포하세요. +2. [Azure AI Foundry](https://ai.azure.com/)로 이동하여 모델을 배포합니다. :::note - opencode가 올바르게 작동하려면 배포 이름이 모델 이름과 일치해야 합니다. + 배포 이름은 제대로 작동하려면 OpenCode의 모델 이름과 일치해야 합니다. ::: -3. `/connect` 명령을 실행하고 **Azure Cognitive Services**. +3. `/connect` 명령을 실행하고 **Azure Cognitive Services**를 검색하십시오. ```txt /connect ``` -4. 인증 방법을 선택하세요. - - - **API 키**: 리소스의 `KEY 1` 또는 `KEY 2`를 붙여넣으세요. - - **Microsoft Entra ID (az login을 통한 OAuth)**: 먼저 `az login`을 실행하세요. 로그인한 Azure ID에는 해당 리소스에 대한 `Cognitive Services OpenAI User` 역할이 있어야 합니다. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API 키를 선택했다면 API 키를 입력하세요. +4. API 키를 입력하십시오. ```txt ┌ API key @@ -463,19 +441,19 @@ OpenAI 호환 API 서버 뒤에서 로컬 LLM을 실행하는 데스크톱 애 └ enter ``` -6. 선택 사항: `/connect` 중 리소스 이름 프롬프트를 건너뛰려면 리소스 이름을 환경 변수로 설정하세요. +5. 리소스 이름을 환경 변수로 설정: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 또는 bash 프로필에 추가하세요: + 또는 bash 프로필에 추가: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. `/models` 명령을 실행하여 배포된 모델을 선택하세요. +6. `/models` 명령을 실행하여 배포된 모델을 선택하십시오. ```txt /models diff --git a/packages/web/src/content/docs/nb/providers.mdx b/packages/web/src/content/docs/nb/providers.mdx index 83a1a24a2e3f..bf276918a9ba 100644 --- a/packages/web/src/content/docs/nb/providers.mdx +++ b/packages/web/src/content/docs/nb/providers.mdx @@ -364,15 +364,17 @@ Hvis verktøykall ikke fungerer godt, velg en lastet modell med god tool calling ### Azure OpenAI :::note -Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du prøve å endre innholdsfilteret fra **DefaultV2** til **Default** i Azure-ressursen din. +Hvis du støter på «Beklager, men jeg kan ikke hjelpe med den forespørselen»-feil, kan du prøve å endre innholdsfilteret fra **DefaultV2** til **Default** i Azure-ressursen. ::: -1. Gå til [Azure-portalen](https://portal.azure.com/) og opprett en **Azure OpenAI**-ressurs. Du trenger **ressursnavnet**; det blir en del av API-endepunktet ditt (`https://RESOURCE_NAME.openai.azure.com/`). +1. Gå over til [Azure-portalen](https://portal.azure.com/) og lag en **Azure OpenAI**-ressurs. Du trenger: + - **Ressursnavn**: Dette blir en del av API-endepunktet (`https://RESOURCE_NAME.openai.azure.com/`) + - **API nøkkel**: Enten `KEY 1` eller `KEY 2` fra ressursen din 2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en modell. :::note - Distribusjonsnavnet må samsvare med modellnavnet for at opencode skal fungere riktig. + Distribusjonsnavnet må samsvare med modellnavnet for at OpenCode skal fungere skikkelig. ::: 3. Kjør kommandoen `/connect` og søk etter **Azure**. @@ -381,20 +383,7 @@ Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du /connect ``` -4. Velg en autentiseringsmetode. - - - **API-nøkkel**: lim inn `KEY 1` eller `KEY 2` fra ressursen din. - - **Microsoft Entra ID (OAuth via az login)**: kjør `az login` først. Den påloggede Azure-identiteten må ha rollen `Cognitive Services OpenAI User` for ressursen. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Hvis du valgte API-nøkkel, skriver du inn API-nøkkelen. +4. Skriv inn API-nøkkelen. ```txt ┌ API key @@ -403,19 +392,19 @@ Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du └ enter ``` -6. Valgfritt: angi ressursnavnet som en miljøvariabel for å hoppe over ressursnavnsprompten under `/connect`. +5. Angi ressursnavnet ditt som en miljøvariabel: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Eller legg det til i bash-profilen din: + Eller legg den til bash-profilen din: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. Kjør kommandoen `/models` for å velge den distribuerte modellen. +6. Kjør kommandoen `/models` for å velge den distribuerte modellen. ```txt /models @@ -425,12 +414,14 @@ Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du ### Azure Cognitive Services -1. Gå til [Azure-portalen](https://portal.azure.com/) og opprett en **Azure OpenAI**-ressurs. Du trenger **ressursnavnet**; det blir en del av API-endepunktet ditt (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Gå over til [Azure-portalen](https://portal.azure.com/) og lag en **Azure OpenAI**-ressurs. Du trenger: + - **Ressursnavn**: Dette blir en del av API-endepunktet (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API nøkkel**: Enten `KEY 1` eller `KEY 2` fra ressursen din 2. Gå til [Azure AI Foundry](https://ai.azure.com/) og distribuer en modell. :::note - Distribusjonsnavnet må samsvare med modellnavnet for at opencode skal fungere riktig. + Distribusjonsnavnet må samsvare med modellnavnet for at OpenCode skal fungere skikkelig. ::: 3. Kjør kommandoen `/connect` og søk etter **Azure Cognitive Services**. @@ -439,20 +430,7 @@ Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du /connect ``` -4. Velg en autentiseringsmetode. - - - **API-nøkkel**: lim inn `KEY 1` eller `KEY 2` fra ressursen din. - - **Microsoft Entra ID (OAuth via az login)**: kjør `az login` først. Den påloggede Azure-identiteten må ha rollen `Cognitive Services OpenAI User` for ressursen. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Hvis du valgte API-nøkkel, skriver du inn API-nøkkelen. +4. Skriv inn API-nøkkelen. ```txt ┌ API key @@ -461,19 +439,19 @@ Hvis du får feil som "I'm sorry, but I cannot assist with that request", kan du └ enter ``` -6. Valgfritt: angi ressursnavnet som en miljøvariabel for å hoppe over ressursnavnsprompten under `/connect`. +5. Angi ressursnavnet ditt som en miljøvariabel: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Eller legg det til i bash-profilen din: + Eller legg den til bash-profilen din: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Kjør kommandoen `/models` for å velge den distribuerte modellen. +6. Kjør kommandoen `/models` for å velge den distribuerte modellen. ```txt /models diff --git a/packages/web/src/content/docs/pl/providers.mdx b/packages/web/src/content/docs/pl/providers.mdx index d57c04ecc12d..0e722d5fde2e 100644 --- a/packages/web/src/content/docs/pl/providers.mdx +++ b/packages/web/src/content/docs/pl/providers.mdx @@ -362,15 +362,17 @@ Jeśli wywołania narzędzi nie działają dobrze, wybierz załadowany model z d ### Azure OpenAI :::note -Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that request", spróbuj zmienić filtr treści z **DefaultV2** na **Default** w swoim zasobie Azure. +Jeśli napotkasz błędy „Przykro mi, ale nie mogę pomóc w tej prośbie”, spróbuj zmienić filtr zawartości z **DefaultV2** na **Default** w zasobie platformy Azure. ::: -1. Przejdź do [portalu Azure](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Potrzebujesz **nazwy zasobu**; stanie się ona częścią punktu końcowego API (`https://RESOURCE_NAME.openai.azure.com/`). +1. Przejdź do [Azure portal](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Będziesz potrzebować: + - **Nazwa zasobu**: staje się częścią punktu końcowego API (`https://RESOURCE_NAME.openai.azure.com/`) + - **Klucz API**: `KEY 1` lub `KEY 2` z Twojego zasobu 2. Przejdź do [Azure AI Foundry](https://ai.azure.com/) i wdróż model. :::note - Nazwa wdrożenia musi odpowiadać nazwie modelu, aby opencode działał poprawnie. + Aby kod opencode działał poprawnie, nazwa wdrożenia musi być zgodna z nazwą modelu. ::: 3. Uruchom polecenie `/connect` i wyszukaj **Azure**. @@ -379,20 +381,7 @@ Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that requ /connect ``` -4. Wybierz metodę uwierzytelniania. - - - **Klucz API**: wklej `KEY 1` lub `KEY 2` ze swojego zasobu. - - **Microsoft Entra ID (OAuth przez az login)**: najpierw uruchom `az login`. Zalogowana tożsamość Azure musi mieć rolę `Cognitive Services OpenAI User` dla tego zasobu. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Jeśli wybrano klucz API, wpisz swój klucz API. +4. Wpisz swój klucz API. ```txt ┌ API key @@ -401,19 +390,19 @@ Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that requ └ enter ``` -6. Opcjonalnie: ustaw nazwę zasobu jako zmienną środowiskową, aby pominąć pytanie o nazwę zasobu podczas `/connect`. +5. Ustaw nazwę zasobu jako zmienną środowiskową: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Albo dodaj ją do profilu bash: + Lub dodaj go do swojego profilu bash: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. Uruchom polecenie `/models`, aby wybrać wdrożony model. +6. Uruchom komendę `/models`, aby wybrać wdrożony model. ```txt /models @@ -423,12 +412,14 @@ Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that requ ### Azure Cognitive Services -1. Przejdź do [portalu Azure](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Potrzebujesz **nazwy zasobu**; stanie się ona częścią punktu końcowego API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Przejdź do [Azure portal](https://portal.azure.com/) i utwórz zasób **Azure OpenAI**. Będziesz potrzebować: + - **Nazwa zasobu**: staje się częścią punktu końcowego API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **Klucz API**: `KEY 1` lub `KEY 2` z Twojego zasobu 2. Przejdź do [Azure AI Foundry](https://ai.azure.com/) i wdróż model. :::note - Nazwa wdrożenia musi odpowiadać nazwie modelu, aby opencode działał poprawnie. + Aby kod opencode działał poprawnie, nazwa wdrożenia musi być zgodna z nazwą modelu. ::: 3. Uruchom polecenie `/connect` i wyszukaj **Azure Cognitive Services**. @@ -437,20 +428,7 @@ Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that requ /connect ``` -4. Wybierz metodę uwierzytelniania. - - - **Klucz API**: wklej `KEY 1` lub `KEY 2` ze swojego zasobu. - - **Microsoft Entra ID (OAuth przez az login)**: najpierw uruchom `az login`. Zalogowana tożsamość Azure musi mieć rolę `Cognitive Services OpenAI User` dla tego zasobu. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Jeśli wybrano klucz API, wpisz swój klucz API. +4. Wpisz swój klucz API. ```txt ┌ API key @@ -459,19 +437,19 @@ Jeśli pojawią się błędy typu "I'm sorry, but I cannot assist with that requ └ enter ``` -6. Opcjonalnie: ustaw nazwę zasobu jako zmienną środowiskową, aby pominąć pytanie o nazwę zasobu podczas `/connect`. +5. Ustaw nazwę zasobu jako zmienną środowiskową: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Albo dodaj ją do profilu bash: + Lub dodaj go do swojego profilu bash: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Uruchom polecenie `/models`, aby wybrać wdrożony model. +6. Uruchom komendę `/models`, aby wybrać wdrożony model. ```txt /models diff --git a/packages/web/src/content/docs/pt-br/providers.mdx b/packages/web/src/content/docs/pt-br/providers.mdx index f9eaa762091a..174bc1679b61 100644 --- a/packages/web/src/content/docs/pt-br/providers.mdx +++ b/packages/web/src/content/docs/pt-br/providers.mdx @@ -366,12 +366,14 @@ Se as chamadas de ferramentas não estiverem funcionando bem, escolha um modelo ### Azure OpenAI :::note -Se encontrar erros como "I'm sorry, but I cannot assist with that request", tente alterar o filtro de conteúdo de **DefaultV2** para **Default** no seu recurso do Azure. +Se você encontrar erros "Desculpe, mas não posso ajudar com esse pedido", tente mudar o filtro de conteúdo de **DefaultV2** para **Default** em seu recurso Azure. ::: -1. Acesse o [portal do Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará do **nome do recurso**; ele se torna parte do endpoint da API (`https://RESOURCE_NAME.openai.azure.com/`). +1. Acesse o [portal Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará: + - **Nome do recurso**: Isso se torna parte do seu endpoint da API (`https://RESOURCE_NAME.openai.azure.com/`) + - **Chave da API**: Seja `KEY 1` ou `KEY 2` do seu recurso -2. Acesse o [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. +2. Vá para [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. :::note O nome da implantação deve corresponder ao nome do modelo para que o opencode funcione corretamente. @@ -383,20 +385,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent /connect ``` -4. Escolha um método de autenticação. - - - **Chave de API**: cole `KEY 1` ou `KEY 2` do seu recurso. - - **Microsoft Entra ID (OAuth via az login)**: execute `az login` primeiro. A identidade do Azure conectada deve ter a função `Cognitive Services OpenAI User` para o recurso. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Se você escolheu chave de API, insira sua chave de API. +4. Insira sua chave da API. ```txt ┌ API key @@ -405,7 +394,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent └ enter ``` -6. Opcional: defina o nome do recurso como uma variável de ambiente para pular a solicitação do nome do recurso durante `/connect`. +5. Defina o nome do seu recurso como uma variável de ambiente: ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -417,7 +406,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent export AZURE_RESOURCE_NAME=XXX ``` -7. Execute o comando `/models` para selecionar o modelo implantado. +6. Execute o comando `/models` para selecionar seu modelo implantado. ```txt /models @@ -427,9 +416,11 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent ### Azure Cognitive Services -1. Acesse o [portal do Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará do **nome do recurso**; ele se torna parte do endpoint da API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Acesse o [portal Azure](https://portal.azure.com/) e crie um recurso **Azure OpenAI**. Você precisará: + - **Nome do recurso**: Isso se torna parte do seu endpoint da API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **Chave da API**: Seja `KEY 1` ou `KEY 2` do seu recurso -2. Acesse o [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. +2. Vá para [Azure AI Foundry](https://ai.azure.com/) e implante um modelo. :::note O nome da implantação deve corresponder ao nome do modelo para que o opencode funcione corretamente. @@ -441,20 +432,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent /connect ``` -4. Escolha um método de autenticação. - - - **Chave de API**: cole `KEY 1` ou `KEY 2` do seu recurso. - - **Microsoft Entra ID (OAuth via az login)**: execute `az login` primeiro. A identidade do Azure conectada deve ter a função `Cognitive Services OpenAI User` para o recurso. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Se você escolheu chave de API, insira sua chave de API. +4. Insira sua chave da API. ```txt ┌ API key @@ -463,7 +441,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent └ enter ``` -6. Opcional: defina o nome do recurso como uma variável de ambiente para pular a solicitação do nome do recurso durante `/connect`. +5. Defina o nome do seu recurso como uma variável de ambiente: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -475,7 +453,7 @@ Se encontrar erros como "I'm sorry, but I cannot assist with that request", tent export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Execute o comando `/models` para selecionar o modelo implantado. +6. Execute o comando `/models` para selecionar seu modelo implantado. ```txt /models diff --git a/packages/web/src/content/docs/ru/providers.mdx b/packages/web/src/content/docs/ru/providers.mdx index 4c9ffb7f987c..39aae9e09630 100644 --- a/packages/web/src/content/docs/ru/providers.mdx +++ b/packages/web/src/content/docs/ru/providers.mdx @@ -362,15 +362,17 @@ OpenCode Go — это недорогой план подписки, обесп ### Azure OpenAI :::note -Если появляются ошибки вроде "I'm sorry, but I cannot assist with that request", попробуйте изменить фильтр содержимого с **DefaultV2** на **Default** в вашем ресурсе Azure. +Если вы столкнулись с ошибками «Извините, но я не могу помочь с этим запросом», попробуйте изменить фильтр содержимого с **DefaultV2** на **Default** в своем ресурсе Azure. ::: -1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится **имя ресурса**; оно станет частью вашего API endpoint (`https://RESOURCE_NAME.openai.azure.com/`). +1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится: + - **Имя ресурса**: оно становится частью вашей конечной точки API (`https://RESOURCE_NAME.openai.azure.com/`). + - **Ключ API**: `KEY 1` или `KEY 2` из вашего ресурса. 2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель. - :::note - Имя развертывания должно совпадать с именем модели, чтобы opencode работал правильно. + :::примечание + Для правильной работы opencode имя развертывания должно совпадать с именем модели. ::: 3. Запустите команду `/connect` и найдите **Azure**. @@ -379,19 +381,7 @@ OpenCode Go — это недорогой план подписки, обесп /connect ``` -4. Выберите способ аутентификации. - - **API-ключ**: вставьте `KEY 1` или `KEY 2` из вашего ресурса. - - **Microsoft Entra ID (OAuth через az login)**: сначала выполните `az login`. Вошедшая идентичность Azure должна иметь роль `Cognitive Services OpenAI User` для этого ресурса. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Если вы выбрали API-ключ, введите свой API-ключ. +4. Введите свой ключ API. ```txt ┌ API key @@ -400,19 +390,19 @@ OpenCode Go — это недорогой план подписки, обесп └ enter ``` -6. Необязательно: задайте имя ресурса как переменную окружения, чтобы пропустить запрос имени ресурса во время `/connect`. +5. Задайте имя ресурса как переменную среды: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - Или добавьте его в свой bash-профиль: + Или добавьте его в свой профиль bash: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. Запустите команду `/models`, чтобы выбрать развернутую модель. +6. Запустите команду `/models`, чтобы выбрать развернутую модель. ```txt /models @@ -422,12 +412,14 @@ OpenCode Go — это недорогой план подписки, обесп ### Azure Cognitive Services -1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится **имя ресурса**; оно станет частью вашего API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. Перейдите на [портал Azure](https://portal.azure.com/) и создайте ресурс **Azure OpenAI**. Вам понадобится: + - **Имя ресурса**: оно становится частью вашей конечной точки API (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). + - **Ключ API**: `KEY 1` или `KEY 2` из вашего ресурса. 2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель. - :::note - Имя развертывания должно совпадать с именем модели, чтобы opencode работал правильно. + :::примечание + Для правильной работы opencode имя развертывания должно совпадать с именем модели. ::: 3. Запустите команду `/connect` и найдите **Azure Cognitive Services**. @@ -436,19 +428,7 @@ OpenCode Go — это недорогой план подписки, обесп /connect ``` -4. Выберите способ аутентификации. - - **API-ключ**: вставьте `KEY 1` или `KEY 2` из вашего ресурса. - - **Microsoft Entra ID (OAuth через az login)**: сначала выполните `az login`. Вошедшая идентичность Azure должна иметь роль `Cognitive Services OpenAI User` для этого ресурса. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. Если вы выбрали API-ключ, введите свой API-ключ. +4. Введите свой ключ API. ```txt ┌ API key @@ -457,19 +437,19 @@ OpenCode Go — это недорогой план подписки, обесп └ enter ``` -6. Необязательно: задайте имя ресурса как переменную окружения, чтобы пропустить запрос имени ресурса во время `/connect`. +5. Задайте имя ресурса как переменную среды: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - Или добавьте его в свой bash-профиль: + Или добавьте его в свой профиль bash: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Запустите команду `/models`, чтобы выбрать развернутую модель. +6. Запустите команду `/models`, чтобы выбрать развернутую модель. ```txt /models diff --git a/packages/web/src/content/docs/th/providers.mdx b/packages/web/src/content/docs/th/providers.mdx index 2b3251155c1c..07008de218e2 100644 --- a/packages/web/src/content/docs/th/providers.mdx +++ b/packages/web/src/content/docs/th/providers.mdx @@ -365,7 +365,9 @@ OpenCode Go คือแผนการสมัครสมาชิกรา หากคุณพบข้อผิดพลาด "ฉันขอโทษ แต่ฉันไม่สามารถช่วยเหลือคำขอนั้นได้" ให้ลองเปลี่ยนตัวกรองเนื้อหาจาก **DefaultV2** เป็น **Default** ในทรัพยากร Azure ของคุณ ::: -1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องใช้ **ชื่อทรัพยากร** ซึ่งจะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://RESOURCE_NAME.openai.azure.com/`) +1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ: + - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://RESOURCE_NAME.openai.azure.com/`) + - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล @@ -379,20 +381,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา /connect ``` -4. เลือกวิธีการยืนยันตัวตน - - - **API key**: วาง `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ - - **Microsoft Entra ID (OAuth ผ่าน az login)**: เรียกใช้ `az login` ก่อน ตัวตน Azure ที่ลงชื่อเข้าใช้ต้องมีบทบาท `Cognitive Services OpenAI User` สำหรับทรัพยากรนี้ - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. หากเลือก API key ให้ป้อน API key ของคุณ +4. ป้อน API ของคุณ ```txt ┌ API key @@ -401,7 +390,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา └ enter ``` -6. ไม่บังคับ: ตั้งชื่อทรัพยากรเป็นตัวแปรสภาพแวดล้อมเพื่อข้ามการถามชื่อทรัพยากรระหว่าง `/connect` +5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม: ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -413,7 +402,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา export AZURE_RESOURCE_NAME=XXX ``` -7. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ +6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ ```txt /models @@ -423,7 +412,9 @@ OpenCode Go คือแผนการสมัครสมาชิกรา ### Azure Cognitive Services -1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องใช้ **ชื่อทรัพยากร** ซึ่งจะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) +1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ: + - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล @@ -437,20 +428,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา /connect ``` -4. เลือกวิธีการยืนยันตัวตน - - - **API key**: วาง `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ - - **Microsoft Entra ID (OAuth ผ่าน az login)**: เรียกใช้ `az login` ก่อน ตัวตน Azure ที่ลงชื่อเข้าใช้ต้องมีบทบาท `Cognitive Services OpenAI User` สำหรับทรัพยากรนี้ - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. หากเลือก API key ให้ป้อน API key ของคุณ +4. ป้อน API ของคุณ ```txt ┌ API key @@ -459,7 +437,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา └ enter ``` -6. ไม่บังคับ: ตั้งชื่อทรัพยากรเป็นตัวแปรสภาพแวดล้อมเพื่อข้ามการถามชื่อทรัพยากรระหว่าง `/connect` +5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -471,7 +449,7 @@ OpenCode Go คือแผนการสมัครสมาชิกรา export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ +6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ ```txt /models diff --git a/packages/web/src/content/docs/tr/providers.mdx b/packages/web/src/content/docs/tr/providers.mdx index 4719849f8cd4..8c6ef23fee31 100644 --- a/packages/web/src/content/docs/tr/providers.mdx +++ b/packages/web/src/content/docs/tr/providers.mdx @@ -367,7 +367,9 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y "Üzgünüm ama bu isteğe yardımcı olamıyorum" hatalarıyla karşılaşırsanız Azure kaynağınızda içerik filtresini **DefaultV2** yerine **Default** olarak değiştirmeyi deneyin. ::: -1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. **Kaynak adına** ihtiyacınız olacak; bu, API bitiş noktanızın (`https://RESOURCE_NAME.openai.azure.com/`) parçası olur. +1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. İhtiyacınız olacak: + - **Kaynak adı**: Bu, API bitiş noktanızın (`https://RESOURCE_NAME.openai.azure.com/`) parçası olur + - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` 2. [Azure AI Foundry](https://ai.azure.com/)'a gidin ve bir model dağıtın. @@ -381,20 +383,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y /connect ``` -4. Bir kimlik doğrulama yöntemi seçin. - - - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` değerini yapıştırın. - - **Microsoft Entra ID (az login ile OAuth)**: Önce `az login` çalıştırın. Oturum açmış Azure kimliğinin bu kaynak için `Cognitive Services OpenAI User` rolüne sahip olması gerekir. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API anahtarını seçtiyseniz API anahtarınızı girin. +4. API anahtarınızı girin. ```txt ┌ API key @@ -403,7 +392,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y └ enter ``` -6. İsteğe bağlı: `/connect` sırasında kaynak adı sorusunu atlamak için kaynak adınızı ortam değişkeni olarak ayarlayın. +5. Kaynak adınızı ortam değişkeni olarak ayarlayın: ```bash AZURE_RESOURCE_NAME=XXX opencode @@ -415,7 +404,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y export AZURE_RESOURCE_NAME=XXX ``` -7. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. +6. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. ```txt /models @@ -425,7 +414,9 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y ### Azure Cognitive Services -1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. **Kaynak adına** ihtiyacınız olacak; bu, API bitiş noktanızın (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) parçası olur. +1. [Azure portal](https://portal.azure.com/)'a gidin ve bir **Azure OpenAI** kaynağı oluşturun. İhtiyacınız olacak: + - **Kaynak adı**: Bu, API bitiş noktanızın (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) parçası olur + - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` 2. [Azure AI Foundry](https://ai.azure.com/)'a gidin ve bir model dağıtın. @@ -439,20 +430,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y /connect ``` -4. Bir kimlik doğrulama yöntemi seçin. - - - **API anahtarı**: Kaynağınızdan `KEY 1` veya `KEY 2` değerini yapıştırın. - - **Microsoft Entra ID (az login ile OAuth)**: Önce `az login` çalıştırın. Oturum açmış Azure kimliğinin bu kaynak için `Cognitive Services OpenAI User` rolüne sahip olması gerekir. - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. API anahtarını seçtiyseniz API anahtarınızı girin. +4. API anahtarınızı girin. ```txt ┌ API key @@ -461,7 +439,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y └ enter ``` -6. İsteğe bağlı: `/connect` sırasında kaynak adı sorusunu atlamak için kaynak adınızı ortam değişkeni olarak ayarlayın. +5. Kaynak adınızı ortam değişkeni olarak ayarlayın: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode @@ -473,7 +451,7 @@ Araç çağrıları iyi çalışmıyorsa, tool calling desteği güçlü olan y export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. +6. Dağıtılan modelinizi seçmek için `/models` komutunu çalıştırın. ```txt /models diff --git a/packages/web/src/content/docs/zh-cn/providers.mdx b/packages/web/src/content/docs/zh-cn/providers.mdx index f6890395d8bf..9c0a5d8a3bd5 100644 --- a/packages/web/src/content/docs/zh-cn/providers.mdx +++ b/packages/web/src/content/docs/zh-cn/providers.mdx @@ -336,37 +336,26 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 ### Azure OpenAI :::note -如果遇到 “I'm sorry, but I cannot assist with that request” 之类的错误,请尝试在 Azure 资源中将内容筛选器从 **DefaultV2** 更改为 **Default**。 +如果遇到 "I'm sorry, but I cannot assist with that request" 错误,请尝试将 Azure 资源中的内容过滤器从 **DefaultV2** 更改为 **Default**。 ::: -1. 前往 [Azure 门户](https://portal.azure.com/) 并创建 **Azure OpenAI** 资源。你需要 **资源名称**;它会成为 API 终结点的一部分 (`https://RESOURCE_NAME.openai.azure.com/`). +1. 前往 [Azure 门户](https://portal.azure.com/)并创建 **Azure OpenAI** 资源。你需要: + - **资源名称**:这会成为你的 API 端点的一部分(`https://RESOURCE_NAME.openai.azure.com/`) + - **API 密钥**:资源中的 `KEY 1` 或 `KEY 2` -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署一个模型。 :::note - 部署名称必须与模型名称匹配,opencode 才能正常工作。 + 部署名称必须与模型名称一致,OpenCode 才能正常工作。 ::: -3. 运行 `/connect` 命令并搜索 **Azure**. +3. 执行 `/connect` 命令并搜索 **Azure**。 ```txt /connect ``` -4. 选择身份验证方法。 - - - **API 密钥**:粘贴资源中的 `KEY 1` 或 `KEY 2`。 - - **Microsoft Entra ID(通过 az login 使用 OAuth)**:先运行 `az login`。已登录的 Azure 标识必须拥有该资源的 `Cognitive Services OpenAI User` 角色。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. 如果选择 API 密钥,请输入你的 API 密钥。 +4. 输入你的 API 密钥。 ```txt ┌ API key @@ -375,19 +364,19 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 └ enter ``` -6. 可选:将资源名称设置为环境变量,以跳过 `/connect` 期间的资源名称提示。 +5. 将资源名称设置为环境变量: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 或将其添加到 bash 配置文件: + 或者添加到你的 bash 配置文件中: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. 运行 `/models` 命令以选择已部署的模型。 +6. 执行 `/models` 命令选择你已部署的模型。 ```txt /models @@ -397,34 +386,23 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 ### Azure Cognitive Services -1. 前往 [Azure 门户](https://portal.azure.com/) 并创建 **Azure OpenAI** 资源。你需要 **资源名称**;它会成为 API 终结点的一部分 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. 前往 [Azure 门户](https://portal.azure.com/)并创建 **Azure OpenAI** 资源。你需要: + - **资源名称**:这会成为你的 API 端点的一部分(`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API 密钥**:资源中的 `KEY 1` 或 `KEY 2` -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 并部署一个模型。 :::note - 部署名称必须与模型名称匹配,opencode 才能正常工作。 + 部署名称必须与模型名称一致,OpenCode 才能正常工作。 ::: -3. 运行 `/connect` 命令并搜索 **Azure Cognitive Services**. +3. 执行 `/connect` 命令并搜索 **Azure Cognitive Services**。 ```txt /connect ``` -4. 选择身份验证方法。 - - - **API 密钥**:粘贴资源中的 `KEY 1` 或 `KEY 2`。 - - **Microsoft Entra ID(通过 az login 使用 OAuth)**:先运行 `az login`。已登录的 Azure 标识必须拥有该资源的 `Cognitive Services OpenAI User` 角色。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. 如果选择 API 密钥,请输入你的 API 密钥。 +4. 输入你的 API 密钥。 ```txt ┌ API key @@ -433,19 +411,19 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过 └ enter ``` -6. 可选:将资源名称设置为环境变量,以跳过 `/connect` 期间的资源名称提示。 +5. 将资源名称设置为环境变量: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 或将其添加到 bash 配置文件: + 或者添加到你的 bash 配置文件中: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. 运行 `/models` 命令以选择已部署的模型。 +6. 执行 `/models` 命令选择你已部署的模型。 ```txt /models diff --git a/packages/web/src/content/docs/zh-tw/providers.mdx b/packages/web/src/content/docs/zh-tw/providers.mdx index fedfee6f4e95..d4e55ed712e2 100644 --- a/packages/web/src/content/docs/zh-tw/providers.mdx +++ b/packages/web/src/content/docs/zh-tw/providers.mdx @@ -357,37 +357,26 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 ### Azure OpenAI :::note -如果遇到「I'm sorry, but I cannot assist with that request」之類的錯誤,請嘗試在 Azure 資源中將內容篩選器從 **DefaultV2** 改為 **Default**。 +如果遇到 "I'm sorry, but I cannot assist with that request" 錯誤,請嘗試將 Azure 資源中的內容篩選器從 **DefaultV2** 更改為 **Default**。 ::: -1. 前往 [Azure 入口網站](https://portal.azure.com/) 並建立 **Azure OpenAI** 資源。你需要 **資源名稱**;它會成為 API 端點的一部分 (`https://RESOURCE_NAME.openai.azure.com/`). +1. 前往 [Azure 入口網站](https://portal.azure.com/)並建立 **Azure OpenAI** 資源。您需要: + - **資源名稱**:這會成為您的 API 端點的一部分(`https://RESOURCE_NAME.openai.azure.com/`) + - **API 金鑰**:資源中的 `KEY 1` 或 `KEY 2` -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署一個模型。 :::note - 部署名稱必須與模型名稱相符,opencode 才能正常運作。 + 部署名稱必須與模型名稱一致,OpenCode 才能正常運作。 ::: -3. 執行 `/connect` 命令並搜尋 **Azure**. +3. 執行 `/connect` 指令並搜尋 **Azure**。 ```txt /connect ``` -4. 選擇驗證方法。 - - - **API 金鑰**:貼上資源中的 `KEY 1` 或 `KEY 2`。 - - **Microsoft Entra ID(透過 az login 使用 OAuth)**:先執行 `az login`。已登入的 Azure 身分必須擁有該資源的 `Cognitive Services OpenAI User` 角色。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. 如果選擇 API 金鑰,請輸入你的 API 金鑰。 +4. 輸入您的 API 金鑰。 ```txt ┌ API key @@ -396,19 +385,19 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 └ enter ``` -6. 選用:將資源名稱設為環境變數,以略過 `/connect` 期間的資源名稱提示。 +5. 將資源名稱設定為環境變數: ```bash AZURE_RESOURCE_NAME=XXX opencode ``` - 或將它加入你的 bash 設定檔: + 或者新增到您的 bash 設定檔中: ```bash title="~/.bash_profile" export AZURE_RESOURCE_NAME=XXX ``` -7. 執行 `/models` 命令以選擇已部署的模型。 +6. 執行 `/models` 指令選擇您已部署的模型。 ```txt /models @@ -418,34 +407,23 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 ### Azure Cognitive Services -1. 前往 [Azure 入口網站](https://portal.azure.com/) 並建立 **Azure OpenAI** 資源。你需要 **資源名稱**;它會成為 API 端點的一部分 (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`). +1. 前往 [Azure 入口網站](https://portal.azure.com/)並建立 **Azure OpenAI** 資源。您需要: + - **資源名稱**:這會成為您的 API 端點的一部分(`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API 金鑰**:資源中的 `KEY 1` 或 `KEY 2` -2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署模型。 +2. 前往 [Azure AI Foundry](https://ai.azure.com/) 並部署一個模型。 :::note - 部署名稱必須與模型名稱相符,opencode 才能正常運作。 + 部署名稱必須與模型名稱一致,OpenCode 才能正常運作。 ::: -3. 執行 `/connect` 命令並搜尋 **Azure Cognitive Services**. +3. 執行 `/connect` 指令並搜尋 **Azure Cognitive Services**。 ```txt /connect ``` -4. 選擇驗證方法。 - - - **API 金鑰**:貼上資源中的 `KEY 1` 或 `KEY 2`。 - - **Microsoft Entra ID(透過 az login 使用 OAuth)**:先執行 `az login`。已登入的 Azure 身分必須擁有該資源的 `Cognitive Services OpenAI User` 角色。 - - ```txt - ┌ Select auth method - │ - │ API key - │ Microsoft Entra ID (OAuth via az login) - └ - ``` - -5. 如果選擇 API 金鑰,請輸入你的 API 金鑰。 +4. 輸入您的 API 金鑰。 ```txt ┌ API key @@ -454,19 +432,19 @@ OpenCode Go 是一個低成本的訂閱計畫,提供對 OpenCode 團隊提供 └ enter ``` -6. 選用:將資源名稱設為環境變數,以略過 `/connect` 期間的資源名稱提示。 +5. 將資源名稱設定為環境變數: ```bash AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode ``` - 或將它加入你的 bash 設定檔: + 或者新增到您的 bash 設定檔中: ```bash title="~/.bash_profile" export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX ``` -7. 執行 `/models` 命令以選擇已部署的模型。 +6. 執行 `/models` 指令選擇您已部署的模型。 ```txt /models From fdf14a84625974922f6902c3d79d1fa263dcefbb Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Tue, 16 Jun 2026 16:34:13 +0200 Subject: [PATCH 04/11] chore: improved azure oauth method name and ran format --- packages/opencode/src/plugin/azure.ts | 10 +++++----- packages/web/src/content/docs/providers.mdx | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index 9489a6640abf..f548dc2ebf62 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -92,7 +92,7 @@ function azureAuthPlugin(input: { }, { type: "oauth", - label: "Microsoft Entra ID (OAuth via az login)", + label: "Microsoft Entra ID (OAuth via az cli)", prompts: input.prompts, authorize: async (inputs) => ({ url: "https://learn.microsoft.com/azure/developer/ai/keyless-connections", @@ -118,10 +118,10 @@ function azureCliTokenProvider() { return async () => { if (cached && cached.expires - Date.now() > AZURE_TOKEN_REFRESH_BUFFER) return cached.token - const proc = Bun.spawn( - ["az", "account", "get-access-token", "--resource", AZURE_SCOPE, "--output", "json"], - { stdout: "pipe", stderr: "pipe" }, - ) + const proc = Bun.spawn(["az", "account", "get-access-token", "--resource", AZURE_SCOPE, "--output", "json"], { + stdout: "pipe", + stderr: "pipe", + }) const [stdout, stderr, exitCode] = await Promise.all([ new Response(proc.stdout).text(), new Response(proc.stderr).text(), diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 51a5598a7ec4..aa62cba6527c 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -393,7 +393,6 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try ``` 4. Choose an auth method. - - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. @@ -451,7 +450,6 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try ``` 4. Choose an auth method. - - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. From fa40659b7fb48f007daf61d3bb1d330da73d1a30 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:07:38 +0200 Subject: [PATCH 05/11] fix: Preserve model-specific endpoints for Azure Cognitive Services OAuth --- packages/opencode/src/plugin/azure.ts | 5 ++--- packages/opencode/src/provider/provider.ts | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index f548dc2ebf62..af5bb319f51a 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -37,7 +37,6 @@ export async function AzureCognitiveServicesAuthPlugin(_input: PluginInput): Pro placeholder: "e.g. my-models", }, ], - providerOptions: (resourceName) => ({ baseURL: `https://${resourceName}.cognitiveservices.azure.com/openai` }), }) } @@ -45,7 +44,7 @@ function azureAuthPlugin(input: { provider: string resourceEnv: string prompts: NonNullable["methods"][number]["prompts"] - providerOptions: (resourceName: string) => Record + providerOptions?: (resourceName: string) => Record }): Hooks { return { auth: { @@ -58,7 +57,7 @@ function azureAuthPlugin(input: { const tokenProvider = azureCliTokenProvider() return { - ...((resourceName && input.providerOptions(resourceName)) ?? {}), + ...((resourceName && input.providerOptions?.(resourceName)) ?? {}), apiKey: OAUTH_DUMMY_KEY, async fetch(requestInput: RequestInfo | URL, init?: RequestInit) { const currentAuth = await getAuth() diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 1b4d5d5fef48..486ddae2caa4 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -281,7 +281,10 @@ function custom(dep: CustomDep): Record { return selectAzureLanguageModel(sdk, modelID, Boolean(options?.["useCompletionUrls"])) }, options: { - baseURL: resourceName ? `https://${resourceName}.cognitiveservices.azure.com/openai` : undefined, + baseURL: + resourceName && auth?.type !== "oauth" + ? `https://${resourceName}.cognitiveservices.azure.com/openai` + : undefined, }, } }), From fcc21f3dc58042695bb9db7b3083aac33603fcd2 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:08:36 +0200 Subject: [PATCH 06/11] fix: Remove the Anthropic API-key header when using bearer authentication --- packages/opencode/src/plugin/azure.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index af5bb319f51a..83147ed65956 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -76,6 +76,7 @@ function azureAuthPlugin(input: { } } headers.delete("api-key") + headers.delete("x-api-key") headers.set("authorization", `Bearer ${await tokenProvider()}`) headers.set("User-Agent", `opencode/${InstallationVersion}`) From 3cf9cfb6f3031a6206f435f71a6de7e696f0b9e7 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:11:41 +0200 Subject: [PATCH 07/11] docs: display to use the Foundry inference role for Cognitive Services --- packages/opencode/src/plugin/azure.ts | 8 ++++++-- packages/web/src/content/docs/providers.mdx | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index 83147ed65956..936f4020eab7 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -9,6 +9,8 @@ export async function AzureAuthPlugin(_input: PluginInput): Promise { return azureAuthPlugin({ provider: "azure", resourceEnv: "AZURE_RESOURCE_NAME", + oauthInstructions: + "Sign in with `az login`. The signed-in Azure identity must have the Cognitive Services OpenAI User role for this resource.", prompts: process.env.AZURE_RESOURCE_NAME ? [] : [ @@ -27,6 +29,8 @@ export async function AzureCognitiveServicesAuthPlugin(_input: PluginInput): Pro return azureAuthPlugin({ provider: "azure-cognitive-services", resourceEnv: "AZURE_COGNITIVE_SERVICES_RESOURCE_NAME", + oauthInstructions: + "Sign in with `az login`. The signed-in Azure identity must have the Cognitive Services User or Foundry User role for this resource.", prompts: process.env.AZURE_COGNITIVE_SERVICES_RESOURCE_NAME ? [] : [ @@ -43,6 +47,7 @@ export async function AzureCognitiveServicesAuthPlugin(_input: PluginInput): Pro function azureAuthPlugin(input: { provider: string resourceEnv: string + oauthInstructions: string prompts: NonNullable["methods"][number]["prompts"] providerOptions?: (resourceName: string) => Record }): Hooks { @@ -96,8 +101,7 @@ function azureAuthPlugin(input: { prompts: input.prompts, authorize: async (inputs) => ({ url: "https://learn.microsoft.com/azure/developer/ai/keyless-connections", - instructions: - "Sign in with `az login`. The signed-in Azure identity must have the Cognitive Services OpenAI User role for this resource.", + instructions: input.oauthInstructions, method: "auto" as const, callback: async () => ({ type: "success" as const, diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index aa62cba6527c..b18ce158f9d0 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -451,13 +451,13 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try 4. Choose an auth method. - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. - - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. + - **Microsoft Entra ID (OAuth via az cli)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services User` or `Foundry User` role for the resource. ```txt ┌ Select auth method │ │ API key - │ Microsoft Entra ID (OAuth via az login) + │ Microsoft Entra ID (OAuth via az cli) └ ``` From be5f5dbc2910bded49ccdd1ea9f945c033dc9ee6 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:13:47 +0200 Subject: [PATCH 08/11] fix: prefer azure cli expires_on for token cache --- packages/opencode/src/plugin/azure.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index 936f4020eab7..58f7776150d2 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -135,12 +135,18 @@ function azureCliTokenProvider() { throw new Error(stderr.trim() || "Failed to get Azure access token. Run `az login` and try again.") } - const result = JSON.parse(stdout) as { accessToken?: string; expiresOn?: string } + const result = JSON.parse(stdout) as { accessToken?: string; expires_on?: number; expiresOn?: string } if (!result.accessToken) throw new Error("Azure CLI did not return an access token") cached = { token: result.accessToken, - expires: result.expiresOn ? new Date(result.expiresOn).getTime() : Date.now() + 30 * 60 * 1000, + // Azure CLI's expiresOn is a timezone-less local datetime; expires_on avoids DST ambiguity. + expires: + typeof result.expires_on === "number" + ? result.expires_on * 1000 + : result.expiresOn + ? new Date(result.expiresOn).getTime() + : Date.now() + 30 * 60 * 1000, } return cached.token } From c0ecd5da0e3e6743717db1ac53169ba4be450e54 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:17:14 +0200 Subject: [PATCH 09/11] fix: validate azure cli token expiry parsing --- packages/opencode/src/plugin/azure.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/opencode/src/plugin/azure.ts b/packages/opencode/src/plugin/azure.ts index 58f7776150d2..1b8cbd6247fa 100644 --- a/packages/opencode/src/plugin/azure.ts +++ b/packages/opencode/src/plugin/azure.ts @@ -1,9 +1,16 @@ import type { Hooks, PluginInput } from "@opencode-ai/plugin" import { OAUTH_DUMMY_KEY } from "../auth" import { InstallationVersion } from "@opencode-ai/core/installation/version" +import { Option, Schema } from "effect" const AZURE_SCOPE = "https://cognitiveservices.azure.com" const AZURE_TOKEN_REFRESH_BUFFER = 60_000 +const AzureCliToken = Schema.Struct({ + accessToken: Schema.String, + expires_on: Schema.optional(Schema.Number), + expiresOn: Schema.optional(Schema.String), +}) +const decodeAzureCliToken = Schema.decodeUnknownOption(Schema.fromJsonString(AzureCliToken)) export async function AzureAuthPlugin(_input: PluginInput): Promise { return azureAuthPlugin({ @@ -135,17 +142,17 @@ function azureCliTokenProvider() { throw new Error(stderr.trim() || "Failed to get Azure access token. Run `az login` and try again.") } - const result = JSON.parse(stdout) as { accessToken?: string; expires_on?: number; expiresOn?: string } - if (!result.accessToken) throw new Error("Azure CLI did not return an access token") + const decoded = decodeAzureCliToken(stdout) + if (Option.isNone(decoded)) throw new Error("Azure CLI did not return an access token") cached = { - token: result.accessToken, + token: decoded.value.accessToken, // Azure CLI's expiresOn is a timezone-less local datetime; expires_on avoids DST ambiguity. expires: - typeof result.expires_on === "number" - ? result.expires_on * 1000 - : result.expiresOn - ? new Date(result.expiresOn).getTime() + decoded.value.expires_on !== undefined + ? decoded.value.expires_on * 1000 + : decoded.value.expiresOn + ? new Date(decoded.value.expiresOn).getTime() : Date.now() + 30 * 60 * 1000, } return cached.token From 5613ebb514ac4491d4aa16003b2d1bf2b1572a3b Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Mon, 22 Jun 2026 17:24:03 +0200 Subject: [PATCH 10/11] docs: fixed description of azure oauth --- packages/web/src/content/docs/providers.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index b18ce158f9d0..b416b7c7faa8 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -394,13 +394,13 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try 4. Choose an auth method. - **API key**: Paste either `KEY 1` or `KEY 2` from your resource. - - **Microsoft Entra ID (OAuth via az login)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. + - **Microsoft Entra ID (OAuth via az cli)**: Run `az login` first. The signed-in Azure identity must have the `Cognitive Services OpenAI User` role for the resource. ```txt ┌ Select auth method │ │ API key - │ Microsoft Entra ID (OAuth via az login) + │ Microsoft Entra ID (OAuth via az cli) └ ``` From 7adfe50b9a4af880e048e999d804405602bffc04 Mon Sep 17 00:00:00 2001 From: OpeOginni Date: Tue, 23 Jun 2026 00:14:44 +0200 Subject: [PATCH 11/11] fix(provider): resolve azure cognitive services resource vars --- packages/opencode/src/provider/provider.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 486ddae2caa4..73d943cd0d10 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -271,6 +271,7 @@ function custom(dep: CustomDep): Record { const env = yield* dep.env() const auth = yield* dep.auth(provider.id) const resourceName = [ + provider.options?.resourceName, auth?.type === "api" ? auth.metadata?.resourceName : undefined, auth?.type === "oauth" ? auth.accountId : undefined, env["AZURE_COGNITIVE_SERVICES_RESOURCE_NAME"], @@ -286,6 +287,14 @@ function custom(dep: CustomDep): Record { ? `https://${resourceName}.cognitiveservices.azure.com/openai` : undefined, }, + vars(_options): Record { + if (resourceName) { + return { + AZURE_COGNITIVE_SERVICES_RESOURCE_NAME: resourceName, + } + } + return {} + }, } }), "amazon-bedrock": Effect.fnUntraced(function* () {