Managing Model Versions
Model Versions and Time-Based Resolution
In the list of Managed Categories and Resources, you'll find both model aliases (like gpt-4o) and specific versioned models (like gpt-4o-2024-08-06). Model aliases are simplified, non-versioned names that point to specific versioned models based on the timestamp of your request.
How Time-Based Resolution Works
Pay-i uses a time-based partition system for model resolution:
- Each specific model version (like
gpt-4o-2024-08-06) has an associated release date - When you use a model name in your code, Pay-i automatically resolves it to the correct version based on the timestamp of the event in your request
- The combination of (model name, event timestamp) uniquely resolves to exactly one resource version
- Model versions are partitioned in time based on their release dates, with the cutoff being midnight UTC
This is especially important for historical data backfilling: when ingesting past events, model names map to the versions that were current at the time of the original requests, not to the current versions.
Model naming conventions vary across providers. Some providers (like OpenAI, Anthropic, and Google Vertex AI) offer model aliases, while others (like Azure OpenAI and AWS Bedrock) typically use specific model version identifiers.
Both approaches have their own benefits and tradeoffs:
-
Using model aliases:
- No need to update code when newer versions are released
- Simplified usage without remembering specific version dates
- Important Note: Model aliases are controlled by the provider (e.g., OpenAI, Anthropic), not by Pay-i. When a provider changes what version an alias points to (e.g., OpenAI updating
gpt-4oto point to a newer version), your code automatically uses that new version on your next API call. This happens without notification or your explicit approval.
-
Using specific model versions:
- Explicit control over which model version you're using
- Consistency in behavior across deployments
- Version locking for compliance or quality control
- You decide when to upgrade to newer versions, not the provider
You can use either approach in your code based on your specific requirements:
# Using a model name (automatically resolves based on timestamp)
client.ingest.units(
category="system.openai",
resource="gpt-4o", # Will resolve to the appropriate version based on timestamp
units={"text": {"input": 10, "output": 50}}
)
# Using a specific versioned model
client.ingest.units(
category="system.openai",
resource="gpt-4o-2024-08-06", # Explicitly using this specific version
units={"text": {"input": 10, "output": 50}}
)Updated 5 days ago
