Keep batching gpt-oss and Gemma 4 after Oct 30

OpenAI's gpt-oss-120b and gpt-oss-20b are now available on Batchrate as of Oct 27. Both are open-weight models made in the US by OpenAI and released under the Apache 2.0 license.

Google's Gemma 4 26B A4B is also available as of Oct 27. It's an open-weight model made in the US by Google, released under Apache 2.0.

If your provider is retiring gpt-oss or Gemma 4 26B (Doubleword stops serving these models after October 30, 2026), you can keep the same model and the same batch workflow. Batchrate is an OpenAI-compatible Files + Batches API. To switch, you change three things: base_url, your API key, and the model name. Your JSONL files, polling code and output parsing stay the same.

Before / after

# Before
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://<your-current-provider>/v1",
    api_key=os.environ["OLD_PROVIDER_API_KEY"],
)
MODEL = "<old-gpt-oss-120b-id>"
# After: Batchrate
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.batchrate.ai/v1",
    api_key=os.environ["BATCHRATE_API_KEY"],
)
MODEL = "gpt-oss-120b"   # or "gpt-oss-20b"

# Unchanged: upload JSONL (each line's body.model = MODEL) and create the batch
f = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")
batch = client.batches.create(
    input_file_id=f.id,
    endpoint="/v1/chat/completions",
    completion_window="24h",
)
print(batch.id, batch.status)

Make sure to update the model field inside each JSONL line too.

Gemma 4 26B: before / after

# Before
MODEL = "<old-gemma-4-26b-id>"
# After: Batchrate (same client setup as above)
MODEL = "gemma-4-26b-a4b"

A JSONL line looks like:

{"custom_id": "row-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gemma-4-26b-a4b", "messages": [{"role": "user", "content": "Summarize: ..."}]}}

Gemma 4 26B is text-only on Batchrate.