Portability is one line, not a rewrite
Grid speaks the OpenAI protocol, so the client you already have works without a wrapper. What you gain is the ability to change your mind later.
- Published
On this page · 2 sections
Grid speaks the OpenAI protocol. The client library you already have works against it without a wrapper, an adapter, or a vendor SDK. You change the base URL and keep everything else.
from openai import OpenAI
client = OpenAI(
base_url="https://api.genai.forlex.cloud/v1",
api_key=os.environ["FORLEX_API_KEY"],
)
The point is not the saved afternoon#
Being able to move in one line is worth something, but it is not the argument. The argument is what the line buys you afterwards: you can swap models, pin a version, or let Grid pick a route for you, and none of those changes your integration.
That is the difference between a provider you can leave and a provider you have integrated with. The second one has priced its switching cost into your roadmap, whether or not anyone wrote it down.
Check the parameter before you depend on it#
Speaking a protocol is not the same as implementing every corner of it, and claiming otherwise would be the kind of thing you only discover in production. OpenAI compatibility lists what is supported today. Read it before you build on a parameter, not after.