Skip to content

Mapping capabilities and parameters

Logit bias, logprobs, seeds, caching, structured output, context windows — the features that do not map one to one.

Most of a migration between two model providers is mechanical. The message array becomes a slightly different message array, the token limit is spelled differently, the streaming events carry the same text under other names. That part is tedious and it is finishable. What decides whether the migration lands is the small set of things on the source side that have no counterpart on the target side at all — a parameter the new provider does not accept, a response field it never populates, a guarantee it declines to make.

These pages are about that residue. Each one takes a capability, says what the concept actually is, shows how each API expresses it, and then spends most of its length on the part that does not survive the translation: what breaks quietly, what you can rebuild from other primitives, and what you have to stop doing. Where a capability simply does not exist on the target, the honest page is the one that says so and tells you what to do instead.

Mapping Content Moderation and Safety Fields Between APIs

The same safety event arrives as a separate endpoint, a finish-reason value, an empty candidate list or an HTTP 400 depending on whose API you call.

9 min read

What "Function Calling" Meant Before "Tool Calling", and What Changed

The rename from functions to tools changed four shapes at once, and a migration that updates only the request keeps failing on the reply.

10 min read

Fixing "function_call is deprecated, use tool_calls"

Where that warning is actually emitted, the five-line rewrite that clears it, and the four errors a half-finished rewrite produces.

8 min read

Migrating Logit Bias Usage Between Providers

A token-id-keyed bias map is not portable between models, let alone between providers, and most uses of it have a better replacement anyway.

10 min read

What to Do When the Target Provider Has No Logprobs Support

Which uses of token probabilities can be rebuilt from sampling and constrained output, and which cannot be rebuilt at all.

10 min read

Mapping Seed and Determinism Parameters Between APIs

Four providers spell the seed differently and none of them promises it works; the mapping that matters is the list of other things you must pin alongside it.

9 min read

Why "Deterministic" Output Is Not Deterministic After a Migration

The seed you carried across pins the sampler, and the sampler was never the part that differed between the two providers.

9 min read

Migrating a Chatbot's Conversation Memory Format

Converting a framework's stored memory object into a plain message array, including the four cases where the stored object holds something a message array cannot express.

10 min read

What Breaks in a RAG App's Prompt Template After a Provider Swap

Separate the retrieval change from the generation change first, because a provider swap usually moves the embedding model too and that is a different bug.

10 min read

Auditing Every Hardcoded Provider Assumption in a Codebase

Nine grep passes that turn an unknown-size migration into an inventory, ranked by which assumptions fail loudly and which fail silently.

10 min read

Writing an Adapter Layer to Isolate Provider-Specific Code

Build a thin chat interface so that changing model provider touches one file instead of every call site, and know which leaks the interface must not paper over.

10 min read

Migrating Retry and Backoff Logic Between Providers

Why retry logic ported unchanged retries errors that will never succeed, and how to rebuild the retryable-error classifier around the new provider's conventions.

10 min read

Mapping HTTP Status Codes to Error Meaning Across Providers

Why the same status code carries different underlying causes on different model APIs, and where the real discriminator lives in the response.

9 min read

Migrating a Prompt-Caching Setup Between Providers

How explicit cache breakpoints and automatic prefix matching differ in what they demand of your prompt, and what has to be restructured for caching to keep working after a switch.

11 min read

What Happens to Cache Hit Rates Right After a Provider Migration

Why a fresh cache starts at zero hit rate, how long it takes to recover the old cost baseline, and how to tell a warm-up from a structural break.

10 min read

Migrating Structured Output Schemas Between Providers

Which JSON Schema keywords survive the move between providers' structured-output features, and how to write one schema that passes on both.

10 min read

Fixing "Invalid Schema" After Moving Structured Outputs to a New Provider

Reading the error message down to the offending keyword, and fixing the four causes that only appear after a provider switch.

9 min read

Migrating Multi-Modal Prompts Between Providers

Rewriting a prompt that carries an image for a different provider's content-block format, including the encoding difference that silently breaks the payload.

10 min read

Auditing Context Window Assumptions Before a Model Migration

Measuring the largest prompt your code actually sends, against the new model's real limit, before the truncation shows up in production.

10 min read

What Happens When a Migration Target Has a Smaller Context Window

The error you get, the triage procedure that tells you which fix applies, and the honest tradeoffs of truncation, summarisation and chunking.

11 min read

Other topics