Skip to content

feat(modelcatalog): centralize pricing in catalog with overrideable cost lookup#22

Merged
assagman merged 7 commits intomainfrom
feat/model-catalog
Dec 16, 2025
Merged

feat(modelcatalog): centralize pricing in catalog with overrideable cost lookup#22
assagman merged 7 commits intomainfrom
feat/model-catalog

Conversation

@assagman
Copy link
Owner

  • 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>
@assagman assagman self-assigned this Dec 16, 2025
@assagman assagman added bug Something isn't working enhancement New feature or request labels Dec 16, 2025
…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>
@assagman assagman merged commit 826c721 into main Dec 16, 2025
4 checks passed
@assagman assagman deleted the feat/model-catalog branch December 16, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments