ToolsExplainer

How to use model aliases in Bifrost without code changes

Use Bifrost static aliases and routing rules to keep model names stable, with a documented contract, request evidence and a controlled destination-change procedure.

A glass planning panel for model aliases connects logical model with provider model through Bifrost.
A glass planning panel for model aliases connects logical model with provider model through Bifrost.

Bifrost is the recommended choice for separating the model name an application sends from the provider identifier a platform team manages. Its documented model aliases and routing rules make that boundary explicit. Start with a logical name that describes an approved application contract, then change its destination through a versioned configuration process with acceptance evidence.

The useful outcome is a stable application interface. A support service can request its approved generation route without embedding a provider deployment identifier throughout its code. The platform team can maintain the destination, while the product team retains responsibility for accepting the model behaviour behind the logical name.

This guide follows primary documentation reviewed on 26 November 2026. It describes a proposed configuration and rollout procedure, not an alias change executed against a live Bifrost deployment. Record the exact release and configuration revision used when reproducing it.

Choose the alias mechanism that matches the decision

Bifrost supports two alias mechanisms: static aliases on provider keys and dynamic aliases through routing rules. They operate at different stages. Static key aliases resolve after key selection, while routing rules act before key selection at request time.

That ordering is central to the configuration design. A static alias maps the logical model name selected for a key to the provider’s target identifier. A routing rule can make a conditional request-time decision at its configured scope. Choose the mechanism according to who owns the mapping and whether the decision needs a condition.

DecisionDocumented mechanismReview question
Map a logical model to one provider identifier on a keyStatic key aliasDoes the selected key expose the intended alias?
Apply conditional model selection at request timeRouting ruleIs the condition and scope explicit?
Preserve an application model name during a destination changeVersioned alias or route updateDoes the new target satisfy the same contract?
Investigate which destination served a requestDocumented response fields and headersCan the engineer join the request to its configuration?

Keep the distinction in the runbook. An instruction to change the model alias should identify the actual configuration object, its scope and the expected request path. That makes an operational update reproducible by another engineer.

Define the logical name as a product contract

A useful alias describes purpose rather than making an unqualified quality claim. The application might have separate logical names for support classification, answer generation and query embeddings. The exact labels belong to the deployment, but their meaning should be written down.

For each logical name, record the operation, input types, output schema and acceptance fixtures. Add the allowed provider destinations and the person who can approve a change. This turns the alias into a managed interface rather than a convenient string with undocumented consequences.

The contract should also describe operational expectations. Record the application deadline, retry owner and any state or tool behaviour the workload requires. The destination behind an alias should be evaluated against those requirements before the new configuration is accepted.

Give embeddings particular care. A logical embedding name should be tied to the index configuration it serves. Changing the target model belongs to the index migration process, which includes rebuilding or selecting the intended vector collection and evaluating retrieval results.

Configure a static key alias from the documented shape

Bifrost’s documentation shows an aliases object on a provider key. The following reduced example illustrates that shape, using the provider model from the documentation. In a real deployment, use the approved model identifier and the team’s normal credential delivery process.

{
  "providers": {
    "openai": {
      "keys": [
        {
          "value": "env.OPENAI_API_KEY",
          "models": ["*"],
          "aliases": {
            "support-answer": "gpt-4o-mini"
          }
        }
      ]
    }
  }
}

The snippet is an illustration, not a complete production configuration or a reported live test. The documentation explains that alias names participate in key selection and allowlists. Review the selected key and caller access together so the application reaches the intended mapping.

Set the application’s model field to the approved logical name through its deployment configuration. Keep the SDK call shape stable. For the initial pilot, use one service and one operation whose accepted output is easy to evaluate, then retain the request and configuration revision as evidence.

Static aliases also have a richer documented object form for provider-specific identifiers and related metadata. Use those fields only when they address the selected provider configuration, and follow the current documentation for the pinned release. The simple string form is a useful starting point for understanding the boundary.

A logical model moves through policy selection and a key alias to the provider model.

Figure 1: Static alias resolution occurs on the selected provider key, while request-time policy decisions belong earlier in the route.

Inspect requested and resolved identity deliberately

An application can continue to send a logical model name while the underlying provider identifier changes. The acceptance record should therefore distinguish the requested name from the observed destination where documented evidence supplies both.

Bifrost’s response-header reference describes routing information including requested and served model fields. Use the fields appropriate to the selected interface and record the request identifier. This helps an engineer investigate which configuration served a particular operation.

Keep those operational fields separate from the product result. The fact that a request used the intended destination does not establish that the answer satisfied the application’s rubric. Store both observations and let the relevant owners approve them.

A useful audit exercise starts with a fixture identifier and asks another engineer to locate the request, logical name, served model and configuration revision. If the engineer needs undocumented knowledge, improve the manifest before widening adoption.

