Evanesca's models in your Microsoft Foundry agents.
Foundry Agent Service can call models hosted outside Azure through a gateway connection — Microsoft calls it “bring your own model”. Evanesca's API is such a gateway: connect it once, and the models you declare become deployments you can pick when you build an agent, with the inference run in Europe.
SoonOpening soon: what follows describes the service as it will work.
Before you start
- An Azure subscription and a Microsoft Foundry project.
- The Foundry User role (or higher) on the project, and Contributor on the resource group: the connection is deployed as a resource. Microsoft renamed these roles; you may still see Azure AI User.
- An Evanesca API key and credit above zero: an agent whose calls get 402 stops answering.
- The IDs of the models you want to offer, from GET /models — for example mistral-large-4 or deepseek-v4.1-flash (model table).
# The catalogue needs no key: the names you declare in Foundry come from here
curl https://evanesca.app/api/v1/models
# The chat endpoint needs the key Foundry will carry
curl https://evanesca.app/api/v1/chat/completions \
-H "Authorization: Bearer $EVANESCA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemma-4-26b", "messages": [{"role": "user", "content": "ping"}]}'Step by step
- Open the connection wizard
In the Foundry portal, select Manage, then Resource details. On the Admin-connected models tab, select Add.
- Choose Other source
On the Connection type page, pick Other source — the option for a self-hosted or non-Azure gateway. Give the connection a short name, such as evanesca: it will prefix every model reference. Put https://evanesca.app/api/v1 in Base URL; Foundry appends /chat/completions itself.
- Enter the key
On the Authentication page, choose API key. Paste your Evanesca key in API key, put Authorization in API key header name and Bearer {api_key} in API key header value.
- Declare the models
On the Model configuration page, select + Add model for each model your teams may use. Name is the Evanesca ID exactly as GET /models gives it (gemma-4-26b, for example) — it is what goes in the call; Display name is up to you. Leave Version empty.
- Leave the advanced settings as they are
On the Advanced page, leave API version empty and Include deployment name in URL path off: Evanesca uses OpenAI's /chat/completions path, with no deployment name. No extra header is needed. Select Add.
- Use it in an agent
Each declared model becomes a deployment. In your agent, the model reads <connection-name>/<model-name> — here evanesca/gemma-4-26b. Only prompt agents in the Agent SDK support it.
| Field | Value |
|---|---|
| Connection type | Other source |
| Connection name | evanesca |
| Base URL | https://evanesca.app/api/v1 |
| Authentication | API key |
| API key | Your Evanesca key |
| API key header name | Authorization |
| API key header value | Bearer {api_key} |
Provisioning as code? Microsoft's foundry-samples repository has Bicep templates for ModelGateway connections, deployed with az deployment group create.
import os
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition
from azure.identity import DefaultAzureCredential
project = AIProjectClient(
endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(),
)
agent = project.agents.create_version(
agent_name="eu-assistant",
definition=PromptAgentDefinition(
model="evanesca/gemma-4-26b", # <connection-name>/<model-name>
instructions="You are a helpful assistant.",
),
)
openai = project.get_openai_client()
conversation = openai.conversations.create()
reply = openai.responses.create(
conversation=conversation.id,
input="Hello",
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(reply.output_text)Source
Steps and labels follow Microsoft's guide, Bring your own model to Foundry Agent Service, read on 6 Oct 2026; the Python code follows its description — check the current signatures in the Agent SDK samples. This guide has not been run end to end against Evanesca yet: the API opens soon.
What changes, and what does not
What changes: Microsoft no longer serves the model. The inference runs at the operator behind the model you picked — in France by Scaleway and OVHcloud (as a fallback), in Mistral AI's own EU region, in Germany by AKI.IO and in Switzerland by Infomaniak — and the weights, the GPUs and the writing of the answer stay with that operator.
What does not: the agent still runs in Foundry. Prompts, tool calls and conversation history go through Microsoft's orchestration before they reach Evanesca. Microsoft says so from its side: with a bring-your-own model, you are responsible for reviewing the data you share with it and for your own safety measures, such as content filters (Microsoft Learn).
This setup therefore answers “our agents must not run on a US-hosted model”, not “no US company may process our data”. For the second, call Evanesca's API directly — same key, same models, no detour through Azure.
Troubleshooting
| Symptom | What to do |
|---|---|
| The connection shows Inactive | Microsoft points to the base URL and the credentials. Check both with curl: /models answers without a key, /chat/completions needs it. |
| model not found | The agent's model must read <connection-name>/<model-name>, not the ID alone. |
| 402, the agent stops answering | Your credit has run out. Add credit: calls resume at once. |
| 404 model_not_found from Evanesca | You declared an ID that is not in Evanesca's catalogue: a typo, or a model Evanesca does not serve. Remove it from the connection, or pick one from GET /models. |
| Timeouts on a reasoning model | A reasoning model can think for minutes. Raise the timeout on the calling side rather than lowering max_tokens, which would hand the whole budget to thinking. |
| An agent tool never fires | Foundry accepts its function tools with a bring-your-own model, but whether tool calls come back depends on the model: check its row in the model table, and test with one simple tool first. |
Frequently asked questions
Do Evanesca's models appear in Foundry's model catalogue?
No. This guide goes through “bring your own model”: the inference stays outside Azure, and the models still become selectable in your agents.
Do I need a Microsoft partnership or a Marketplace purchase?
No. An admin creates the connection in your own Azure tenant, with your Evanesca key. Billing stays with Evanesca: prepaid credit, per token, no subscription.
Does my data stay in Europe?
The inference does: every Evanesca model runs in Europe. The orchestration does not: the agent runs in Foundry, so prompts go through Microsoft before they reach Evanesca. If that is not acceptable, call Evanesca's API directly.
Can I go through Azure API Management?
Yes. Microsoft documents an API Management connection type for gateways behind APIM: point APIM at Evanesca's base URL, and Foundry authenticates to APIM with a subscription key or a managed identity.
One connection, and your agents' models run in Europe.
One Evanesca key, one Other source connection, and the models run in Europe show up in Foundry.