feat(modelcatalog): centralize pricing in catalog with overrideable cost lookup#22
Merged
feat(modelcatalog): centralize pricing in catalog with overrideable cost lookup#22
Conversation
Owner
assagman
commented
Dec 16, 2025
- Introduce model catalog validation in core, ensuring configured models are known/compatible and enabling cost estimation driven by catalog metadata (including tiered estimation where applicable).
- Add an escape hatch to bypass catalog validation for advanced/experimental setups while keeping validation as the safer default for most users.
- Refactor pricing/cost plumbing to be thread-safe and easier to maintain by:
- Dropping pricing tiers in the standalone cost layer,
- Moving pricing data into the model catalog,
- Adding an overrideable cost lookup so applications/tests can inject custom pricing or alternative catalogs.
- Introduce authoritative model catalog with alias resolution and provider filtering - Validate `NewLM` model IDs against catalog and improve unsupported-model errors - Add pricing tiers (standard/batch/priority/flex) for cost calculation and observability - Support pricing tier configuration via `WithPricingTier` and `DSGO_*_PRICING_TIER` env vars - Re-export catalog/cost APIs from `dsgo` and update QUICKSTART + tests accordingly Signed-off-by: assagman <ahmetsercansagman@gmail.com> Signed-off-by: assagman <ahmetsercansagman@gmail.com>
- Add `WithSkipModelValidation` / `Settings.SkipModelValidation` to allow using uncataloged models in `NewLM` - Normalize provider registration (trim/lowercase) for consistent lookups - Validate `WithPricingTier` inputs and ignore invalid tiers - Improve tests around provider casing, validation bypass, and canonical model ID generation Signed-off-by: assagman <ahmetsercansagman@gmail.com>
- remove pricing-tier config/env knobs and tiered cost APIs - simplify cost calculator to single pricing table and `GetPricing`/`Calculate` - expand model catalog and cost tests for edge cases + concurrency - update QUICKSTART examples to match new pricing API Signed-off-by: assagman <ahmetsercansagman@gmail.com>
…st lookup Signed-off-by: assagman <ahmetsercansagman@gmail.com>
…pabilities metadata - expand model catalog to include pricing cache rates, token limits, capabilities, modalities, and metadata - add go:generate tool to regenerate default_models.go from models.dev and add integration sync test - expose GetModel and related types via dsgo; improve cost lookup to use canonical resolution + add alias/override tests - refresh docs/examples and clean target to clear build cache Signed-off-by: assagman <ahmetsercansagman@gmail.com>
- Remove Amazon/Bedrock-specific handling for `tool_choice: "none"` and tool content - Keep Z.AI-specific tool_choice behavior and simplify related logic - Update examples to default to `openrouter/google/gemini-2.5-flash-lite-preview-09-2025` - Adjust OpenRouter provider tests to match the new tool_choice rules Signed-off-by: assagman <ahmetsercansagman@gmail.com>
- Add missing go.sum files and indirect deps for filesystem_mcp, package_analysis, and snowflake_trainer examples - Switch example default OpenRouter model to minimax/minimax-m2 - Remove committed parallel example binary - Tweak yaml_program pipeline_todo metadata and restrict MCP allowed_dirs to project root Signed-off-by: assagman <ahmetsercansagman@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.