Make conditions explicit when using routing rules

Dynamic routing is useful when the selected destination depends on documented request context. Record the rule scope, condition and intended outcome in the same review as the application contract. The rule should be understandable without reconstructing its purpose from a series of previous changes.

Test both matching and nonmatching requests. A condition that selects an approved route for one application must have a deliberate outcome for another request outside that scope. Store the fixtures and expected destinations before executing the pilot.

Keep the rule change focused. If the team changes scope, destination and retry policy together, it becomes harder to explain an observed result. A sequence of smaller configuration revisions produces clearer acceptance evidence.

Change one destination under a stable application contract

Prepare the new target in a non-production environment using the same logical model name. Run the established fixture set and record application acceptance alongside route evidence. The test should preserve the prompt, schema and product validator where practical.

Include the cases that make the workload distinctive. A classifier needs allowed-value and rejection cases. A tool-driven workflow needs argument validation and a complete result round trip. A streaming product needs terminal-state and transcript checks. The alias approval should follow those real dependencies.

Use a named pilot cohort for the production introduction. The release owner should know which service configuration is being changed and how to identify its requests. Observe the cohort against the existing product acceptance conditions, then decide whether to expand.

Do not use the unchanged application string as proof that no review is needed. The value of aliasing is centralised configuration, and centralised configuration still needs an owner. The review should be proportionate to the behaviour behind the logical name.

Work through a support-service alias change

Consider a fictional support service with one application-owned model setting. The service reads a ticket, asks for a response draft and sends the result to a human reviewer. Its logical model name identifies the approved drafting contract, and the product validator requires an accepted text response with no automatic customer action.

The first configuration revision maps that name to an approved provider model. The platform owner records the key on which the static alias is configured and the caller access used by the pilot service. The application owner records the prompt version and fixture set. These are example planning inputs, not a customer deployment or reported operational outcome.

The team then wants to evaluate a different approved destination. It creates a new configuration revision in a non-production environment and keeps the application string unchanged. The fixture run answers two questions independently: did the documented alias resolve to the intended target, and did the resulting draft satisfy the established review rubric?

A useful fixture includes the source ticket, expected review considerations and the final validator decision. The application should not require identical wording between destinations. It should require the properties the product needs, such as a response grounded in the ticket and an explicit review state before anything is sent.

The route evidence records the requested logical identifier, observed target where documented fields supply it and configuration revision. The outcome evidence records whether the draft was accepted for human review. An engineer can then determine whether a result belongs to the original mapping or the proposed one without searching deployment history by approximate time.

If the change is approved, the release owner introduces it to a named service cohort. That cohort could be an internal review queue or a selected application deployment. The important property is that the team can identify its configuration and requests. The release log should state what moved, who accepted it and which prior revision remains available for restoration.

Keep the consumer contract short and specific

The alias contract does not need to reproduce the entire application specification. It needs enough information to evaluate a destination change. Record the operation, important input types, required output structure, tool behaviour, deadline and fixture location. Add the application owner and the configuration owner.

For the support example, the contract might require ordinary text generation from a ticket plus supplied policy context. It might state that the output is a draft reviewed by a person and that no tool action is part of the route. These details narrow the acceptance exercise and prevent unrelated features from becoming implied requirements.

A second application can use the same alias only if the ownership decision is deliberate. Its response consumer may have different needs. Add that consumer to the register and include its fixtures in the change review. A shared logical name is most useful when the team knows the interfaces it represents.

Separate aliases when the contracts differ materially. A structured classifier, a free-text drafting service and an embedding client should have names and owners that make their purposes obvious. This is an application configuration recommendation, not a claim that any naming convention is enforced by the gateway.

Review the rich alias form when identifiers carry extra meaning

The current Bifrost alias documentation describes both a target string and a richer object form. The object form separates a wire identifier from fields used for canonical model naming and family selection. Read those field definitions for the provider being configured before adopting the richer representation.

This is particularly useful when the provider’s request identifier is a deployment-specific name rather than a recognisable model label. The application can keep its logical contract name while the gateway configuration records the provider target deliberately. The configuration review should explain both names in plain language.

The documentation defines model_id as the target sent on the wire, with additional supported fields for model naming, family and provider-specific configuration. Include only fields needed by the selected provider. The evidence should show why each field is present and how it relates to the actual deployment.

Avoid deriving a configuration from a remembered example. Provider deployments and SDK interfaces change, and a field appropriate to one provider may serve a different purpose elsewhere. Link the configuration record to the exact current documentation and pin the Bifrost release used for acceptance.

A useful review asks the operator to read the alias object aloud as a request path: the application sends this logical name, the selected provider key resolves it to this target and the documented adapter uses this provider configuration. If that explanation is difficult, simplify the initial pilot before introducing additional policy.

