Skip to main content

From OpenAI

Change the base URL and the key. The request and response bodies are unchanged.
At this point everything works and nothing is measured. Add task to make the calls attributable.

From Anthropic

The Anthropic SDK does not speak the OpenAI message format, so this is a client swap rather than a URL swap. Install the OpenAI SDK, point it at Protégé, and pin the Anthropic model you were already using:
Two differences to expect. Anthropic’s top-level system argument becomes a message with role: "system", and max_tokens is optional here rather than required. Pinning keeps behaviour identical while the task accumulates enough history to be worth routing.

From a gateway

If you already front your providers with a gateway, you are most of the way there: keep your provider-prefixed model strings, change the base URL, and add task. The difference is what the label buys. A gateway routes on rules you write. Protégé routes on whether a cheaper model clears that task’s eval, which is a question you cannot answer from request metadata alone.

Passing task through an SDK

The OpenAI SDKs validate request bodies and drop unknown fields, so task needs an explicit escape hatch.
If protege.task comes back absent on a response, the field was stripped before it reached us. Check the escape hatch for your SDK above.

A sensible rollout

1

Shadow one path

Point a single low-risk call path at Protégé with the model pinned to whatever it uses today. Behaviour is identical; you are only proving the hop works.
2

Label everything on that path

Add task to each distinct call. Now the path’s spend splits by workload.
3

Read the split

We report spend back per task. The expensive ones are the candidates, and they are usually not the ones people guess before they measure.
4

Write a contract for the top task

Define what correct means for that one task, then let routing move it.

Getting the task boundaries right

The step that decides whether any of the numbers mean anything.