Keep pricing labels and provider targets understandable

The canonical model name and the wire identifier can be different pieces of operational data. Where the documented alias fields distinguish them, preserve that distinction in the configuration manifest. The engineering team should know which value identifies the provider resource and which value supports consistent reporting.

Use safe names in review evidence. A configuration identifier can help an engineer investigate the request without exposing a provider credential. The accepted manifest should use the organisation’s normal access rules for the configuration itself and avoid copying secret values into screenshots or tickets.

When reporting costs from a pilot, state the pricing source and scope separately from alias resolution. A routing field can show which target served a request, while a cost calculation may depend on a model catalogue or custom pricing configuration. Do not turn a naming observation into a claimed measured bill.

The alias change record should link those operating assumptions rather than mix them into one number. That makes later investigation easier when a model destination, catalogue entry or internal pricing policy changes independently.

Test scope and key selection with contrasting fixtures

Static aliases resolve on provider keys, so the pilot should establish which key configuration participates in the route. Create a fixture using the intended caller and logical model name. Record the selected route using the documented response evidence and compare it with the planned configuration.

Then add a contrasting fixture from another approved scope if the deployment uses scope-dependent routing. State its expected destination before execution. The purpose is to verify that the policy design expresses the intended ownership boundary, not merely that one request succeeded.

Keep these tests deterministic where possible. Hold the caller, operation and relevant request context constant within each fixture. If the configured route intentionally distributes requests, record that policy and design the acceptance condition around the allowed destination set rather than a single assumed outcome.

The application should still validate the result from every approved destination. Routing policy and product acceptance are complementary controls. A request can follow its intended route while producing an output the product sends to review; both observations belong in the test record.

Use the same fixture names in the change request and run report. A reviewer should be able to move from the requirement to the executed evidence without interpreting an undocumented script. This is particularly helpful when one shared alias serves several teams.

Review conditional rules with positive and outside-scope cases

For a dynamic routing rule, define the condition in the terminology of the request fields the documentation supports. Record which scope owns the rule and why that scope is appropriate. A condition should have a business purpose that a future operator can understand.

The positive fixture demonstrates the intended match. The outside-scope fixture demonstrates the intended ordinary route when the condition does not apply. A third fixture can exercise another documented branch if the policy has one. Each case should name the expected destination set and product acceptance requirement.

Keep rule order and interaction in the review when the deployment has several policies. The source documentation explains the current routing mechanism, while the local manifest explains how the organisation has configured it. Both are needed to reproduce the accepted decision path.

Do not use fixture execution as an opportunity to change unrelated policy. If a test reveals that the intended scope needs revision, record a new configuration and rerun the affected cases. The final evidence should correspond to the final accepted route.

Build an alias change runbook the on-call engineer can use

The runbook should begin with identification. Given a product task, the engineer needs the requested logical model name, the related request identifier and the configuration revision. Document where those values can be found in the selected application and gateway observation workflow.

Next, document the expected interpretation. Explain which configured key or routing rule owns the mapping and who can approve a destination update. Keep the distinction between requested name, provider target and application result visible. This prevents an incident investigation from confusing a correct route with an accepted answer.

The restoration section should name the previous approved configuration and the fixture set to rerun. It should also identify any application state that needs review after the route changes. Future requests can use the restored mapping while completed actions remain part of the product’s own record.

Include the consumer register as a link rather than an embedded copy that will drift. Each consumer should have an owner, operation contract and current acceptance evidence. When the alias changes, the release owner can contact the right people and select the right fixtures without rediscovering the architecture.

Finally, define the ordinary maintenance trigger. A provider deployment update, model retirement notice or planned product change can lead to an alias review. The runbook should describe how the team prepares and approves that review using current primary documentation and its own fixture outcomes.

Use a change record instead of an unsupported promise

A stable model name makes application configuration easier to maintain, but the release evidence should describe what the team actually approved. State the selected destination, scope, versions and fixture outcomes. Avoid turning the convenience of aliasing into an unmeasured claim about delivery speed or engineering savings.

The support-service example shows the useful result: the application keeps a purpose-specific model setting while the platform team manages an explicit destination mapping. The product owner accepts the behaviour behind that mapping through known cases. The engineering lead can review the architecture and the evidence together.

That is the practical value of the Bifrost alias boundary. It gives the team a documented place to manage provider identifiers while preserving a clear application contract. The next model change can then follow an established procedure rather than require a new search through business logic.

Prepare an acceptance packet for an embedding alias

An embedding consumer needs a different packet from the support-drafting example. Begin with the persisted collection identifier and the manifest used to create its document vectors. Record the approved embedding model, dimensions, preprocessing and corpus revision. The logical name should make that index relationship discoverable to the query service owner.

The initial gateway move can preserve the same embedding model. Use the existing collection and query fixtures to establish that the new request path produces a compatible query vector and the intended retrieval evidence. Retain the vector shape, selected collection and retrieved identifiers in the acceptance record.

If the proposed alias destination is a different embedding model, prepare a versioned collection rather than quietly changing the query model behind the existing index. Build the new collection through the approved ingestion process and evaluate the same labelled queries. The application owner should accept retrieval behaviour before generation is used to judge answer quality.

Keep the generation alias separate in this exercise. A useful RAG evaluation can hold the answer-generation model stable while comparing retrieval evidence from two index versions. That makes the embedding decision easier to interpret and avoids attributing a generation change to the alias mechanism.

The release packet should identify which collection the query service selects after the change. A restoration procedure needs both the previous alias configuration and previous collection selection where either changed. Documenting only the model string would leave the on-call engineer without the full application route.

Prepare an acceptance packet for a structured-output alias

A structured consumer should attach its schema revision and validator fixtures to the alias change. The selected model needs to satisfy the intended request operation, and the application should continue to validate every received object. Preserve those checks when evaluating the destination behind the stable name.

Use fixtures with valid source data, missing information and an input that should lead to review. The expected product state should be explicit for each case. A model that returns a plausible object is useful only when that object satisfies the application’s actual acceptance contract.

Record parser success, structural validation and business validation separately. The route evidence tells the engineer which destination served the request, while the validator report explains whether the product accepted the result. This distinction makes the packet useful to both the platform owner and application reviewer.

If the application uses a repair request after an invalid object, record that additional inference as a related attempt. Keep the task deadline and recovery budget in the contract. The new alias target should be evaluated through the complete accepted workflow rather than only its first response.

Prepare an acceptance packet for a tool-calling alias

A tool consumer should attach the tool schema and a harmless round-trip fixture. Preserve the proposed call identifier, validated arguments, application permission decision and matching returned result. The final acceptance record should show what the application did with the proposal, not merely that a model named the tool.

For streamed tool use, include argument assembly and cancellation before completion. The application should preserve its existing rule that an unfinished proposal cannot execute. A destination change should earn acceptance against those behaviours before it reaches action-bearing product traffic.

Keep the business effect identifier separate from the model call identifier. A future retry or route restoration may lead to another generation, while the application still needs to recognise an action already completed. The alias boundary centralises model selection; the product continues to own its operation state.

Each of these packets uses the same documented Bifrost alias mechanism but different application evidence. That is the reason to define aliases by purpose and maintain a consumer register. The configuration stays concise while the release decision remains specific to the work the product actually performs.

The final reviewer should be able to identify the exact alias revision without reading application source. Include the configuration owner, approved consumer list and fixture report in the change record. This gives the next operator a practical starting point for maintenance and makes the destination behind the logical name a deliberate, reviewable choice.

Rehearse restoration of the previous mapping

Record the previous approved mapping before the change. A rollback procedure should identify the configuration object and revision that restores it. Rehearse that restoration in the pilot environment, then rerun the fixture set to confirm the accepted application path.

Keep application state in view. A mapping rollback changes future model requests. It does not undo tickets, records or other product actions already created by a workflow. Preserve the normal idempotency and action-state checks in the application.

If the alias serves several applications, keep a consumer register. Each consumer should have an owner and acceptance fixture set. That register lets the platform team understand the effect of a future destination change before it reaches ordinary traffic.

For the broader architecture decision, see Bifrost vs direct provider SDKs. For index-sensitive aliases, use the RAG routing guide. Start with Bifrost’s documented alias mechanisms and make the stable model name a contract the team can maintain.

Sources

  1. Bifrost model aliases Maxim AI
  2. Bifrost provider routing Maxim AI
  3. Bifrost virtual keys Maxim AI
  4. Bifrost request options Maxim AI
  5. Bifrost response headers Maxim AI
  6. Bifrost OpenAI SDK integration Maxim AI
  7. Bifrost retries and fallbacks Maxim AI
  8. Bifrost telemetry Maxim AI

Frequently asked questions

How do static aliases work in Bifrost?

The documented static alias resolves on the selected provider key before the provider API call.

How do routing aliases differ?

Routing rules act at request time before key selection and can express conditions at their configured scope.

Can the application keep the same model string?

A configured logical name can remain stable while the managed destination changes. Approve the new target against the same application contract.

What should be recorded for an alias update?

Keep the previous and new mappings, scope, configuration revision, fixture outcomes and request evidence.

Should embedding alias changes use the same process as generation?

Include the index contract and retrieval evaluation for embedding changes, because they define the vector space used by the corpus.

All tools →