"""DO NOT EDIT THIS FILE DIRECTLY, INSTEAD RUN `make package-data`"""

import datetime
from decimal import Decimal

from .types import *

__all__ = ('providers',)

providers: list[Provider] = [
    Provider(
        id='anthropic',
        name='Anthropic',
        api_pattern='https://api\\.anthropic\\.com',
        pricing_urls=['https://www.anthropic.com/pricing#api'],
        model_match=ClauseContains(contains='claude'),
        provider_match=ClauseContains(contains='anthropic'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_creation_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path='cache_creation_input_tokens', dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['cache_creation', 'ephemeral_5m_input_tokens'],
                        dest='cache_write_5m_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['cache_creation', 'ephemeral_1h_input_tokens'],
                        dest='cache_write_1h_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(
                        path=['server_tool_use', 'web_search_requests'], dest='web_searches', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'thinking_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cached_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='claude-2',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='claude-2'), ClauseContains(contains='claude-v2')]),
                name='Claude 2.0 / 2.1',
                description="Claude 2 is Anthropic's previous generation model, offering reliable performance for various tasks. This includes Claude 2.0 and Claude 2.1.\n",
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('8'), output_mtok=Decimal('24')),
            ),
            ModelInfo(
                id='claude-3-5-haiku-latest',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-3-5-haiku'),
                        ClauseStartsWith(starts_with='claude-3.5-haiku'),
                    ]
                ),
                name='Claude Haiku 3.5',
                description='Fastest, most cost-effective model',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'),
                    cache_write_mtok=Decimal('1'),
                    cache_read_mtok=Decimal('0.08'),
                    output_mtok=Decimal('4'),
                    cache_write_1h_mtok=Decimal('1.6'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-3-5-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-3-5-sonnet'),
                        ClauseStartsWith(starts_with='claude-3.5-sonnet'),
                    ]
                ),
                name='Claude Sonnet 3.5',
                description='Claude 3.5 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                    cache_write_1h_mtok=Decimal('6'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-3-7-sonnet-latest',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-3-7-sonnet'),
                        ClauseStartsWith(starts_with='claude-3.7-sonnet'),
                        ClauseStartsWith(starts_with='claude-sonnet-3.7'),
                        ClauseStartsWith(starts_with='claude-sonnet-3-7'),
                    ]
                ),
                name='Claude Sonnet 3.7',
                description='Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                    cache_write_1h_mtok=Decimal('6'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-3-haiku',
                match=ClauseStartsWith(starts_with='claude-3-haiku'),
                name='Claude Haiku 3',
                description='Fastest, most cost-effective model',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'),
                    cache_write_mtok=Decimal('0.3'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('1.25'),
                    cache_write_1h_mtok=Decimal('0.5'),
                ),
            ),
            ModelInfo(
                id='claude-3-opus-latest',
                match=ClauseStartsWith(starts_with='claude-3-opus'),
                name='Claude Opus 3',
                description="Claude 3 Opus was Anthropic's most powerful model for highly complex tasks. It boasts top-level performance, intelligence, fluency, and understanding.",
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                    cache_write_1h_mtok=Decimal('30'),
                ),
            ),
            ModelInfo(
                id='claude-3-sonnet',
                match=ClauseStartsWith(starts_with='claude-3-sonnet'),
                name='Claude 3 Sonnet',
                description='Claude 3 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                    cache_write_1h_mtok=Decimal('6'),
                ),
            ),
            ModelInfo(
                id='claude-fable-5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='claude-fable-5'), ClauseRegex(regex='^claude-fable-5-\\d{8}$')]
                ),
                name='Claude Fable 5',
                description='For demanding reasoning and long-horizon agentic work',
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                    cache_write_1h_mtok=Decimal('20'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-fable-5-1',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='claude-fable-5-1'), ClauseRegex(regex='^claude-fable-5-1-\\d{8}$')]
                ),
                name='Claude Fable 5.1',
                description="Anthropic's most capable widely released model for demanding reasoning and long-horizon agentic work",
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Cache hits are 0.025x base input (not the usual 0.1x), unique to Fable 5.1 and Mythos 5.1. Ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('50'),
                    cache_write_1h_mtok=Decimal('20'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-haiku-4-5',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-haiku-4-5'),
                        ClauseStartsWith(starts_with='claude-haiku-4.5'),
                        ClauseStartsWith(starts_with='claude-4-5-haiku'),
                        ClauseStartsWith(starts_with='claude-4.5-haiku'),
                    ]
                ),
                name='Claude Haiku 4.5',
                description='Fastest and most intelligent Haiku model',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('1'),
                    cache_write_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('5'),
                    cache_write_1h_mtok=Decimal('2'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-0'),
                        ClauseStartsWith(starts_with='claude-4-opus'),
                        ClauseEquals(equals='claude-opus-4'),
                        ClauseEquals(equals='claude-opus-4-20250514'),
                    ]
                ),
                name='Claude Opus 4',
                description='Most intelligent model for complex tasks',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                    cache_write_1h_mtok=Decimal('30'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-1',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-1'),
                        ClauseStartsWith(starts_with='claude-opus-4.1'),
                    ]
                ),
                name='Claude Opus 4.1',
                description='Most intelligent model for complex tasks',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                    cache_write_1h_mtok=Decimal('30'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-5',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-5'),
                        ClauseStartsWith(starts_with='claude-opus-4.5'),
                        ClauseStartsWith(starts_with='claude-4-5-opus'),
                        ClauseStartsWith(starts_with='claude-4.5-opus'),
                    ]
                ),
                name='Claude Opus 4.5',
                description='Premium model combining maximum intelligence with practical performance',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                    cache_write_1h_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-6',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-6'),
                        ClauseStartsWith(starts_with='claude-opus-4.6'),
                        ClauseStartsWith(starts_with='claude-4-6-opus'),
                        ClauseStartsWith(starts_with='claude-4.6-opus'),
                    ]
                ),
                name='Claude Opus 4.6',
                description='Our most intelligent model for building agents and coding',
                context_window=1000000,
                price_comments='One-hour cache writes cost 2x the base input price. The 1M context window is generally available. Refs: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing, https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=200000, price=Decimal('10'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('6.25'), tiers=[Tier(start=200000, price=Decimal('12.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.5'), tiers=[Tier(start=200000, price=Decimal('1'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('25'), tiers=[Tier(start=200000, price=Decimal('37.5'))]
                            ),
                            cache_write_1h_mtok=TieredPrices(
                                base=Decimal('10'), tiers=[Tier(start=200000, price=Decimal('20'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 3, 13)),
                        prices=ModelPrice(
                            input_mtok=Decimal('5'),
                            cache_write_mtok=Decimal('6.25'),
                            cache_read_mtok=Decimal('0.5'),
                            output_mtok=Decimal('25'),
                            cache_write_1h_mtok=Decimal('10'),
                            web_searches_kcount=Decimal('10'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='claude-opus-4-7',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-7'),
                        ClauseStartsWith(starts_with='claude-opus-4.7'),
                        ClauseStartsWith(starts_with='claude-4-7-opus'),
                        ClauseStartsWith(starts_with='claude-4.7-opus'),
                    ]
                ),
                name='Claude Opus 4.7',
                description='Our most capable model for complex reasoning and agentic coding',
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                    cache_write_1h_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-8',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-opus-4-8'),
                        ClauseStartsWith(starts_with='claude-opus-4.8'),
                        ClauseStartsWith(starts_with='claude-4-8-opus'),
                        ClauseStartsWith(starts_with='claude-4.8-opus'),
                    ]
                ),
                name='Claude Opus 4.8',
                description='Our most capable model for complex reasoning and agentic coding',
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                    cache_write_1h_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='claude-opus-5'),
                        ClauseRegex(regex='^claude-opus-5-\\d{8}$'),
                        ClauseStartsWith(starts_with='claude-opus-5.0'),
                        ClauseStartsWith(starts_with='claude-5-opus'),
                        ClauseStartsWith(starts_with='claude-5.0-opus'),
                    ]
                ),
                name='Claude Opus 5',
                description='For complex agentic coding and enterprise work',
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Refs: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing and https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                    cache_write_1h_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-opus-5-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='claude-opus-5-5'),
                        ClauseRegex(regex='^claude-opus-5-5-\\d{8}$'),
                        ClauseStartsWith(starts_with='claude-opus-5.5'),
                        ClauseStartsWith(starts_with='claude-5-5-opus'),
                        ClauseStartsWith(starts_with='claude-5.5-opus'),
                    ]
                ),
                name='Claude Opus 5.5',
                description='For long-running agentic coding and knowledge work',
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Cache hits are 0.05x base input (not the usual 0.1x), unique to Opus 5.5. Ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_write_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('20'),
                    cache_write_1h_mtok=Decimal('8'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-4-0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-sonnet-4-2025'),
                        ClauseStartsWith(starts_with='claude-sonnet-4-0'),
                        ClauseStartsWith(starts_with='claude-sonnet-4@'),
                        ClauseEquals(equals='claude-sonnet-4'),
                        ClauseStartsWith(starts_with='claude-4-sonnet'),
                    ]
                ),
                name='Claude Sonnet 4',
                description='Optimal balance of intelligence, cost, and speed',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                    cache_write_1h_mtok=Decimal('6'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-4-5',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-sonnet-4-5'),
                        ClauseStartsWith(starts_with='claude-sonnet-4.5'),
                    ]
                ),
                name='Claude Sonnet 4.5',
                description='Our best combination of speed and intelligence',
                context_window=200000,
                price_comments='One-hour cache writes cost 2x the base input price. The 1M context beta was retired on 2026-04-30; requests over 200k now error. The >200k tiers describe historical usage from before retirement. Refs: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing, https://platform.claude.com/docs/en/release-notes/overview',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('3'), tiers=[Tier(start=200000, price=Decimal('6'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('3.75'), tiers=[Tier(start=200000, price=Decimal('7.5'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=200000, price=Decimal('0.6'))]),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=200000, price=Decimal('22.5'))]),
                    cache_write_1h_mtok=TieredPrices(
                        base=Decimal('6'), tiers=[Tier(start=200000, price=Decimal('12'))]
                    ),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-4-6',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-sonnet-4-6'),
                        ClauseStartsWith(starts_with='claude-sonnet-4.6'),
                    ]
                ),
                name='Claude Sonnet 4.6',
                description='Our best combination of speed and intelligence',
                context_window=1000000,
                price_comments='One-hour cache writes cost 2x the base input price. Ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('3'), tiers=[Tier(start=200000, price=Decimal('6'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('3.75'), tiers=[Tier(start=200000, price=Decimal('7.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.3'), tiers=[Tier(start=200000, price=Decimal('0.6'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('15'), tiers=[Tier(start=200000, price=Decimal('22.5'))]
                            ),
                            cache_write_1h_mtok=TieredPrices(
                                base=Decimal('6'), tiers=[Tier(start=200000, price=Decimal('12'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 3, 13)),
                        prices=ModelPrice(
                            input_mtok=Decimal('3'),
                            cache_write_mtok=Decimal('3.75'),
                            cache_read_mtok=Decimal('0.3'),
                            output_mtok=Decimal('15'),
                            cache_write_1h_mtok=Decimal('6'),
                            web_searches_kcount=Decimal('10'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='claude-sonnet-5',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='claude-sonnet-5'),
                        ClauseStartsWith(starts_with='claude-sonnet-5.0'),
                        ClauseStartsWith(starts_with='claude-5-sonnet'),
                        ClauseStartsWith(starts_with='claude-5.0-sonnet'),
                    ]
                ),
                name='Claude Sonnet 5',
                description='Our most agentic Sonnet model, approaching Opus 4.8 capability at lower cost',
                context_window=1000000,
                price_comments='Flat pricing across the full 1M context window (no tiered pricing). Anthropic made the introductory $2/$10 per MTok rates permanent and cancelled the previously scheduled 2026-09-01 increase. Ref: https://platform.claude.com/docs/en/about-claude/pricing Prompt caching ref: https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('10'),
                    cache_write_1h_mtok=Decimal('4'),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='claude-v1',
                match=ClauseEquals(equals='claude-v1'),
                description='Retired, here to match price sources',
                prices=ModelPrice(input_mtok=Decimal('8'), output_mtok=Decimal('24')),
            ),
        ],
    ),
    Provider(
        id='arcee',
        name='Arcee',
        api_pattern='https://api\\.arcee\\.ai(?:/|$)',
        pricing_urls=['https://docs.arcee.ai/get-started/pricing', 'https://api.arcee.ai/api/v1/models'],
        description='OpenAI-compatible hosted inference through the Arcee Platform API.',
        price_comments='Covers the complete public Text Models pricing table. The table publishes input, cached-input, and output token rates. Context windows and rates for images, requests, and cache writes are omitted because the public pricing page does not publish them. Model IDs use third-party namespaces, so they do not infer the Arcee provider without an Arcee provider ID or API URL.',
        provider_match=ClauseContains(contains='arcee'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='deepseek/deepseek-v4-flash-latest',
                match=ClauseEquals(equals='deepseek/deepseek-v4-flash-latest'),
                name='DeepSeek V4 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.14'), cache_read_mtok=Decimal('0.028'), output_mtok=Decimal('0.28')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-pro',
                match=ClauseEquals(equals='deepseek/deepseek-v4-pro'),
                name='DeepSeek V4 Pro',
                prices=ModelPrice(
                    input_mtok=Decimal('1.74'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('3.48')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k3',
                match=ClauseEquals(equals='moonshotai/kimi-k3'),
                name='Kimi K3',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='thinkingmachines/inkling-small',
                match=ClauseEquals(equals='thinkingmachines/inkling-small'),
                name='Inkling Small',
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='trinity-large-thinking',
                match=ClauseEquals(equals='trinity-large-thinking'),
                name='Trinity Large Thinking',
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('0.8')
                ),
            ),
            ModelInfo(
                id='zai-org/glm-5.2',
                match=ClauseEquals(equals='zai-org/glm-5.2'),
                name='GLM 5.2',
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
        ],
    ),
    Provider(
        id='avian',
        name='Avian',
        api_pattern='https://api\\.avian\\.io',
        pricing_urls=['https://avian.io/pricing/'],
        price_comments="Prices and model IDs checked against https://avian.io/docs/ on 2026-08-25. Cache prices use Avian's documented cache-read rates. The previously listed Meta Llama models are no longer in Avian's catalog and are deprecated.",
        models=[
            ModelInfo(
                id='Meta-Llama-3.1-405B-Instruct',
                match=ClauseEquals(equals='Meta-Llama-3.1-405B-Instruct'),
                price_comments="No longer listed in Avian's model catalog as of 2026-08-25.",
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Meta-Llama-3.1-70B-Instruct',
                match=ClauseEquals(equals='Meta-Llama-3.1-70B-Instruct'),
                price_comments="No longer listed in Avian's model catalog as of 2026-08-25.",
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='Meta-Llama-3.1-8B-Instruct',
                match=ClauseEquals(equals='Meta-Llama-3.1-8B-Instruct'),
                price_comments="No longer listed in Avian's model catalog as of 2026-08-25.",
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='Meta-Llama-3.3-70B-Instruct',
                match=ClauseEquals(equals='Meta-Llama-3.3-70B-Instruct'),
                price_comments="No longer listed in Avian's model catalog as of 2026-08-25.",
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='deepseek/deepseek-v3.2',
                match=ClauseEquals(equals='deepseek/deepseek-v3.2'),
                name='DeepSeek V3.2 (Legacy)',
                context_window=163000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.23'), cache_read_mtok=Decimal('0.012'), output_mtok=Decimal('0.33')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-flash',
                match=ClauseEquals(equals='deepseek/deepseek-v4-flash'),
                name='DeepSeek V4 Flash',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.0805'), cache_read_mtok=Decimal('0.0165'), output_mtok=Decimal('0.161')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-pro',
                match=ClauseEquals(equals='deepseek/deepseek-v4-pro'),
                name='DeepSeek V4 Pro',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.305'), cache_read_mtok=Decimal('0.10875'), output_mtok=Decimal('2.61')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-pro-0813',
                match=ClauseEquals(equals='deepseek/deepseek-v4-pro-0813'),
                name='DeepSeek V4 Pro 0813',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.594'), cache_read_mtok=Decimal('0.0198'), output_mtok=Decimal('1.782')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m2.5',
                match=ClauseEquals(equals='minimax/minimax-m2.5'),
                name='MiniMax M2.5',
                context_window=196000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.27'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('1.08')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.5',
                match=ClauseEquals(equals='moonshotai/kimi-k2.5'),
                name='Kimi K2.5',
                context_window=262000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.45'), cache_read_mtok=Decimal('0.225'), output_mtok=Decimal('2.2')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.6',
                match=ClauseEquals(equals='moonshotai/kimi-k2.6'),
                name='Kimi K2.6',
                context_window=262000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='xiaomi/mimo-v2.5',
                match=ClauseEquals(equals='xiaomi/mimo-v2.5'),
                name='MiMo-V2.5 Small',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.4')
                ),
            ),
            ModelInfo(
                id='xiaomi/mimo-v2.5-pro',
                match=ClauseEquals(equals='xiaomi/mimo-v2.5-pro'),
                name='MiMo-V2.5 Pro',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.435'), cache_read_mtok=Decimal('0.0036'), output_mtok=Decimal('0.87')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.7',
                match=ClauseEquals(equals='z-ai/glm-4.7'),
                name='GLM-4.7',
                context_window=202000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.388'), cache_read_mtok=Decimal('0.097'), output_mtok=Decimal('1.806')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5',
                match=ClauseEquals(equals='z-ai/glm-5'),
                name='GLM-5',
                context_window=205000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.516'), cache_read_mtok=Decimal('0.129'), output_mtok=Decimal('2.322')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5.1',
                match=ClauseEquals(equals='z-ai/glm-5.1'),
                name='GLM-5.1',
                context_window=202000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.743'), cache_read_mtok=Decimal('0.186'), output_mtok=Decimal('2.971')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5.2',
                match=ClauseEquals(equals='z-ai/glm-5.2'),
                name='GLM-5.2',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.495'), cache_read_mtok=Decimal('0.124'), output_mtok=Decimal('1.733')
                ),
            ),
        ],
    ),
    Provider(
        id='aws',
        name='AWS Bedrock',
        api_pattern='https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com(/|$)',
        pricing_urls=['https://aws.amazon.com/bedrock/pricing/'],
        provider_match=ClauseOr(or_=[ClauseContains(contains='bedrock'), ClauseContains(contains='amazon')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='inputTokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cacheReadInputTokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cacheWriteInputTokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cacheReadInputTokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='cacheWriteInputTokens', dest='cache_write_tokens', required=False),
                    UsageExtractorMapping(path='outputTokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_creation_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path='cache_creation_input_tokens', dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='anthropic',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='amazon.nova-2-sonic-v1:0',
                match=ClauseContains(contains='amazon.nova-2-sonic'),
                name='Nova 2 Sonic',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.33'),
                    output_mtok=Decimal('2.75'),
                    input_audio_mtok=Decimal('3'),
                    output_audio_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='amazon.nova-lite-v1:0',
                match=ClauseContains(contains='amazon.nova-lite'),
                name='Nova Lite',
                description='Amazon Nova Lite 1.0 is a very low-cost multimodal model from Amazon that focused on fast processing of image, video, and text inputs to generate text output. Amazon Nova Lite can handle real-time customer interactions, document analysis, and visual question-answering tasks with high accuracy.',
                context_window=300000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.06'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.24')
                ),
            ),
            ModelInfo(
                id='amazon.nova-micro-v1:0',
                match=ClauseContains(contains='amazon.nova-micro'),
                name='Nova Micro',
                description='Amazon Nova Micro 1.0 is a text-only model that delivers the lowest latency responses in the Amazon Nova family of models at a very low cost. With a context length of 128K tokens and optimized for speed and cost, Amazon Nova Micro excels at tasks such as text summarization, translation, content classification, interactive chat, and brainstorming. It has  simple mathematical reasoning and coding abilities.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.035'), cache_read_mtok=Decimal('0.00875'), output_mtok=Decimal('0.14')
                ),
            ),
            ModelInfo(
                id='amazon.nova-premier-v1:0',
                match=ClauseContains(contains='amazon.nova-premier'),
                name='Nova Premier',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('2.5'), cache_read_mtok=Decimal('0.625'), output_mtok=Decimal('12.5')
                ),
            ),
            ModelInfo(
                id='amazon.nova-pro-v1:0',
                match=ClauseContains(contains='amazon.nova-pro'),
                name='Nova Pro',
                description='Amazon Nova Pro 1.0 is a capable multimodal model from Amazon focused on providing a combination of accuracy, speed, and cost for a wide range of tasks. As of December 2024, it achieves state-of-the-art performance on key benchmarks including visual question answering (TextVQA) and video understanding (VATEX).',
                context_window=300000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('3.2')
                ),
            ),
            ModelInfo(
                id='amazon.nova-sonic-v1:0',
                match=ClauseContains(contains='amazon.nova-sonic'),
                name='Nova Sonic',
                prices=ModelPrice(
                    input_mtok=Decimal('0.06'),
                    output_mtok=Decimal('0.24'),
                    input_audio_mtok=Decimal('3.4'),
                    output_audio_mtok=Decimal('13.6'),
                ),
            ),
            ModelInfo(
                id='amazon.titan-embed-text-v1',
                match=ClauseContains(contains='amazon.titan-embed-text'),
                name='Titan Embeddings G1 - Text',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='amazon.titan-text-express-v1',
                match=ClauseContains(contains='titan-text-express'),
                name='Titan Text G1 - Express',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='amazon.titan-text-lite-v1',
                match=ClauseContains(contains='titan-text-lite'),
                name='Titan Text G1 - Lite',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='deepseek.r1-v1:0',
                match=ClauseContains(contains='deepseek.r1'),
                name='DeepSeek-R1',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('1.35'), output_mtok=Decimal('5.4')),
            ),
            ModelInfo(
                id='global.amazon.nova-2-lite-v1:0',
                match=ClauseContains(contains='global.amazon.nova-2-lite'),
                name='Nova 2 Lite',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-fable-5-1-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseEndsWith(ends_with='global.anthropic.claude-fable-5-1'),
                        ClauseContains(contains='global.anthropic.claude-fable-5-1-v1'),
                    ]
                ),
                context_window=1000000,
                price_comments='Global endpoint (no premium). Cache hits are 0.025x base input (not the usual 0.1x), unique to Fable 5.1 and Mythos 5.1. Ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Model ID ref: https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-fable-5-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseEndsWith(ends_with='global.anthropic.claude-fable-5'),
                        ClauseContains(contains='global.anthropic.claude-fable-5-v1'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-haiku-4-5-20251001-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-haiku-4-5-20251001'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1'),
                    cache_write_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('5'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-4-5-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-opus-4-5'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-4-6-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-opus-4-6'),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-4-7-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-opus-4-7'),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-4-8-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-opus-4-8'),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-5',
                match=ClauseOr(
                    or_=[
                        ClauseEndsWith(ends_with='global.anthropic.claude-opus-5'),
                        ClauseContains(contains='global.anthropic.claude-opus-5-v1'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-opus-5-5',
                match=ClauseOr(
                    or_=[
                        ClauseEndsWith(ends_with='global.anthropic.claude-opus-5-5'),
                        ClauseContains(contains='global.anthropic.claude-opus-5-5-v1'),
                    ]
                ),
                context_window=1000000,
                price_comments='Global endpoint (no premium). Cache hits are 0.05x base input (not the usual 0.1x), unique to Opus 5.5. Ref: AWS price list API, AmazonBedrockFoundationModels "Claude Opus 5.5 (Amazon Bedrock Edition)" (https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrockFoundationModels/current/us-east-1/index.json) Model ID ref: https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock',
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_write_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('20'),
                    cache_write_1h_mtok=Decimal('8'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-sonnet-4-20250514-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-sonnet-4-20250514'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-sonnet-4-5-20250929-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-sonnet-4-5-20250929'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-sonnet-4-6-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-sonnet-4-6'),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='global.anthropic.claude-sonnet-5-v1:0',
                match=ClauseContains(contains='global.anthropic.claude-sonnet-5'),
                context_window=1000000,
                price_comments='Flat pricing across the full 1M context window (no tiered pricing). The $2/$10 per MTok launch rates are now permanent, with no 2026-09-01 increase. Refs: https://aws.amazon.com/bedrock/pricing/, https://platform.claude.com/docs/en/about-claude/pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='global.openai.gpt-5.6-luna',
                match=ClauseContains(contains='global.openai.gpt-5.6-luna'),
                name='GPT-5.6 Luna (global)',
                context_window=1000000,
                price_comments="Global cross-Region inference, priced 10% below in-Region and Geo, and identical to OpenAI's own list price. Cross-Region inference for the GPT-5.6 models launched on 2026-08-17. Cache writes (30m TTL) are billed at 1.25x the input rate. At 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. The 80% Luna price cut of 2026-07-30 predates global availability, so there is no earlier global rate to record. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.html, https://aws.amazon.com/about-aws/whats-new/2026/08/amazon-bedrock-cross-region-openai-v2/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/",
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=271999, price=Decimal('0.4'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=271999, price=Decimal('0.5'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.02'), tiers=[Tier(start=271999, price=Decimal('0.04'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('1.2'), tiers=[Tier(start=271999, price=Decimal('1.8'))]),
                ),
            ),
            ModelInfo(
                id='global.openai.gpt-5.6-sol',
                match=ClauseContains(contains='global.openai.gpt-5.6-sol'),
                name='GPT-5.6 Sol (global)',
                context_window=1000000,
                price_comments="Global cross-Region inference, priced 10% below in-Region and Geo, and identical to OpenAI's own list price. Cross-Region inference launched 2026-08-17. Cache writes (30m TTL) are billed at 1.25x the input rate. At 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. AWS cut Sol input prices by 20% and output prices by 33.3% on 2026-08-21, quoting the global rates ($4 input, $20 output); the unconstrained entry keeps the four days of rates between global availability and the cut. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-sol.html, https://aws.amazon.com/about-aws/whats-new/2026/08/bedrock-openai-gpt-56-sol-reduced-pricing/, https://aws.amazon.com/about-aws/whats-new/2026/08/amazon-bedrock-cross-region-openai-v2/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/",
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=271999, price=Decimal('10'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('6.25'), tiers=[Tier(start=271999, price=Decimal('12.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.5'), tiers=[Tier(start=271999, price=Decimal('1'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('30'), tiers=[Tier(start=271999, price=Decimal('45'))]
                            ),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 21)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('4'), tiers=[Tier(start=271999, price=Decimal('8'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('5'), tiers=[Tier(start=271999, price=Decimal('10'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.4'), tiers=[Tier(start=271999, price=Decimal('0.8'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('20'), tiers=[Tier(start=271999, price=Decimal('30'))]
                            ),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='global.openai.gpt-5.6-terra',
                match=ClauseContains(contains='global.openai.gpt-5.6-terra'),
                name='GPT-5.6 Terra (global)',
                context_window=1000000,
                price_comments="Global cross-Region inference, priced 10% below in-Region and Geo, and identical to OpenAI's own list price. Cross-Region inference for the GPT-5.6 models launched on 2026-08-17. Cache writes (30m TTL) are billed at 1.25x the input rate. At 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. The 20% Terra price cut of 2026-07-30 predates global availability, so there is no earlier global rate to record. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-terra.html, https://aws.amazon.com/about-aws/whats-new/2026/08/amazon-bedrock-cross-region-openai-v2/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/",
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=271999, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=271999, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=271999, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('12'), tiers=[Tier(start=271999, price=Decimal('18'))]),
                ),
            ),
            ModelInfo(
                id='google.gemma-3-12b-it',
                match=ClauseContains(contains='google.gemma-3-12b-it'),
                name='Gemma 3 12B IT',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.29')),
            ),
            ModelInfo(
                id='google.gemma-3-27b-it',
                match=ClauseContains(contains='google.gemma-3-27b-it'),
                name='Gemma 3 27B IT',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.23'), output_mtok=Decimal('0.38')),
            ),
            ModelInfo(
                id='google.gemma-3-4b-it',
                match=ClauseContains(contains='google.gemma-3-4b-it'),
                name='Gemma 3 4B IT',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.08')),
            ),
            ModelInfo(
                id='meta.llama3-1-70b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-1-70b-instruct'),
                name='Llama 3.1 70B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.72'), output_mtok=Decimal('0.72')),
            ),
            ModelInfo(
                id='meta.llama3-1-8b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-1-8b-instruct'),
                name='Llama 3.1 8B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('0.22')),
            ),
            ModelInfo(
                id='meta.llama3-2-11b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-2-11b-instruct'),
                name='Llama 3.2 11B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.16'), output_mtok=Decimal('0.16')),
            ),
            ModelInfo(
                id='meta.llama3-2-1b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-2-1b-instruct'),
                name='Llama 3.2 1B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='meta.llama3-2-3b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-2-3b-instruct'),
                name='Llama 3.2 3B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='meta.llama3-2-90b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-2-90b-instruct'),
                name='Llama 3.2 90B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.72'), output_mtok=Decimal('0.72')),
            ),
            ModelInfo(
                id='meta.llama3-3-70b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-3-70b-instruct'),
                name='Llama 3.3 70B Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.72'), output_mtok=Decimal('0.72')),
            ),
            ModelInfo(
                id='meta.llama3-70b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-70b-instruct'),
                name='Llama 3 70B Instruct',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('2.65'), output_mtok=Decimal('3.5')),
            ),
            ModelInfo(
                id='meta.llama3-8b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama3-8b-instruct'),
                name='Llama 3 8B Instruct',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='meta.llama4-maverick-17b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama4-maverick-17b-instruct'),
                name='Llama 4 Maverick 17B Instruct',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.97')),
            ),
            ModelInfo(
                id='meta.llama4-scout-17b-instruct-v1:0',
                match=ClauseContains(contains='meta.llama4-scout-17b-instruct'),
                name='Llama 4 Scout 17B Instruct',
                context_window=10000000,
                prices=ModelPrice(input_mtok=Decimal('0.17'), output_mtok=Decimal('0.66')),
            ),
            ModelInfo(
                id='mistral.devstral-2-123b',
                match=ClauseContains(contains='mistral.devstral-2-123b'),
                name='Devstral 2 123B',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mistral.magistral-small-2509',
                match=ClauseContains(contains='mistral.magistral-small-2509'),
                name='Magistral Small 2509',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='mistral.ministral-3-14b-instruct',
                match=ClauseContains(contains='mistral.ministral-3-14b-instruct'),
                name='Ministral 14B 3.0',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistral.ministral-3-3b-instruct',
                match=ClauseContains(contains='mistral.ministral-3-3b-instruct'),
                name='Ministral 3B 3.0',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistral.ministral-3-8b-instruct',
                match=ClauseContains(contains='mistral.ministral-3-8b-instruct'),
                name='Ministral 8B 3.0',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='mistral.mistral-7b-instruct-v0:2',
                match=ClauseContains(contains='mistral.mistral-7b-instruct-v0'),
                name='Mistral 7B Instruct',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistral.mistral-large-2402-v1:0',
                match=ClauseContains(contains='mistral.mistral-large-2402'),
                name='Mistral Large (24.02)',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('12')),
            ),
            ModelInfo(
                id='mistral.mistral-large-3-675b-instruct',
                match=ClauseContains(contains='mistral.mistral-large-3-675b-instruct'),
                name='Mistral Large 3',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='mistral.mistral-small-2402-v1:0',
                match=ClauseContains(contains='mistral.mistral-small-2402'),
                name='Mistral Small (24.02)',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='mistral.mixtral-8x7b-instruct-v0:1',
                match=ClauseContains(contains='mistral.mixtral-8x7b-instruct-v0'),
                name='Mixtral 8x7B Instruct',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='mistral.pixtral-large-2502-v1:0',
                match=ClauseContains(contains='mistral.pixtral-large-2502'),
                name='Pixtral Large (25.02)',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='mistral.voxtral-mini-3b-2507',
                match=ClauseContains(contains='mistral.voxtral-mini-3b-2507'),
                name='Voxtral Mini 3B 2507',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='mistral.voxtral-small-24b-2507',
                match=ClauseContains(contains='mistral.voxtral-small-24b-2507'),
                name='Voxtral Small 24B 2507',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='nvidia.nemotron-nano-3-30b:0',
                match=ClauseContains(contains='nvidia.nemotron-nano-3-30b'),
                name='Nemotron 3 Nano 30B',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='nvidia.nemotron-nano-9b-v2:0',
                match=ClauseContains(contains='nvidia.nemotron-nano-9b-v2'),
                name='Nemotron 2 Nano 9B',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.23')),
            ),
            ModelInfo(
                id='nvidia.nemotron-super-3-120b:0',
                match=ClauseContains(contains='nvidia.nemotron-super-3-120b'),
                name='Nemotron 3 Super 120B',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.65')),
            ),
            ModelInfo(
                id='openai.gpt-5.4',
                match=ClauseEquals(equals='openai.gpt-5.4'),
                name='GPT-5.4',
                prices=ModelPrice(
                    input_mtok=Decimal('2.75'), cache_read_mtok=Decimal('0.275'), output_mtok=Decimal('16.5')
                ),
            ),
            ModelInfo(
                id='openai.gpt-5.5',
                match=ClauseEquals(equals='openai.gpt-5.5'),
                name='GPT-5.5',
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('33')
                ),
            ),
            ModelInfo(
                id='openai.gpt-oss-120b-1:0',
                match=ClauseContains(contains='openai.gpt-oss-120b-1'),
                name='gpt-oss-120b',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='openai.gpt-oss-20b-1:0',
                match=ClauseContains(contains='openai.gpt-oss-20b-1'),
                name='gpt-oss-20b',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='qwen.qwen3-32b-v1:0',
                match=ClauseContains(contains='qwen.qwen3-32b'),
                name='Qwen3 32B (dense)',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='qwen.qwen3-coder-30b-a3b-v1:0',
                match=ClauseContains(contains='qwen.qwen3-coder-30b-a3b'),
                name='Qwen3-Coder-30B-A3B-Instruct',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='qwen.qwen3-coder-480b-a35b-v1:0',
                match=ClauseContains(contains='qwen.qwen3-coder-480b-a35b'),
                name='Qwen3-Coder-480B-A35B-Instruct',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='qwen.qwen3-vl-235b-a22b-v1:0',
                match=ClauseContains(contains='qwen.qwen3-vl-235b-a22b'),
                name='Qwen3-VL-235B-A22B-Instruct',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.53'), output_mtok=Decimal('2.66')),
            ),
            ModelInfo(
                id='regional.amazon.nova-2-lite-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='us.amazon.nova-2-lite'),
                        ClauseContains(contains='eu.amazon.nova-2-lite'),
                        ClauseContains(contains='jp.amazon.nova-2-lite'),
                    ]
                ),
                name='Nova 2 Lite',
                description='Amazon Nova 2 Lite is an advanced multimodal reasoning model that intelligently balances performance and efficiency by dynamically adjusting reasoning depth based on task complexity. With flexible controls for developers to adjust the reasoning process, Nova 2 Lite delivers superior results for agentic workflows across software development, consumer experiences and enterprise application.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.33'), cache_read_mtok=Decimal('0.0825'), output_mtok=Decimal('2.75')
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-5-haiku-20241022-v1:0',
                match=ClauseContains(contains='claude-3-5-haiku-20241022'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'),
                    cache_write_mtok=Decimal('1'),
                    cache_read_mtok=Decimal('0.08'),
                    output_mtok=Decimal('4'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-5-sonnet-20240620-v1:0',
                match=ClauseContains(contains='claude-3-5-sonnet-20240620'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-5-sonnet-20241022-v2:0',
                match=ClauseContains(contains='claude-3-5-sonnet-20241022'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-7-sonnet-20250219-v1:0',
                match=ClauseContains(contains='claude-3-7-sonnet-20250219'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-haiku-20240307-v1:0',
                match=ClauseContains(contains='claude-3-haiku-20240307'),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-opus-20240229-v1:0',
                match=ClauseContains(contains='claude-3-opus-20240229'),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('15'), output_mtok=Decimal('75')),
            ),
            ModelInfo(
                id='regional.anthropic.claude-3-sonnet-20240229-v1:0',
                match=ClauseContains(contains='claude-3-sonnet-20240229'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-fable-5-1-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic.claude-fable-5-1'),
                        ClauseEquals(equals='claude-fable-5-1'),
                        ClauseStartsWith(starts_with='anthropic.claude-fable-5-1-v1'),
                        ClauseStartsWith(starts_with='claude-fable-5-1-v1'),
                        ClauseContains(contains='us.anthropic.claude-fable-5-1-v1'),
                    ]
                ),
                context_window=1000000,
                price_comments='Regional endpoint: 10% premium over the global endpoint. Fable 5.1 regional is currently us-east-1 only. Cache hits are 0.025x base input (not the usual 0.1x), unique to Fable 5.1 and Mythos 5.1. Ref: https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions',
                prices=ModelPrice(
                    input_mtok=Decimal('11'),
                    cache_write_mtok=Decimal('13.75'),
                    cache_read_mtok=Decimal('0.275'),
                    output_mtok=Decimal('55'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-fable-5-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic.claude-fable-5'),
                        ClauseEquals(equals='claude-fable-5'),
                        ClauseStartsWith(starts_with='anthropic.claude-fable-5-v1'),
                        ClauseStartsWith(starts_with='claude-fable-5-v1'),
                        ClauseContains(contains='us.anthropic.claude-fable-5-v1'),
                        ClauseContains(contains='au.anthropic.claude-fable-5-v1'),
                        ClauseContains(contains='eu.anthropic.claude-fable-5-v1'),
                        ClauseContains(contains='jp.anthropic.claude-fable-5-v1'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('11'),
                    cache_write_mtok=Decimal('13.75'),
                    cache_read_mtok=Decimal('1.1'),
                    output_mtok=Decimal('55'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-haiku-4-5-20251001-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-haiku-4-5-20251001'),
                        ClauseStartsWith(starts_with='claude-haiku-4-5-20251001'),
                        ClauseContains(contains='us.anthropic.claude-haiku-4-5-20251001'),
                        ClauseContains(contains='au.anthropic.claude-haiku-4-5-20251001'),
                        ClauseContains(contains='apac.anthropic.claude-haiku-4-5-20251001'),
                        ClauseContains(contains='eu.anthropic.claude-haiku-4-5-20251001'),
                        ClauseContains(contains='us-gov.anthropic.claude-haiku-4-5-20251001'),
                        ClauseContains(contains='jp.anthropic.claude-haiku-4-5-20251001'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'),
                    cache_write_mtok=Decimal('1.375'),
                    cache_read_mtok=Decimal('0.11'),
                    output_mtok=Decimal('5.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-1-20250805-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-1-20250805'),
                        ClauseStartsWith(starts_with='claude-opus-4-1-20250805'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-1-20250805'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-1-20250805'),
                        ClauseContains(contains='apac.anthropic.claude-opus-4-1-20250805'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-1-20250805'),
                        ClauseContains(contains='us-gov.anthropic.claude-opus-4-1-20250805'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-1-20250805'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-20250514-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-20250514'),
                        ClauseStartsWith(starts_with='claude-opus-4-20250514'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-20250514'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-20250514'),
                        ClauseContains(contains='apac.anthropic.claude-opus-4-20250514'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-20250514'),
                        ClauseContains(contains='us-gov.anthropic.claude-opus-4-20250514'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-20250514'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-5-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-5'),
                        ClauseStartsWith(starts_with='claude-opus-4-5'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-5'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-5'),
                        ClauseContains(contains='apac.anthropic.claude-opus-4-5'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-5'),
                        ClauseContains(contains='us-gov.anthropic.claude-opus-4-5'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-5'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'),
                    cache_write_mtok=Decimal('6.875'),
                    cache_read_mtok=Decimal('0.55'),
                    output_mtok=Decimal('27.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-6-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-6'),
                        ClauseStartsWith(starts_with='claude-opus-4-6'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-6'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-6'),
                        ClauseContains(contains='apac.anthropic.claude-opus-4-6'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-6'),
                        ClauseContains(contains='us-gov.anthropic.claude-opus-4-6'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-6'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'),
                    cache_write_mtok=Decimal('6.875'),
                    cache_read_mtok=Decimal('0.55'),
                    output_mtok=Decimal('27.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-7-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-7'),
                        ClauseStartsWith(starts_with='claude-opus-4-7'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-7'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-7'),
                        ClauseContains(contains='apac.anthropic.claude-opus-4-7'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-7'),
                        ClauseContains(contains='us-gov.anthropic.claude-opus-4-7'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-7'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'),
                    cache_write_mtok=Decimal('6.875'),
                    cache_read_mtok=Decimal('0.55'),
                    output_mtok=Decimal('27.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-4-8-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-opus-4-8'),
                        ClauseStartsWith(starts_with='claude-opus-4-8'),
                        ClauseContains(contains='us.anthropic.claude-opus-4-8'),
                        ClauseContains(contains='au.anthropic.claude-opus-4-8'),
                        ClauseContains(contains='eu.anthropic.claude-opus-4-8'),
                        ClauseContains(contains='jp.anthropic.claude-opus-4-8'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'),
                    cache_write_mtok=Decimal('6.875'),
                    cache_read_mtok=Decimal('0.55'),
                    output_mtok=Decimal('27.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic.claude-opus-5'),
                        ClauseEquals(equals='claude-opus-5'),
                        ClauseStartsWith(starts_with='anthropic.claude-opus-5-v1'),
                        ClauseStartsWith(starts_with='claude-opus-5-v1'),
                        ClauseEquals(equals='us.anthropic.claude-opus-5'),
                        ClauseEquals(equals='au.anthropic.claude-opus-5'),
                        ClauseEquals(equals='eu.anthropic.claude-opus-5'),
                        ClauseEquals(equals='jp.anthropic.claude-opus-5'),
                        ClauseContains(contains='us.anthropic.claude-opus-5-v1'),
                        ClauseContains(contains='au.anthropic.claude-opus-5-v1'),
                        ClauseContains(contains='eu.anthropic.claude-opus-5-v1'),
                        ClauseContains(contains='jp.anthropic.claude-opus-5-v1'),
                    ]
                ),
                context_window=1000000,
                price_comments='Regional endpoints and US/EU/JP/AU inference profiles carry a 10% premium over the global endpoint. Ref: https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions',
                prices=ModelPrice(
                    input_mtok=Decimal('5.5'),
                    cache_write_mtok=Decimal('6.875'),
                    cache_read_mtok=Decimal('0.55'),
                    output_mtok=Decimal('27.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-opus-5-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic.claude-opus-5-5'),
                        ClauseEquals(equals='claude-opus-5-5'),
                        ClauseStartsWith(starts_with='anthropic.claude-opus-5-5-v1'),
                        ClauseStartsWith(starts_with='claude-opus-5-5-v1'),
                        ClauseEquals(equals='us.anthropic.claude-opus-5-5'),
                        ClauseEquals(equals='au.anthropic.claude-opus-5-5'),
                        ClauseEquals(equals='eu.anthropic.claude-opus-5-5'),
                        ClauseEquals(equals='jp.anthropic.claude-opus-5-5'),
                        ClauseContains(contains='us.anthropic.claude-opus-5-5-v1'),
                        ClauseContains(contains='au.anthropic.claude-opus-5-5-v1'),
                        ClauseContains(contains='eu.anthropic.claude-opus-5-5-v1'),
                        ClauseContains(contains='jp.anthropic.claude-opus-5-5-v1'),
                    ]
                ),
                context_window=1000000,
                price_comments='Regional endpoints and US/EU/JP/AU inference profiles carry a 10% premium over the global endpoint. Cache hits are 0.05x base input (not the usual 0.1x), unique to Opus 5.5. Ref: AWS price list API, AmazonBedrockFoundationModels "Claude Opus 5.5 (Amazon Bedrock Edition)" (https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrockFoundationModels/current/us-east-1/index.json)',
                prices=ModelPrice(
                    input_mtok=Decimal('4.4'),
                    cache_write_mtok=Decimal('5.5'),
                    cache_read_mtok=Decimal('0.22'),
                    output_mtok=Decimal('22'),
                    cache_write_1h_mtok=Decimal('8.8'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-sonnet-4-20250514-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-sonnet-4-20250514'),
                        ClauseStartsWith(starts_with='claude-sonnet-4-20250514'),
                        ClauseContains(contains='us.anthropic.claude-sonnet-4-20250514'),
                        ClauseContains(contains='au.anthropic.claude-sonnet-4-20250514'),
                        ClauseContains(contains='apac.anthropic.claude-sonnet-4-20250514'),
                        ClauseContains(contains='eu.anthropic.claude-sonnet-4-20250514'),
                        ClauseContains(contains='us-gov.anthropic.claude-sonnet-4-20250514'),
                        ClauseContains(contains='jp.anthropic.claude-sonnet-4-20250514'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-sonnet-4-5-20250929-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-sonnet-4-5-20250929'),
                        ClauseStartsWith(starts_with='claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='us.anthropic.claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='au.anthropic.claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='apac.anthropic.claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='eu.anthropic.claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='us-gov.anthropic.claude-sonnet-4-5-20250929'),
                        ClauseContains(contains='jp.anthropic.claude-sonnet-4-5-20250929'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3.3'),
                    cache_write_mtok=Decimal('4.125'),
                    cache_read_mtok=Decimal('0.33'),
                    output_mtok=Decimal('16.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-sonnet-4-6-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-sonnet-4-6'),
                        ClauseStartsWith(starts_with='claude-sonnet-4-6'),
                        ClauseContains(contains='us.anthropic.claude-sonnet-4-6'),
                        ClauseContains(contains='au.anthropic.claude-sonnet-4-6'),
                        ClauseContains(contains='apac.anthropic.claude-sonnet-4-6'),
                        ClauseContains(contains='eu.anthropic.claude-sonnet-4-6'),
                        ClauseContains(contains='us-gov.anthropic.claude-sonnet-4-6'),
                        ClauseContains(contains='jp.anthropic.claude-sonnet-4-6'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('3.3'),
                    cache_write_mtok=Decimal('4.125'),
                    cache_read_mtok=Decimal('0.33'),
                    output_mtok=Decimal('16.5'),
                ),
            ),
            ModelInfo(
                id='regional.anthropic.claude-sonnet-5-v1:0',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='anthropic.claude-sonnet-5'),
                        ClauseStartsWith(starts_with='claude-sonnet-5'),
                        ClauseContains(contains='us.anthropic.claude-sonnet-5'),
                        ClauseContains(contains='au.anthropic.claude-sonnet-5'),
                        ClauseContains(contains='apac.anthropic.claude-sonnet-5'),
                        ClauseContains(contains='eu.anthropic.claude-sonnet-5'),
                        ClauseContains(contains='us-gov.anthropic.claude-sonnet-5'),
                        ClauseContains(contains='jp.anthropic.claude-sonnet-5'),
                    ]
                ),
                context_window=1000000,
                price_comments='Regional/cross-region endpoints carry a 10% premium over global. The launch rates are now permanent, with no 2026-09-01 increase. Refs: https://aws.amazon.com/bedrock/pricing/, https://platform.claude.com/docs/en/about-claude/pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('2.2'),
                    cache_write_mtok=Decimal('2.75'),
                    cache_read_mtok=Decimal('0.22'),
                    output_mtok=Decimal('11'),
                ),
            ),
            ModelInfo(
                id='regional.openai.gpt-5.6-luna',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='openai.gpt-5.6-luna'),
                        ClauseStartsWith(starts_with='gpt-5.6-luna'),
                        ClauseContains(contains='us.openai.gpt-5.6-luna'),
                        ClauseContains(contains='in.openai.gpt-5.6-luna'),
                    ]
                ),
                name='GPT-5.6 Luna (regional)',
                context_window=1000000,
                price_comments='In-Region and Geo (`us.`/`in.`) inference, 10% above global. Cache writes (30m TTL) are billed at 1.25x input; at 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. AWS cut Luna prices by 80% on 2026-07-30; the unconstrained entry preserves the launch (2026-07-13) rates. The long-context tier arrived with the 1M context window on 2026-08-03, so the launch entry stays flat. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.html, https://aws.amazon.com/about-aws/whats-new/2026/07/openai-gpt-terra-luna-pricing-bedrock/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('1.1'),
                            cache_write_mtok=Decimal('1.375'),
                            cache_read_mtok=Decimal('0.11'),
                            output_mtok=Decimal('6.6'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 7, 30)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('0.22'), tiers=[Tier(start=271999, price=Decimal('0.44'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('0.275'), tiers=[Tier(start=271999, price=Decimal('0.55'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.022'), tiers=[Tier(start=271999, price=Decimal('0.044'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('1.32'), tiers=[Tier(start=271999, price=Decimal('1.98'))]
                            ),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='regional.openai.gpt-5.6-sol',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='openai.gpt-5.6-sol'),
                        ClauseStartsWith(starts_with='gpt-5.6-sol'),
                        ClauseContains(contains='us.openai.gpt-5.6-sol'),
                    ]
                ),
                name='GPT-5.6 Sol (regional)',
                context_window=1000000,
                price_comments='In-Region and Geo (`us.`) inference, 10% above global. Cache writes (30m TTL) are billed at 1.25x input; at 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Sol input prices fell 20% and output prices 33.3% on 2026-08-21; the announcement quotes the global rates, and the in-Region and Geo rates moved with them. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-sol.html, https://aws.amazon.com/about-aws/whats-new/2026/08/bedrock-openai-gpt-56-sol-reduced-pricing/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('5.5'), tiers=[Tier(start=271999, price=Decimal('11'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('6.875'), tiers=[Tier(start=271999, price=Decimal('13.75'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.55'), tiers=[Tier(start=271999, price=Decimal('1.1'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('33'), tiers=[Tier(start=271999, price=Decimal('49.5'))]
                            ),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 21)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('4.4'), tiers=[Tier(start=271999, price=Decimal('8.8'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('5.5'), tiers=[Tier(start=271999, price=Decimal('11'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.44'), tiers=[Tier(start=271999, price=Decimal('0.88'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('22'), tiers=[Tier(start=271999, price=Decimal('33'))]
                            ),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='regional.openai.gpt-5.6-terra',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='openai.gpt-5.6-terra'),
                        ClauseStartsWith(starts_with='gpt-5.6-terra'),
                        ClauseContains(contains='us.openai.gpt-5.6-terra'),
                        ClauseContains(contains='in.openai.gpt-5.6-terra'),
                    ]
                ),
                name='GPT-5.6 Terra (regional)',
                context_window=1000000,
                price_comments='In-Region and Geo (`us.`/`in.`) inference, 10% above global. Cache writes (30m TTL) are billed at 1.25x input; at 272K input tokens and above, input and cache are 2x and output 1.5x. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. AWS cut Terra prices by 20% on 2026-07-30; the unconstrained entry preserves the launch (2026-07-13) rates. The long-context tier arrived with the 1M context window on 2026-08-03, so the launch entry stays flat. Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-terra.html, https://aws.amazon.com/about-aws/whats-new/2026/07/openai-gpt-terra-luna-pricing-bedrock/, https://aws.amazon.com/about-aws/whats-new/2026/08/gpt-sol-terra-luna-long-context-bedrock/',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('2.75'),
                            cache_write_mtok=Decimal('3.4375'),
                            cache_read_mtok=Decimal('0.275'),
                            output_mtok=Decimal('16.5'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 7, 30)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('2.2'), tiers=[Tier(start=271999, price=Decimal('4.4'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('2.75'), tiers=[Tier(start=271999, price=Decimal('5.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.22'), tiers=[Tier(start=271999, price=Decimal('0.44'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('13.2'), tiers=[Tier(start=271999, price=Decimal('19.8'))]
                            ),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='writer.palmyra-x4-v1:0',
                match=ClauseContains(contains='writer.palmyra-x4'),
                name='Palmyra X4',
                context_window=128000,
                price_comments="Bedrock serves Palmyra X4 through cross-region inference profiles, so the model reference arrives prefixed, e.g. 'us.writer.palmyra-x4-v1:0'. Pricing is flat across regions. Ref: https://aws.amazon.com/bedrock/pricing/",
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='writer.palmyra-x5-v1:0',
                match=ClauseContains(contains='writer.palmyra-x5'),
                name='Palmyra X5',
                context_window=128000,
                price_comments="Bedrock serves Palmyra X5 through cross-region inference profiles, so the model reference arrives prefixed, e.g. 'us.writer.palmyra-x5-v1:0'. Pricing is flat across regions. Ref: https://aws.amazon.com/bedrock/pricing/",
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('6')),
            ),
        ],
    ),
    Provider(
        id='azure',
        name='Microsoft Azure',
        api_pattern='(https?://)?([^.]*\\.)?(?:openai\\.azure\\.com|azure-api\\.net|cognitiveservices\\.azure\\.com|services\\.ai\\.azure\\.com)',
        pricing_urls=['https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing'],
        price_comments='These are prices for "*-Global" models, prices for "Regional" models are often slightly higher. Retired models are listed at https://learn.microsoft.com/th-th/azure/ai-foundry/openai/concepts/legacy-models',
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
            UsageExtractor(
                root=['response', 'usage'],
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path=['input_token_details', 'text_tokens'], dest='input_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'image_tokens'], dest='input_image_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'text_tokens'],
                        dest='cache_text_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'audio_tokens'],
                        dest='cache_audio_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'image_tokens'],
                        dest='cache_image_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['output_token_details', 'text_tokens'], dest='output_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_token_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=False),
                ],
                api_flavor='realtime',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True)],
                api_flavor='embeddings',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_creation_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path='cache_creation_input_tokens', dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='anthropic',
                model_path='model',
            ),
        ],
        fallback_model_providers=['openai', 'anthropic', 'deepseek', 'x-ai', 'moonshotai'],
        models=[
            ModelInfo(
                id='ada',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='ada'),
                        ClauseEquals(equals='text-embedding-ada'),
                        ClauseEquals(equals='text-embedding-ada-002'),
                        ClauseEquals(equals='text-embedding-ada-002-v2'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='babbage',
                match=ClauseOr(or_=[ClauseEquals(equals='babbage'), ClauseEquals(equals='babbage-002')]),
                prices=ModelPrice(input_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='curie',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='curie'),
                        ClauseEquals(equals='text-curie'),
                        ClauseEquals(equals='text-curie-001'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='davinci',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='davinci'),
                        ClauseEquals(equals='davinci-002'),
                        ClauseEquals(equals='text-davinci'),
                        ClauseEquals(equals='text-davinci-002'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mai-ds-r1:free',
                match=ClauseEquals(equals='mai-ds-r1:free'),
                name='MAI DS R1 (free)',
                description="MAI-DS-R1 is a post-trained variant of DeepSeek-R1 developed by the Microsoft AI team to improve the model's responsiveness on previously blocked topics while enhancing its safety profile. Built on top of DeepSeek-R1's reasoning foundation, it integrates 110k examples from the Tulu-3 SFT dataset and 350k internally curated multilingual safety-alignment samples. The model retains strong reasoning, coding, and problem-solving capabilities, while unblocking a wide range of prompts previously restricted in R1.",
                context_window=163840,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='o1',
                match=ClauseOr(or_=[ClauseEquals(equals='o1'), ClauseEquals(equals='o1-2024-12-17')]),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('15'), cache_read_mtok=Decimal('7.5'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='o1-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-mini'), ClauseEquals(equals='o1-mini-2024-09-12')]),
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='o1-preview',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-preview'), ClauseEquals(equals='o1-preview-2024-09-12')]),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('15'), cache_read_mtok=Decimal('7.5'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='o3-2025-04-16',
                match=ClauseOr(or_=[ClauseEquals(equals='o3'), ClauseEquals(equals='o3-2025-04-16')]),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='o3-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='o3-mini'), ClauseEquals(equals='o3-mini-2025-01-31')]),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='o4-mini',
                match=ClauseOr(or_=[ClauseContains(contains='o4-mini'), ClauseContains(contains='o4-mini-2025-04-16')]),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.28'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='phi-3-medium-128k-instruct',
                match=ClauseEquals(equals='phi-3-medium-128k-instruct'),
                name='Phi-3 Medium 128K Instruct',
                description='Phi-3 128K Medium is a powerful 14-billion parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='phi-3-mini-128k-instruct',
                match=ClauseEquals(equals='phi-3-mini-128k-instruct'),
                name='Phi-3 Mini 128K Instruct',
                description='Phi-3 Mini is a powerful 3.8B parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-3.5-mini-128k-instruct',
                match=ClauseEquals(equals='phi-3.5-mini-128k-instruct'),
                name='Phi-3.5 Mini 128K Instruct',
                description='Phi-3.5 models are lightweight, state-of-the-art open models. These models were trained with Phi-3 datasets that include both synthetic data and the filtered, publicly available websites data, with a focus on high quality and reasoning-dense properties. Phi-3.5 Mini uses 3.8B parameters, and is a dense decoder-only transformer model using the same tokenizer as Phi-3 Mini.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-4',
                match=ClauseEquals(equals='phi-4'),
                name='Phi 4',
                description='Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed.',
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='phi-4-mini-instruct',
                match=ClauseEquals(equals='phi-4-mini-instruct'),
                name='Phi 4 Mini Instruct',
                description='Phi-4-mini-instruct is a lightweight open model built upon synthetic data and filtered publicly available websites, with a focus on high-quality, reasoning-dense data.',
                context_window=131072,
                price_comments='Imported from OpenRouter pricing; verify against Azure AI Foundry when native pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.35')),
            ),
            ModelInfo(
                id='phi-4-multimodal-instruct',
                match=ClauseEquals(equals='phi-4-multimodal-instruct'),
                name='Phi 4 Multimodal Instruct',
                description='Phi-4 Multimodal Instruct is a versatile 5.6B parameter foundation model that combines advanced reasoning and instruction-following capabilities across both text and visual inputs, providing accurate text outputs. The unified architecture enables efficient, low-latency inference, suitable for edge and mobile deployments. Phi-4 Multimodal Instruct supports text inputs in multiple languages including Arabic, Chinese, English, French, German, Japanese, Spanish, and more, with visual input optimized primarily for English. It delivers impressive performance on multimodal tasks involving mathematical, scientific, and document reasoning, providing developers and enterprises a powerful yet compact model for sophisticated interactive applications. For more information, see the Phi-4 Multimodal blog post.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-4-reasoning-plus',
                match=ClauseEquals(equals='phi-4-reasoning-plus'),
                name='Phi 4 Reasoning Plus',
                description='Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.35')),
            ),
            ModelInfo(
                id='phi-4-reasoning-plus:free',
                match=ClauseEquals(equals='phi-4-reasoning-plus:free'),
                name='Phi 4 Reasoning Plus (free)',
                description='Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.',
                context_window=32768,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='phi-4-reasoning:free',
                match=ClauseEquals(equals='phi-4-reasoning:free'),
                name='Phi 4 Reasoning (free)',
                description='Phi-4-reasoning is a 14B parameter dense decoder-only transformer developed by Microsoft, fine-tuned from Phi-4 to enhance complex reasoning capabilities. It uses a combination of supervised fine-tuning on chain-of-thought traces and reinforcement learning, targeting math, science, and code reasoning tasks. With a 32k context window and high inference efficiency, it is optimized for structured responses in a two-part format: reasoning trace followed by a final solution.',
                context_window=32768,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='text-embedding-3-large',
                match=ClauseEquals(equals='text-embedding-3-large'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.13')),
            ),
            ModelInfo(
                id='text-embedding-3-small',
                match=ClauseEquals(equals='text-embedding-3-small'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='wizardlm-2-8x22b',
                match=ClauseEquals(equals='wizardlm-2-8x22b'),
                name='WizardLM-2 8x22B',
                description="WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",
                prices=ModelPrice(input_mtok=Decimal('0.48'), output_mtok=Decimal('0.48')),
            ),
        ],
    ),
    Provider(
        id='baseten',
        name='Baseten',
        api_pattern='https://inference\\.baseten\\.co(?:/|$)',
        pricing_urls=['https://www.baseten.co/pricing/', 'https://docs.baseten.co/inference/model-apis/overview'],
        description='OpenAI- and Anthropic-compatible hosted inference through Baseten Model APIs.',
        price_comments="Covers the complete public Model APIs pricing table. Baseten automatically caches prompt prefixes and bills cached input at the published cache-input rate. Context windows use the catalog's displayed values in thousands of tokens. Model IDs use third-party namespaces, so they do not infer the Baseten provider without a Baseten provider ID or API URL.",
        provider_match=ClauseContains(contains='baseten'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='anthropic',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Flash-0731',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Flash-0731'),
                name='DeepSeek V4 Flash 0731',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.13'), cache_read_mtok=Decimal('0.028'), output_mtok=Decimal('0.26')
                ),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Pro',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Pro'),
                name='DeepSeek V4 Pro',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.74'), cache_read_mtok=Decimal('0.145'), output_mtok=Decimal('3.48')
                ),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Pro-0813',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Pro-0813'),
                name='DeepSeek V4 Pro 0813',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.32'), cache_read_mtok=Decimal('0.132'), output_mtok=Decimal('3.96')
                ),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2.6',
                match=ClauseEquals(equals='moonshotai/Kimi-K2.6'),
                name='Kimi K2.6',
                context_window=262000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2.7-Code',
                match=ClauseEquals(equals='moonshotai/Kimi-K2.7-Code'),
                name='Kimi K2.7 Code',
                context_window=262000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K3',
                match=ClauseEquals(equals='moonshotai/Kimi-K3'),
                name='Kimi K3',
                context_window=1048000,
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B',
                match=ClauseEquals(equals='nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B'),
                name='NVIDIA Nemotron 3 Ultra',
                context_window=202000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.12'), output_mtok=Decimal('2.4')
                ),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseEquals(equals='openai/gpt-oss-120b'),
                name='GPT OSS 120B',
                context_window=128000,
                price_comments='The pricing table does not publish a separate cached-input rate for this model.',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='thinkingmachines/inkling',
                match=ClauseEquals(equals='thinkingmachines/inkling'),
                name='Inkling',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('1'), cache_read_mtok=Decimal('0.17'), output_mtok=Decimal('4.05')
                ),
            ),
            ModelInfo(
                id='thinkingmachines/inkling-small',
                match=ClauseEquals(equals='thinkingmachines/inkling-small'),
                name='Inkling Small',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='zai-org/GLM-4.7',
                match=ClauseEquals(equals='zai-org/GLM-4.7'),
                name='GLM 4.7',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.12'), output_mtok=Decimal('2.2')
                ),
            ),
            ModelInfo(
                id='zai-org/GLM-5.2',
                match=ClauseEquals(equals='zai-org/GLM-5.2'),
                name='GLM 5.2',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.14'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='zai-org/GLM-5.2-Fast',
                match=ClauseEquals(equals='zai-org/GLM-5.2-Fast'),
                name='GLM 5.2 Fast',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('2.1'), cache_read_mtok=Decimal('0.21'), output_mtok=Decimal('6.6')
                ),
            ),
            ModelInfo(
                id='zai-org/GLM-5.3',
                match=ClauseEquals(equals='zai-org/GLM-5.3'),
                name='GLM 5.3',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.14'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='zai-org/GLM-5.3-Flash',
                match=ClauseEquals(equals='zai-org/GLM-5.3-Flash'),
                name='GLM 5.3 Flash',
                context_window=1048000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('0.5')
                ),
            ),
        ],
    ),
    Provider(
        id='cerebras',
        name='Cerebras',
        api_pattern='https://api\\.cerebras\\.ai',
        pricing_urls=[
            'https://www.cerebras.ai/pricing#pricing',
            'https://inference-docs.cerebras.ai/models/openai-oss',
            'https://inference-docs.cerebras.ai/models/gemma-4-31b',
            'https://inference-docs.cerebras.ai/support/change-log',
        ],
        model_match=ClauseContains(contains='cerebras'),
        provider_match=ClauseContains(contains='cerebras'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='gemma-4-31b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemma-4-31b'),
                        ClauseStartsWith(starts_with='cerebras/gemma-4-31b'),
                        ClauseStartsWith(starts_with='cerebras:gemma-4-31b'),
                    ]
                ),
                name='Gemma 4 31B',
                description="Google's Gemma 4 31B open model for chat, instruction following, and multilingual tasks, served with fast inference on Cerebras hardware (~1,850 tokens/second).",
                context_window=131072,
                price_comments='Developer tier pricing. Free tier: 65k context, Paid tier: 131k context.',
                prices=ModelPrice(input_mtok=Decimal('0.99'), output_mtok=Decimal('1.49')),
            ),
            ModelInfo(
                id='gpt-oss-120b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-oss-120b'),
                        ClauseStartsWith(starts_with='cerebras/gpt-oss-120b'),
                        ClauseStartsWith(starts_with='cerebras:gpt-oss-120b'),
                    ]
                ),
                name='GPT-OSS 120B',
                description="OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with 120 billion parameters and 128 experts. Delivers frontier reasoning capabilities with record-breaking inference speeds on Cerebras hardware (~3,000 tokens/second).",
                context_window=131072,
                price_comments='Developer tier pricing. Free tier: 65k context, Paid tier: 131k context.',
                prices=ModelPrice(input_mtok=Decimal('0.35'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='llama-3.3-70b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='llama-3.3-70b'),
                        ClauseStartsWith(starts_with='cerebras/llama-3.3-70b'),
                        ClauseStartsWith(starts_with='cerebras:llama-3.3-70b'),
                    ]
                ),
                name='Llama 3.3 70B',
                description="Meta's enhanced 70B model delivering 405B-level accuracy. Optimized for chat, coding, instruction following, mathematics, and reasoning with high-speed inference on Cerebras hardware (~2,100 tokens/second).",
                context_window=128000,
                price_comments='No longer listed in the Cerebras Inference docs (checked 2026-07-17 and 2026-08-27); last known rates kept for historical usage.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.85'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='llama3.1-8b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='llama3.1-8b'),
                        ClauseStartsWith(starts_with='cerebras/llama3.1-8b'),
                        ClauseStartsWith(starts_with='cerebras:llama3.1-8b'),
                    ]
                ),
                name='Llama 3.1 8B',
                description="Meta's Llama 3.1 8B model for general-purpose tasks including chat, coding, and instruction following. Optimized for fast inference on Cerebras hardware (~2,200 tokens/second).",
                context_window=32768,
                price_comments='No longer listed in the Cerebras Inference docs (checked 2026-07-17 and 2026-08-27); last known rates kept for historical usage.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='qwen-3-32b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen-3-32b'),
                        ClauseStartsWith(starts_with='cerebras/qwen-3-32b'),
                        ClauseStartsWith(starts_with='cerebras:qwen-3-32b'),
                    ]
                ),
                name='Qwen 3 32B',
                description="Qwen's 32B parameter model with enhanced reasoning and coding capabilities. Supports both standard and reasoning modes for complex tasks, with fast inference speeds on Cerebras hardware (~2,600 tokens/second).",
                context_window=131072,
                price_comments='No longer listed in the Cerebras Inference docs (checked 2026-07-17 and 2026-08-27); last known rates kept for historical usage.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='qwen-3-coder-480b',
                match=ClauseEquals(equals='qwen-3-coder-480b'),
                name='qwen-3-coder-480b',
                price_comments='Seems to be no longer available on cerebras, here to help with tests',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='zai-glm-4.7',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-glm-4.7'),
                        ClauseStartsWith(starts_with='cerebras/zai-glm-4.7'),
                        ClauseStartsWith(starts_with='cerebras:zai-glm-4.7'),
                    ]
                ),
                name='Z.ai GLM 4.7',
                description="Z.ai's GLM 4.7, a 355 billion parameter model with reasoning enabled by default, served with fast inference on Cerebras hardware (~1,000 tokens/second).",
                context_window=131072,
                price_comments='Deprecated by Cerebras on 2026-08-17 (see https://inference-docs.cerebras.ai/support/change-log) and no longer in the model catalog; last published developer tier rates kept for historical usage.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('2.25'), output_mtok=Decimal('2.75')),
            ),
        ],
    ),
    Provider(
        id='cloudflare',
        name='Cloudflare Workers AI',
        api_pattern='https://api\\.cloudflare\\.com/client/v4/accounts/[^/]+/ai(?:/|$)',
        pricing_urls=[
            'https://developers.cloudflare.com/workers-ai/platform/pricing/',
            'https://developers.cloudflare.com/workers-ai/models/',
        ],
        price_comments="Paid Workers plan rates, expressed using Cloudflare's token-equivalent prices. Calculations do not apply the account-wide free allocation of 10,000 Neurons per day. This provider entry deliberately covers only models with token-equivalent prices. Image and audio models are omitted.",
        model_match=ClauseStartsWith(starts_with='@cf/'),
        provider_match=ClauseContains(contains='cloudflare'),
        extractors=[
            UsageExtractor(
                root=['result', 'usage'],
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path=['result', 'model'],
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True)],
                api_flavor='embeddings',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='@cf/ai4bharat/indictrans2-en-indic-1B',
                match=ClauseEquals(equals='@cf/ai4bharat/indictrans2-en-indic-1B'),
                name='IndicTrans2 EN-Indic 1B',
                prices=ModelPrice(input_mtok=Decimal('0.342'), output_mtok=Decimal('0.342')),
            ),
            ModelInfo(
                id='@cf/aisingapore/gemma-sea-lion-v4-27b-it',
                match=ClauseEquals(equals='@cf/aisingapore/gemma-sea-lion-v4-27b-it'),
                name='Gemma SEA-LION v4 27B IT',
                prices=ModelPrice(input_mtok=Decimal('0.351'), output_mtok=Decimal('0.555')),
            ),
            ModelInfo(
                id='@cf/baai/bge-base-en-v1.5',
                match=ClauseEquals(equals='@cf/baai/bge-base-en-v1.5'),
                name='BGE Base English v1.5',
                prices=ModelPrice(input_mtok=Decimal('0.067')),
            ),
            ModelInfo(
                id='@cf/baai/bge-large-en-v1.5',
                match=ClauseEquals(equals='@cf/baai/bge-large-en-v1.5'),
                name='BGE Large English v1.5',
                prices=ModelPrice(input_mtok=Decimal('0.204')),
            ),
            ModelInfo(
                id='@cf/baai/bge-m3',
                match=ClauseEquals(equals='@cf/baai/bge-m3'),
                name='BGE-M3',
                prices=ModelPrice(input_mtok=Decimal('0.012')),
            ),
            ModelInfo(
                id='@cf/baai/bge-reranker-base',
                match=ClauseEquals(equals='@cf/baai/bge-reranker-base'),
                name='BGE Reranker Base',
                prices=ModelPrice(input_mtok=Decimal('0.003')),
            ),
            ModelInfo(
                id='@cf/baai/bge-small-en-v1.5',
                match=ClauseEquals(equals='@cf/baai/bge-small-en-v1.5'),
                name='BGE Small English v1.5',
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='@cf/deepseek-ai/deepseek-r1-distill-qwen-32b',
                match=ClauseEquals(equals='@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'),
                name='DeepSeek R1 Distill Qwen 32B',
                prices=ModelPrice(input_mtok=Decimal('0.497'), output_mtok=Decimal('4.881')),
            ),
            ModelInfo(
                id='@cf/deepseek-ai/deepseek-v4-flash-0731',
                match=ClauseEquals(equals='@cf/deepseek-ai/deepseek-v4-flash-0731'),
                name='DeepSeek V4 Flash 0731',
                prices=ModelPrice(
                    input_mtok=Decimal('0.44'), cache_read_mtok=Decimal('0.014'), output_mtok=Decimal('1.32')
                ),
            ),
            ModelInfo(
                id='@cf/deepseek-ai/deepseek-v4-pro-0813',
                match=ClauseEquals(equals='@cf/deepseek-ai/deepseek-v4-pro-0813'),
                name='DeepSeek V4 Pro 0813',
                prices=ModelPrice(
                    input_mtok=Decimal('1.32'), cache_read_mtok=Decimal('0.044'), output_mtok=Decimal('3.96')
                ),
            ),
            ModelInfo(
                id='@cf/google/gemma-3-12b-it',
                match=ClauseEquals(equals='@cf/google/gemma-3-12b-it'),
                name='Gemma 3 12B IT',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.345'), output_mtok=Decimal('0.556')),
            ),
            ModelInfo(
                id='@cf/google/gemma-4-26b-a4b-it',
                match=ClauseEquals(equals='@cf/google/gemma-4-26b-a4b-it'),
                name='Gemma 4 26B A4B IT',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='@cf/huggingface/distilbert-sst-2-int8',
                match=ClauseEquals(equals='@cf/huggingface/distilbert-sst-2-int8'),
                name='DistilBERT SST-2 INT8',
                prices=ModelPrice(input_mtok=Decimal('0.026')),
            ),
            ModelInfo(
                id='@cf/ibm-granite/granite-4.0-h-micro',
                match=ClauseEquals(equals='@cf/ibm-granite/granite-4.0-h-micro'),
                name='Granite 4.0 H Micro',
                prices=ModelPrice(input_mtok=Decimal('0.017'), output_mtok=Decimal('0.112')),
            ),
            ModelInfo(
                id='@cf/meta/llama-2-7b-chat-fp16',
                match=ClauseEquals(equals='@cf/meta/llama-2-7b-chat-fp16'),
                name='Llama 2 7B Chat FP16',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.556'), output_mtok=Decimal('6.667')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3-8b-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-3-8b-instruct'),
                name='Llama 3 8B Instruct',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.282'), output_mtok=Decimal('0.827')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3-8b-instruct-awq',
                match=ClauseEquals(equals='@cf/meta/llama-3-8b-instruct-awq'),
                name='Llama 3 8B Instruct AWQ',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.123'), output_mtok=Decimal('0.266')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.1-70b-instruct-fp8-fast',
                match=ClauseEquals(equals='@cf/meta/llama-3.1-70b-instruct-fp8-fast'),
                name='Llama 3.1 70B Instruct FP8 Fast',
                prices=ModelPrice(input_mtok=Decimal('0.293'), output_mtok=Decimal('2.253')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.1-8b-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-3.1-8b-instruct'),
                name='Llama 3.1 8B Instruct',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.282'), output_mtok=Decimal('0.827')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.1-8b-instruct-awq',
                match=ClauseEquals(equals='@cf/meta/llama-3.1-8b-instruct-awq'),
                name='Llama 3.1 8B Instruct AWQ',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.123'), output_mtok=Decimal('0.266')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.1-8b-instruct-fp8',
                match=ClauseEquals(equals='@cf/meta/llama-3.1-8b-instruct-fp8'),
                name='Llama 3.1 8B Instruct FP8',
                prices=ModelPrice(input_mtok=Decimal('0.152'), output_mtok=Decimal('0.287')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.1-8b-instruct-fp8-fast',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='@cf/meta/llama-3.1-8b-instruct-fp8-fast'),
                        ClauseEquals(equals='@cf/meta/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama 3.1 8B Instruct FP8 Fast',
                price_comments="Cloudflare's pricing table uses the fp8-fast identifier while the model catalog documents the fast identifier.",
                prices=ModelPrice(input_mtok=Decimal('0.045'), output_mtok=Decimal('0.384')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.2-11b-vision-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-3.2-11b-vision-instruct'),
                name='Llama 3.2 11B Vision Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.049'), output_mtok=Decimal('0.676')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.2-1b-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-3.2-1b-instruct'),
                name='Llama 3.2 1B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.027'), output_mtok=Decimal('0.201')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.2-3b-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-3.2-3b-instruct'),
                name='Llama 3.2 3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.051'), output_mtok=Decimal('0.335')),
            ),
            ModelInfo(
                id='@cf/meta/llama-3.3-70b-instruct-fp8-fast',
                match=ClauseEquals(equals='@cf/meta/llama-3.3-70b-instruct-fp8-fast'),
                name='Llama 3.3 70B Instruct FP8 Fast',
                context_window=24000,
                prices=ModelPrice(input_mtok=Decimal('0.293'), output_mtok=Decimal('2.253')),
            ),
            ModelInfo(
                id='@cf/meta/llama-4-scout-17b-16e-instruct',
                match=ClauseEquals(equals='@cf/meta/llama-4-scout-17b-16e-instruct'),
                name='Llama 4 Scout 17B 16E Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='@cf/meta/llama-guard-3-8b',
                match=ClauseEquals(equals='@cf/meta/llama-guard-3-8b'),
                name='Llama Guard 3 8B',
                prices=ModelPrice(input_mtok=Decimal('0.484'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='@cf/meta/m2m100-1.2b',
                match=ClauseEquals(equals='@cf/meta/m2m100-1.2b'),
                name='M2M100 1.2B',
                prices=ModelPrice(input_mtok=Decimal('0.342'), output_mtok=Decimal('0.342')),
            ),
            ModelInfo(
                id='@cf/mistral/mistral-7b-instruct-v0.1',
                match=ClauseEquals(equals='@cf/mistral/mistral-7b-instruct-v0.1'),
                name='Mistral 7B Instruct v0.1',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.19')),
            ),
            ModelInfo(
                id='@cf/mistralai/mistral-small-3.1-24b-instruct',
                match=ClauseEquals(equals='@cf/mistralai/mistral-small-3.1-24b-instruct'),
                name='Mistral Small 3.1 24B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.351'), output_mtok=Decimal('0.555')),
            ),
            ModelInfo(
                id='@cf/moondream/moondream3.1-9B-A2B',
                match=ClauseEquals(equals='@cf/moondream/moondream3.1-9B-A2B'),
                name='Moondream 3.1 9B A2B',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='@cf/moonshotai/kimi-k2.5',
                match=ClauseEquals(equals='@cf/moonshotai/kimi-k2.5'),
                name='Kimi K2.5',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='@cf/moonshotai/kimi-k2.6',
                match=ClauseEquals(equals='@cf/moonshotai/kimi-k2.6'),
                name='Kimi K2.6',
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='@cf/moonshotai/kimi-k2.7-code',
                match=ClauseEquals(equals='@cf/moonshotai/kimi-k2.7-code'),
                name='Kimi K2.7 Code',
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.19'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='@cf/nvidia/nemotron-3-120b-a12b',
                match=ClauseEquals(equals='@cf/nvidia/nemotron-3-120b-a12b'),
                name='Nemotron 3 120B A12B',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='@cf/openai/gpt-oss-120b',
                match=ClauseEquals(equals='@cf/openai/gpt-oss-120b'),
                name='GPT-OSS 120B',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.35'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='@cf/openai/gpt-oss-20b',
                match=ClauseEquals(equals='@cf/openai/gpt-oss-20b'),
                name='GPT-OSS 20B',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='@cf/pfnet/plamo-embedding-1b',
                match=ClauseEquals(equals='@cf/pfnet/plamo-embedding-1b'),
                name='PLaMo Embedding 1B',
                prices=ModelPrice(input_mtok=Decimal('0.019')),
            ),
            ModelInfo(
                id='@cf/qwen/qwen2.5-coder-32b-instruct',
                match=ClauseEquals(equals='@cf/qwen/qwen2.5-coder-32b-instruct'),
                name='Qwen2.5 Coder 32B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.66'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='@cf/qwen/qwen3-30b-a3b-fp8',
                match=ClauseEquals(equals='@cf/qwen/qwen3-30b-a3b-fp8'),
                name='Qwen3 30B A3B FP8',
                prices=ModelPrice(input_mtok=Decimal('0.051'), output_mtok=Decimal('0.335')),
            ),
            ModelInfo(
                id='@cf/qwen/qwen3-embedding-0.6b',
                match=ClauseEquals(equals='@cf/qwen/qwen3-embedding-0.6b'),
                name='Qwen3 Embedding 0.6B',
                prices=ModelPrice(input_mtok=Decimal('0.012')),
            ),
            ModelInfo(
                id='@cf/qwen/qwen3.8-27b',
                match=ClauseEquals(equals='@cf/qwen/qwen3.8-27b'),
                name='Qwen3.8 27B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('3.2')),
            ),
            ModelInfo(
                id='@cf/qwen/qwq-32b',
                match=ClauseEquals(equals='@cf/qwen/qwq-32b'),
                name='QwQ 32B',
                prices=ModelPrice(input_mtok=Decimal('0.66'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='@cf/zai-org/glm-4.7-flash',
                match=ClauseEquals(equals='@cf/zai-org/glm-4.7-flash'),
                name='GLM 4.7 Flash',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='@cf/zai-org/glm-5.2',
                match=ClauseEquals(equals='@cf/zai-org/glm-5.2'),
                name='GLM 5.2',
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='@cf/zai-org/glm-5.3-flash',
                match=ClauseEquals(equals='@cf/zai-org/glm-5.3-flash'),
                name='GLM 5.3 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('0.5')
                ),
            ),
        ],
    ),
    Provider(
        id='cohere',
        name='Cohere',
        api_pattern='https://api\\.cohere\\.(?:ai|com)',
        pricing_urls=['https://cohere.com/pricing'],
        model_match=ClauseStartsWith(starts_with='command-'),
        provider_match=ClauseContains(contains='cohere'),
        extractors=[
            UsageExtractor(
                root=['usage', 'billed_units'],
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path=['tokens', 'input_tokens'], dest='input_tokens', required=False),
                    UsageExtractorMapping(path=['tokens', 'output_tokens'], dest='output_tokens', required=False),
                    UsageExtractorMapping(path='cached_tokens', dest='cache_read_tokens', required=False),
                ],
                api_flavor='tokens',
                model_path='model',
            ),
            UsageExtractor(
                root=['meta', 'billed_units'],
                mappings=[UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True)],
                api_flavor='embeddings',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='c4ai-aya-expanse-32b',
                match=ClauseContains(contains='aya-expanse-32b'),
                name='Aya Expanse 32B',
                description='Aya Expanse is a highly performant 32B multilingual model, designed to rival monolingual performance through innovations in instruction tuning with data arbitrage, preference training, and model merging. Serves 23 languages.',
                context_window=128000,
                price_comments='https://cohere.com/pricing FAQ: Aya Expanse models (8B and 32B) on the API are charged at $0.50/1M tokens for input and $1.50/1M tokens for output.',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='c4ai-aya-expanse-8b',
                match=ClauseContains(contains='aya-expanse-8b'),
                name='Aya Expanse 8B',
                description='Aya Expanse is a highly performant 8B multilingual model, designed to rival monolingual performance through innovations in instruction tuning with data arbitrage, preference training, and model merging. Serves 23 languages.',
                context_window=8192,
                price_comments='Retired 2026-04-04 per https://docs.cohere.com/docs/models; last published price kept for historical usage. https://cohere.com/pricing FAQ: Aya Expanse models (8B and 32B) on the API are charged at $0.50/1M tokens for input and $1.50/1M tokens for output.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='command',
                match=ClauseEquals(equals='command'),
                name='Command',
                description='Command is an instruction-following conversational model that performs language tasks with high quality, more reliably and with a longer context than our base generative models.',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='command-a',
                match=ClauseOr(or_=[ClauseEquals(equals='command-a'), ClauseEquals(equals='command-a-03-2025')]),
                name='Command A',
                description='Command A is an open-weights 111B parameter model with a 256k context window focused on delivering great performance across agentic, multilingual, and coding use cases.\nCompared to other leading proprietary and open-weights models Command A delivers maximum performance with minimum hardware costs, excelling on business-critical agentic and multilingual tasks.',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='command-light',
                match=ClauseStartsWith(starts_with='command-light'),
                name='Command Light',
                description='A smaller, faster version of Command. Almost as capable, but a lot faster.',
                context_window=4096,
                price_comments='Deprecated 2025-09-15 per https://docs.cohere.com/docs/models; still billable for existing customers. https://cohere.com/pricing FAQ: Command-light pricing is $0.30/1M tokens for input and $0.60/1M tokens for output.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='command-r',
                match=ClauseOr(or_=[ClauseEquals(equals='command-r'), ClauseEquals(equals='command-r-08-2024')]),
                name='Command R',
                description='Command-R is a 35B parameter model that performs conversational language tasks at a higher quality, more reliably, and with a longer context than previous models. It can be used for complex workflows like code generation, retrieval augmented generation (RAG), tool use, and agents.',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='command-r-plus',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='command-r-plus'), ClauseEquals(equals='command-r-plus-08-2024')]
                ),
                name='Command R+',
                description="Command R+ is a new, 104B-parameter LLM from Cohere. It's useful for roleplay, general consumer usecases, and Retrieval Augmented Generation (RAG).",
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='command-r7b',
                match=ClauseOr(or_=[ClauseEquals(equals='command-r7b'), ClauseEquals(equals='command-r7b-12-2024')]),
                name='Command R7B',
                description='Command R7B (12-2024) is a small, fast update of the Command R+ model, delivered in December 2024. It excels at RAG, tool use, agents, and similar tasks requiring complex reasoning and multiple steps.',
                prices=ModelPrice(input_mtok=Decimal('0.0375'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='embed-v4.0',
                match=ClauseEquals(equals='embed-v4.0'),
                name='Embed v4.0',
                description='Embed v4.0 is a state-of-the-art embedding model designed for precise retrieval across noisy, multilingual, and multimodal data.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
        ],
    ),
    Provider(
        id='cursor',
        name='Cursor',
        api_pattern='https://api\\.cursor\\.com',
        pricing_urls=[
            'https://cursor.com/docs/models-and-pricing',
            'https://cursor.com/docs/models/grok-4-6',
            'https://cursor.com/docs/models/grok-4-5',
            'https://cursor.com/docs/models/cursor-composer-2-5',
        ],
        description="Agentic coding models available through Cursor's editor, SDK, and Cloud Agents API.",
        model_match=ClauseStartsWith(starts_with='composer-'),
        extractors=[
            UsageExtractor(
                root='tokenUsage',
                mappings=[
                    UsageExtractorMapping(path='inputTokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cacheWriteTokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cacheReadTokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cacheWriteTokens', dest='cache_write_tokens', required=True),
                    UsageExtractorMapping(path='cacheReadTokens', dest='cache_read_tokens', required=True),
                    UsageExtractorMapping(path='outputTokens', dest='output_tokens', required=True),
                ],
                api_flavor='usage-event',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='composer-2.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='composer-2.5'), ClauseRegex(regex='^composer-2\\.5\\[fast=false\\]$')]
                ),
                name='Composer 2.5',
                description="Cursor's agentic coding model, optimized for long-running tasks and tool use.",
                context_window=200000,
                price_comments='Standard on-demand usage. Fast is a separately priced variant.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='composer-2.5-fast',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='composer-2.5-fast'), ClauseRegex(regex='^composer-2\\.5\\[fast=true\\]$')]
                ),
                name='Composer 2.5 Fast',
                description='Faster Composer 2.5 speed tier with the same model intelligence.',
                context_window=200000,
                price_comments='Fast on-demand usage.',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='grok-4.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='grok-4.5'), ClauseRegex(regex='^grok-4\\.5\\[fast=false\\]$')]
                ),
                name='Grok 4.5',
                description="Cursor and SpaceXAI's agentic model for long-running coding and knowledge work.",
                context_window=256000,
                price_comments='Standard on-demand usage. Fast is a separately priced variant.',
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='grok-4.5-fast',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='grok-4.5-fast'), ClauseRegex(regex='^grok-4\\.5\\[fast=true\\]$')]
                ),
                name='Grok 4.5 Fast',
                description='Faster Grok 4.5 speed tier for agentic coding and knowledge work.',
                context_window=256000,
                price_comments='Fast on-demand usage.',
                prices=ModelPrice(input_mtok=Decimal('4'), cache_read_mtok=Decimal('1'), output_mtok=Decimal('18')),
            ),
            ModelInfo(
                id='grok-4.6',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='grok-4.6'), ClauseRegex(regex='^grok-4\\.6\\[fast=false\\]$')]
                ),
                name='Grok 4.6',
                description="Cursor and SpaceXAI's frontier model for complex coding and knowledge work.",
                context_window=256000,
                price_comments='Standard on-demand usage. Fast is a separately priced variant.',
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='grok-4.6-fast',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='grok-4.6-fast'), ClauseRegex(regex='^grok-4\\.6\\[fast=true\\]$')]
                ),
                name='Grok 4.6 Fast',
                description='Faster Grok 4.6 speed tier for complex coding and knowledge work.',
                context_window=256000,
                price_comments='Fast on-demand usage.',
                prices=ModelPrice(input_mtok=Decimal('4'), cache_read_mtok=Decimal('1'), output_mtok=Decimal('12')),
            ),
        ],
    ),
    Provider(
        id='deepseek',
        name='Deepseek',
        api_pattern='https://api\\.deepseek\\.com',
        pricing_urls=['https://api-docs.deepseek.com/quick_start/pricing'],
        price_comments='Deepseek off-peak pricing applies "UTC 16:30-00:30" so we switch it around and use the off-peak pricing as the default (first) price then the second price with a constraint is the "standard" pricing that applies "UTC 00:30-16:30".',
        model_match=ClauseStartsWith(starts_with='deepseek'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='deepseek-chat',
                match=ClauseOr(
                    or_=[ClauseStartsWith(starts_with='deepseek-chat'), ClauseEquals(equals='deepseek-chat-v3-0324')]
                ),
                name='DeepSeek Chat',
                description='DeepSeek-V3 is the latest model from the DeepSeek team, building upon the instruction following and coding abilities of the previous versions. Pre-trained on nearly 15 trillion tokens, the reported evaluations reveal that the model outperforms other open-source models and rivals leading closed-source models.',
                context_window=64000,
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.135'), cache_read_mtok=Decimal('0.035'), output_mtok=Decimal('0.55')
                        )
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(0, 30, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(16, 30, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.27'), cache_read_mtok=Decimal('0.07'), output_mtok=Decimal('1.1')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='deepseek-reasoner',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-reasoner'),
                        ClauseStartsWith(starts_with='deepseek-r1'),
                        ClauseEquals(equals='deepseek-r1-0528'),
                    ]
                ),
                name='Deepseek R1',
                description="DeepSeek R1 is here: Performance on par with OpenAI o1, but open-sourced and with fully open reasoning tokens. It's 671B parameters in size, with 37B active in an inference pass.",
                context_window=64000,
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.135'), cache_read_mtok=Decimal('0.035'), output_mtok=Decimal('0.55')
                        )
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(0, 30, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(16, 30, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.55'), cache_read_mtok=Decimal('0.14'), output_mtok=Decimal('2.19')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='deepseek-v3.1-terminus',
                match=ClauseEquals(equals='deepseek-v3.1-terminus'),
                name='DeepSeek V3.1 Terminus',
                description="DeepSeek-V3.1 Terminus is an update to DeepSeek V3.1 that maintains the model's original capabilities while addressing issues reported by users, including language consistency and agent capabilities.",
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.27'), cache_read_mtok=Decimal('0.13'), output_mtok=Decimal('0.95')
                ),
            ),
            ModelInfo(
                id='deepseek-v3.2',
                match=ClauseEquals(equals='deepseek-v3.2'),
                name='DeepSeek V3.2',
                description='DeepSeek-V3.2 is a large language model designed to harmonize high computational efficiency with strong reasoning and agentic tool-use performance.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.2288'), output_mtok=Decimal('0.3432')),
            ),
            ModelInfo(
                id='deepseek-v3.2-exp',
                match=ClauseEquals(equals='deepseek-v3.2-exp'),
                name='DeepSeek V3.2 Exp',
                description='DeepSeek-V3.2-Exp is an experimental large language model released by DeepSeek as an intermediate step between V3.1 and future architectures.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.41')),
            ),
            ModelInfo(
                id='deepseek-v4-flash',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='deepseek-v4-flash')]),
                name='DeepSeek V4 Flash',
                description='DeepSeek-V4-Flash. Supports both non-thinking and thinking (default) modes, JSON output, tool calls, chat prefix completion, and FIM completion (non-thinking only).',
                context_window=1000000,
                price_comments='From 2026-08-17 the V4 models use different peak windows from the V3 models: peak is "UTC 01:00-04:00" and "UTC 06:00-10:00", everything else is off-peak. The flat rate that applied before 2026-08-17 is kept as the unconstrained first price, the new off-peak rate is gated on start_date, and the two peak windows come last so they win during peak hours. Two things this layout still cannot say, because `constraint` is a union and one entry cannot carry both a date and a daily window. Requests from before 2026-08-17 that fall inside 01:00-04:00 or 06:00-10:00 UTC - 7 hours of every day - resolve to the new peak rate rather than the old flat rate. And from 2026-08-23 Deepseek bills off-peak all day at weekends (Beijing time), which needs a day-of-week condition, so on Saturdays and Sundays the peak prices here are an upper bound. See https://github.com/pydantic/genai-prices/issues/582.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.14'), cache_read_mtok=Decimal('0.0028'), output_mtok=Decimal('0.28')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 17)),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.22'), cache_read_mtok=Decimal('0.007'), output_mtok=Decimal('0.66')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(1, 0, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(4, 0, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.44'), cache_read_mtok=Decimal('0.014'), output_mtok=Decimal('1.32')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(6, 0, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(10, 0, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.44'), cache_read_mtok=Decimal('0.014'), output_mtok=Decimal('1.32')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='deepseek-v4-pro',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='deepseek-v4-pro')]),
                name='DeepSeek V4 Pro',
                description='DeepSeek-V4-Pro. Supports both non-thinking and thinking (default) modes, JSON output, tool calls, chat prefix completion, and FIM completion (non-thinking only).',
                context_window=1000000,
                price_comments='From 2026-08-17 the V4 models use different peak windows from the V3 models: peak is "UTC 01:00-04:00" and "UTC 06:00-10:00", everything else is off-peak. The flat rate that applied before 2026-08-17 is kept as the unconstrained first price, the new off-peak rate is gated on start_date, and the two peak windows come last so they win during peak hours. Two things this layout still cannot say, because `constraint` is a union and one entry cannot carry both a date and a daily window. Requests from before 2026-08-17 that fall inside 01:00-04:00 or 06:00-10:00 UTC - 7 hours of every day - resolve to the new peak rate rather than the old flat rate. And from 2026-08-23 Deepseek bills off-peak all day at weekends (Beijing time), which needs a day-of-week condition, so on Saturdays and Sundays the peak prices here are an upper bound. See https://github.com/pydantic/genai-prices/issues/582.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.435'),
                            cache_read_mtok=Decimal('0.003625'),
                            output_mtok=Decimal('0.87'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 17)),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.66'), cache_read_mtok=Decimal('0.022'), output_mtok=Decimal('1.98')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(1, 0, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(4, 0, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.32'), cache_read_mtok=Decimal('0.044'), output_mtok=Decimal('3.96')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=TimeOfDateConstraint(
                            start_time=datetime.time(6, 0, tzinfo=datetime.timezone.utc),
                            end_time=datetime.time(10, 0, tzinfo=datetime.timezone.utc),
                        ),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.32'), cache_read_mtok=Decimal('0.044'), output_mtok=Decimal('3.96')
                        ),
                    ),
                ],
            ),
        ],
    ),
    Provider(
        id='doubleword',
        name='Doubleword',
        api_pattern='https://api\\.doubleword\\.ai',
        pricing_urls=['https://docs.doubleword.ai/inference-api/models'],
        price_comments='Doubleword publishes Realtime, Async, and Batch prices. This provider currently encodes only Realtime pricing.',
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True)],
                api_flavor='embeddings',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/Qwen3-14B-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3-14B-FP8'),
                name='Qwen3 14B',
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Embedding-8B',
                match=ClauseEquals(equals='Qwen/Qwen3-Embedding-8B'),
                name='Qwen3 Embedding 8B',
                prices=ModelPrice(input_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-235B-A22B-Instruct-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3-VL-235B-A22B-Instruct-FP8'),
                name='Qwen3 VL 235B A22B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-30B-A3B-Instruct-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3-VL-30B-A3B-Instruct-FP8'),
                name='Qwen3 VL 30B A3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.16'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-35B-A3B-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3.5-35B-A3B-FP8'),
                name='Qwen3.5 35B A3B',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-397B-A17B',
                match=ClauseEquals(equals='Qwen/Qwen3.5-397B-A17B'),
                name='Qwen3.5 397B A17B',
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('3.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-9B',
                match=ClauseEquals(equals='Qwen/Qwen3.5-9B'),
                name='Qwen3.5 9B',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.6-35B-A3B-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3.6-35B-A3B-FP8'),
                name='Qwen3.6 35B A3B',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.8-27B-FP8',
                match=ClauseEquals(equals='Qwen/Qwen3.8-27B-FP8'),
                name='Qwen3.8 27B',
                context_window=262144,
                price_comments='Realtime pricing. See https://docs.doubleword.ai/inference-api/models/qwen-qwen3-8-27b-fp8.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.45'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('3')
                ),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Flash',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Flash'),
                name='DeepSeek V4 Flash',
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.28')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Flash-0731',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Flash-0731'),
                name='DeepSeek V4 Flash 0731',
                price_comments='Realtime pricing. See https://docs.doubleword.ai/inference-api/models/deepseek-ai-deepseek-v4-flash-0731.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.09'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('0.18')
                ),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4-Pro',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4-Pro'),
                name='DeepSeek V4 Pro',
                prices=ModelPrice(input_mtok=Decimal('1.74'), output_mtok=Decimal('3.48')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V4.1-Flash',
                match=ClauseEquals(equals='deepseek-ai/DeepSeek-V4.1-Flash'),
                name='DeepSeek V4.1 Flash',
                price_comments='Realtime pricing. See https://docs.doubleword.ai/inference-api/models/deepseek-ai-deepseek-v4-1-flash.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='google/gemma-4-31B-it',
                match=ClauseEquals(equals='google/gemma-4-31B-it'),
                name='Gemma 4 31B IT',
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='mistralai/Devstral-2-123B-Instruct-2512',
                match=ClauseEquals(equals='mistralai/Devstral-2-123B-Instruct-2512'),
                name='Devstral 2 123B Instruct 2512',
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2.6',
                match=ClauseEquals(equals='moonshotai/Kimi-K2.6'),
                name='Kimi K2.6',
                prices=ModelPrice(input_mtok=Decimal('0.95'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k3',
                match=ClauseEquals(equals='moonshotai/kimi-k3'),
                name='Kimi K3',
                context_window=1048576,
                price_comments='Realtime pricing. See https://docs.doubleword.ai/inference-api/models/moonshotai-kimi-k3.',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4',
                match=ClauseEquals(equals='nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4'),
                name='Nemotron 3 Super 120B A12B',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseEquals(equals='openai/gpt-oss-20b'),
                name='GPT OSS 20B',
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='zai-org/GLM-5.1-FP8',
                match=ClauseEquals(equals='zai-org/GLM-5.1-FP8'),
                name='GLM 5.1',
                prices=ModelPrice(input_mtok=Decimal('1.4'), output_mtok=Decimal('4.4')),
            ),
            ModelInfo(
                id='zai-org/GLM-5.2-FP8',
                match=ClauseEquals(equals='zai-org/GLM-5.2-FP8'),
                name='GLM 5.2',
                context_window=1048576,
                price_comments='Realtime pricing. See https://docs.doubleword.ai/inference-api/models/zai-org-glm-5-2-fp8.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.93'), cache_read_mtok=Decimal('0.19'), output_mtok=Decimal('3')
                ),
            ),
        ],
    ),
    Provider(
        id='fireworks',
        name='Fireworks',
        api_pattern='https://api\\.fireworks\\.ai',
        pricing_urls=['https://fireworks.ai/pricing'],
        model_match=ClauseStartsWith(starts_with='accounts/fireworks/'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='deepseek-r1-0528',
                match=ClauseEquals(equals='accounts/fireworks/models/deepseek-r1-0528'),
                name='DeepSeek R1 0528',
                description='The updated DeepSeek-R1-0528 model delivers major improvements in reasoning, inference, and accuracy through enhanced post-training optimization and greater computational resources. It now performs at a level approaching top-tier models like O3 and Gemini 2.5 Pro, with notable gains in complex tasks such as math and programming.',
                context_window=160000,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='deepseek-v3-0324',
                match=ClauseEquals(equals='accounts/fireworks/models/deepseek-v3-0324'),
                name='Deepseek V3 03-24',
                description='A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Updated checkpoint.',
                context_window=160000,
                price_comments='docs give just one price - "Pricing Per 1M Tokens", we assume that\'s input and output',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='deepseek-v3p2',
                match=ClauseEquals(equals='accounts/fireworks/models/deepseek-v3p2'),
                name='Deepseek V3.2',
                description='Model from Deepseek that harmonizes high computational efficiency with superior reasoning and agent performance. 675B parameter MoE model.',
                context_window=163840,
                prices=ModelPrice(
                    input_mtok=Decimal('0.56'), cache_read_mtok=Decimal('0.28'), output_mtok=Decimal('1.68')
                ),
            ),
            ModelInfo(
                id='deepseek-v4-flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='accounts/fireworks/models/deepseek-v4-flash'),
                        ClauseEquals(equals='accounts/fireworks/models/deepseek-v4-flash-0731'),
                    ]
                ),
                name='DeepSeek-V4-Flash',
                description='Official release of DeepSeek-V4-Flash with enhanced agentic capabilities and speculative decoding.',
                context_window=1040000,
                price_comments='Standard serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.14'), cache_read_mtok=Decimal('0.028'), output_mtok=Decimal('0.28')
                ),
            ),
            ModelInfo(
                id='deepseek-v4-pro',
                match=ClauseEquals(equals='accounts/fireworks/models/deepseek-v4-pro'),
                name='DeepSeek-V4-Pro',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.74'), cache_read_mtok=Decimal('0.145'), output_mtok=Decimal('3.48')
                ),
            ),
            ModelInfo(
                id='gemma-3-27b-it',
                match=ClauseEquals(equals='accounts/fireworks/models/gemma-3-27b-it'),
                name='Gemma 3 27B Instruct',
                context_window=131000,
                price_comments='docs give just one price - "Pricing Per 1M Tokens", we assume that\'s input and output',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='glm-4p7',
                match=ClauseEquals(equals='accounts/fireworks/models/glm-4p7'),
                name='GLM-4.7',
                description='Next-generation general-purpose model from Z.ai optimized for coding, reasoning, and agentic workflows. 352B parameter MoE model with advanced thinking controls.',
                context_window=202752,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='glm-5p1',
                match=ClauseEquals(equals='accounts/fireworks/models/glm-5p1'),
                name='GLM-5.1',
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='glm-5p1-fast',
                match=ClauseEquals(equals='accounts/fireworks/routers/glm-5p1-fast'),
                name='GLM 5.1 Fast',
                price_comments='Fast serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(
                    input_mtok=Decimal('2.8'), cache_read_mtok=Decimal('0.52'), output_mtok=Decimal('8.8')
                ),
            ),
            ModelInfo(
                id='glm-5p2',
                match=ClauseEquals(equals='accounts/fireworks/models/glm-5p2'),
                name='GLM-5.2',
                description='GLM-5.2 introduces a robust 1M-token context and advanced, multi-effort coding capabilities to significantly enhance performance on long-horizon tasks. Features a new IndexShare architecture and improved MTP layer for greater efficiency. 743B parameter MoE model from Z.ai.',
                context_window=1040000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.14'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='glm-5p2-fast',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='accounts/fireworks/routers/glm-5p2-fast'),
                        ClauseEquals(equals='accounts/fireworks/routers/glm-5p2-fast-us'),
                    ]
                ),
                name='GLM 5.2 Fast',
                context_window=1040000,
                price_comments='Fast and US-only serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(
                    input_mtok=Decimal('2.1'), cache_read_mtok=Decimal('0.21'), output_mtok=Decimal('6.6')
                ),
            ),
            ModelInfo(
                id='gpt-oss-120b',
                match=ClauseEquals(equals='accounts/fireworks/models/gpt-oss-120b'),
                name='OpenAI gpt-oss-120b',
                description="OpenAI's open-weight 117B parameter MoE model designed for production, general purpose, high reasoning use-cases. Features powerful reasoning, agentic tasks, and versatile developer use cases.",
                context_window=131072,
                price_comments='Standard serverless pricing. See https://fireworks.ai/models/fireworks/gpt-oss-120b.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.014'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='gpt-oss-20b',
                match=ClauseEquals(equals='accounts/fireworks/models/gpt-oss-20b'),
                name='OpenAI gpt-oss-20b',
                description="OpenAI's open-weight 21.5B parameter model designed for powerful reasoning, agentic tasks, and versatile developer use cases. Optimized for lower latency and local or specialized tasks.",
                context_window=131072,
                price_comments='Standard serverless pricing. See https://fireworks.ai/models/fireworks/gpt-oss-20b.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.07'), cache_read_mtok=Decimal('0.035'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='inkling',
                match=ClauseEquals(equals='accounts/fireworks/models/inkling'),
                name='Inkling',
                description="Thinking Machines Lab's open-weights multimodal Mixture-of-Experts model, trained across text, image, and audio.",
                context_window=1040000,
                price_comments='Standard serverless pricing. See https://fireworks.ai/models/fireworks/inkling.',
                prices=ModelPrice(
                    input_mtok=Decimal('1'), cache_read_mtok=Decimal('0.17'), output_mtok=Decimal('4.05')
                ),
            ),
            ModelInfo(
                id='kimi-k2p5',
                match=ClauseEquals(equals='accounts/fireworks/models/kimi-k2p5'),
                name='Kimi K2.5',
                description="Moonshot AI's flagship agentic model. Unifies vision and text, thinking and non-thinking modes, and single-agent and multi-agent execution into one model. 1T parameter MoE model.",
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='kimi-k2p6',
                match=ClauseEquals(equals='accounts/fireworks/models/kimi-k2p6'),
                name='Kimi K2.6',
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='kimi-k2p6-fast',
                match=ClauseEquals(equals='accounts/fireworks/routers/kimi-k2p6-fast'),
                name='Kimi K2.6 Fast',
                context_window=262144,
                price_comments='Fast serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='kimi-k2p7-code',
                match=ClauseEquals(equals='accounts/fireworks/models/kimi-k2p7-code'),
                name='Kimi K2.7 Code',
                description='Kimi K2.7 Code is a coding-focused agentic model built upon Kimi K2.6, delivering substantial improvements on real-world long-horizon coding tasks while reducing thinking tokens by roughly 30% compared to its predecessor.',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.19'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='kimi-k2p7-code-fast',
                match=ClauseEquals(equals='accounts/fireworks/routers/kimi-k2p7-code-fast'),
                name='Kimi K2.7 Code Fast',
                context_window=262144,
                price_comments='Fast serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(input_mtok=Decimal('1.9'), cache_read_mtok=Decimal('0.38'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='kimi-k3',
                match=ClauseEquals(equals='accounts/fireworks/models/kimi-k3'),
                name='Kimi K3',
                description="Moonshot AI's 2.81T-parameter flagship model with native visual understanding and a 1M-token context window.",
                context_window=1040000,
                price_comments='Standard serverless pricing. See https://fireworks.ai/models/fireworks/kimi-k3. Fast and US router variants have separate model IDs.',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='kimi-k3-fast',
                match=ClauseEquals(equals='accounts/fireworks/routers/kimi-k3-fast'),
                name='Kimi K3 Fast',
                context_window=1040000,
                price_comments='Fast serverless pricing. See https://docs.fireworks.ai/serverless/pricing.',
                prices=ModelPrice(
                    input_mtok=Decimal('4.5'), cache_read_mtok=Decimal('0.45'), output_mtok=Decimal('22.5')
                ),
            ),
            ModelInfo(
                id='kimi-k3-us',
                match=ClauseEquals(equals='accounts/fireworks/routers/kimi-k3-us'),
                name='Kimi K3 US',
                context_window=1040000,
                price_comments='US-only serverless pricing. See https://docs.fireworks.ai/serverless/us-only-serverless.',
                prices=ModelPrice(
                    input_mtok=Decimal('3.3'), cache_read_mtok=Decimal('0.33'), output_mtok=Decimal('16.5')
                ),
            ),
            ModelInfo(
                id='llama-v3p1-8b-instruct',
                match=ClauseEquals(equals='accounts/fireworks/models/llama-v3p1-8b-instruct'),
                name='Llama 3.1 8B Instruct',
                description='The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.',
                context_window=131000,
                price_comments='docs give just one price - "Pricing Per 1M Tokens", we assume that\'s input and output',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='llama4-maverick-instruct-basic',
                match=ClauseEquals(equals='accounts/fireworks/models/llama4-maverick-instruct-basic'),
                name='Llama 4 Maverick Instruct (Basic)',
                description='The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='minimax-m2p1',
                match=ClauseEquals(equals='accounts/fireworks/models/minimax-m2p1'),
                name='MiniMax-M2.1',
                description='Built for strong real-world performance across complex, multi-language, and agent-driven workflows. 228B parameter model with robust support for systems, backend, web, mobile, and office-style tasks.',
                context_window=204800,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='minimax-m2p7',
                match=ClauseEquals(equals='accounts/fireworks/models/minimax-m2p7'),
                name='MiniMax M2.7',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='minimax-m3',
                match=ClauseEquals(equals='accounts/fireworks/models/minimax-m3'),
                name='MiniMax M3',
                description='Multimodal foundation model from MiniMax with text, image, and video inputs, a long context window, and long-horizon agentic work.',
                context_window=524288,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='nemotron-3-ultra-nvfp4',
                match=ClauseEquals(equals='accounts/fireworks/models/nemotron-3-ultra-nvfp4'),
                name='NVIDIA Nemotron 3 Ultra NVFP4',
                description='Frontier-scale LLM from NVIDIA using a hybrid Latent Mixture-of-Experts (LatentMoE) architecture with interleaved Mamba-2 and MoE layers plus select Attention layers. Features 55B active parameters out of 550B total and Multi-Token Prediction layers for faster generation, optimized for complex multi-step agents, long-context analysis, and high-accuracy reasoning over code, math, and science.',
                context_window=262000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.12'), output_mtok=Decimal('2.4')
                ),
            ),
            ModelInfo(
                id='qwen2p5-vl-72b-instruct',
                match=ClauseEquals(equals='accounts/fireworks/models/qwen2p5-vl-72b-instruct'),
                name='Qwen2.5-VL 72B Instruct',
                description="Latest Qwen's VLM model",
                context_window=128000,
                price_comments='docs give just one price - "Pricing Per 1M Tokens", we assume that\'s input and output',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='qwen3-235b-a22b',
                match=ClauseEquals(equals='accounts/fireworks/models/qwen3-235b-a22b'),
                name='Qwen3 235B-A22B',
                description='Qwen3 is the latest evolution in the Qwen LLM series, featuring both dense and MoE models with major advancements in reasoning, agent capabilities, multilingual support, and instruction following. It uniquely allows seamless switching between "thinking" (for complex logic, math, coding) and "non-thinking" modes (for fast, general dialogue), delivering strong performance across tasks.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='qwen3p6-plus',
                match=ClauseEquals(equals='accounts/fireworks/models/qwen3p6-plus'),
                name='Qwen3.6 Plus',
                prices=ModelPrice(input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='qwen3p7-plus',
                match=ClauseEquals(equals='accounts/fireworks/models/qwen3p7-plus'),
                name='Qwen3.7 Plus',
                description="Qwen3.7 Plus is Alibaba's latest flagship closed model, available exclusively through Fireworks AI outside of Alibaba's own infrastructure.",
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.08'), output_mtok=Decimal('1.6')
                ),
            ),
        ],
    ),
    Provider(
        id='github-copilot',
        name='GitHub Copilot',
        api_pattern='https://api\\.githubcopilot\\.com',
        pricing_urls=[
            'https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing',
            'https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-individuals',
        ],
        description="OpenAI, Anthropic, Google, xAI, Moonshot AI and Microsoft models served through GitHub Copilot's OpenAI-compatible API at api.githubcopilot.com.",
        price_comments="Copilot meters token usage in AI credits, where 1 credit = $0.01; the rates recorded here are the published per-model USD rates from the models-and-pricing page. Every response also carries a `copilot_usage.token_details[].cost_per_batch` figure in nano-credits, which agreed with the published rate for each of the nine priced models reachable on the plan used to check them on 2026-09-03. Long-context tiers reprice the whole request once the prompt crosses the threshold. Not represented: embedding models and Copilot-internal agent models, which have no published rate, and `gpt-4`, which Copilot routes to GPT-4.1 and bills at a rate the pricing page does not list. Catalog membership varies by subscription and by API integrator, so this is not the union of every plan's models.",
        provider_match=ClauseContains(contains='copilot'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='claude-fable-5',
                match=ClauseEquals(equals='claude-fable-5'),
                name='Claude Fable 5',
                context_window=264000,
                price_comments='The pricing page gives cached input as a $0.25-$1.00 range; the highest rate is recorded.',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='claude-fable-5.1',
                match=ClauseEquals(equals='claude-fable-5.1'),
                name='Claude Fable 5.1',
                context_window=264000,
                price_comments='The pricing page gives cached input as a $0.25-$1.00 range; the highest rate is recorded.',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='claude-haiku-4.5',
                match=ClauseEquals(equals='claude-haiku-4.5'),
                name='Claude Haiku 4.5',
                context_window=144000,
                prices=ModelPrice(
                    input_mtok=Decimal('1'),
                    cache_write_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('5'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4.7',
                match=ClauseEquals(equals='claude-opus-4.7'),
                name='Claude Opus 4.7',
                context_window=264000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4.8',
                match=ClauseEquals(equals='claude-opus-4.8'),
                name='Claude Opus 4.8',
                context_window=264000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4.8-fast',
                match=ClauseEquals(equals='claude-opus-4.8-fast'),
                name='Claude Opus 4.8 (fast mode)',
                context_window=264000,
                price_comments='Fast mode is priced at 2x the standard Opus 4.8 rates.',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='claude-opus-5',
                match=ClauseEquals(equals='claude-opus-5'),
                name='Claude Opus 5',
                context_window=264000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-5',
                match=ClauseEquals(equals='claude-sonnet-5'),
                name='Claude Sonnet 5',
                context_window=264000,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='gemini-3.5-flash',
                match=ClauseEquals(equals='gemini-3.5-flash'),
                name='Gemini 3.5 Flash',
                context_window=264000,
                price_comments='Copilot does not charge for cache writes on the Gemini models.',
                prices=ModelPrice(input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('9')),
            ),
            ModelInfo(
                id='gemini-3.6-flash',
                match=ClauseEquals(equals='gemini-3.6-flash'),
                name='Gemini 3.6 Flash',
                context_window=264000,
                price_comments='Copilot does not charge for cache writes on the Gemini models.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                ),
            ),
            ModelInfo(
                id='gemini-3.7-flash',
                match=ClauseEquals(equals='gemini-3.7-flash'),
                name='Gemini 3.7 Flash',
                context_window=264000,
                price_comments='Copilot does not charge for cache writes on the Gemini models.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                ),
            ),
            ModelInfo(
                id='gemini-3.8-flash',
                match=ClauseEquals(equals='gemini-3.8-flash'),
                name='Gemini 3.8 Flash',
                context_window=265536,
                price_comments='Copilot does not charge for cache writes on the Gemini models.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                ),
            ),
            ModelInfo(
                id='gpt-3.5-turbo',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-3.5-turbo'), ClauseEquals(equals='gpt-3.5-turbo-0613')]),
                name='GPT 3.5 Turbo',
                context_window=16384,
                price_comments='Included in the subscription: the pricing page lists no rate, and a live request reported a zero token cost on 2026-09-03.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gpt-4.1',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-4.1'), ClauseEquals(equals='gpt-4.1-2025-04-14')]),
                name='GPT-4.1',
                context_window=128000,
                price_comments='Included in the subscription: the pricing page lists no rate, and a live request reported a zero token cost on 2026-09-03.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gpt-4o',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4o'),
                        ClauseEquals(equals='gpt-4o-2024-05-13'),
                        ClauseEquals(equals='gpt-4o-2024-08-06'),
                        ClauseEquals(equals='gpt-4o-2024-11-20'),
                        ClauseEquals(equals='gpt-4-o-preview'),
                    ]
                ),
                name='GPT-4o',
                context_window=128000,
                price_comments='Included in the subscription: the pricing page lists no rate, and a live request reported a zero token cost on 2026-09-03.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gpt-4o-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-4o-mini'), ClauseEquals(equals='gpt-4o-mini-2024-07-18')]),
                name='GPT-4o mini',
                context_window=128000,
                price_comments='Included in the subscription: the pricing page lists no rate, and a live request reported a zero token cost on 2026-09-03.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gpt-5-mini',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-5-mini'), ClauseRegex(regex='^gpt-5-mini-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-5 mini',
                context_window=264000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('2')
                ),
            ),
            ModelInfo(
                id='gpt-5.3-codex',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.3-codex'),
                        ClauseRegex(regex='^gpt-5\\.3-codex-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.3-Codex',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='gpt-5.4',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-5.4'), ClauseRegex(regex='^gpt-5\\.4-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-5.4',
                context_window=400000,
                price_comments='Prompts over 272,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=272000, price=Decimal('0.5'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=272000, price=Decimal('22.5'))]),
                ),
            ),
            ModelInfo(
                id='gpt-5.4-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.4-mini'),
                        ClauseRegex(regex='^gpt-5\\.4-mini-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.4 mini',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('4.5')
                ),
            ),
            ModelInfo(
                id='gpt-5.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-5.5'), ClauseRegex(regex='^gpt-5\\.5-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-5.5',
                context_window=400000,
                price_comments='Prompts over 272,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=272000, price=Decimal('10'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=272000, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=272000, price=Decimal('45'))]),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-luna',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.6-luna'),
                        ClauseRegex(regex='^gpt-5\\.6-luna-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.6 Luna',
                context_window=328000,
                price_comments='Prompts over 200,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=200000, price=Decimal('0.4'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=200000, price=Decimal('0.5'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.02'), tiers=[Tier(start=200000, price=Decimal('0.04'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('1.2'), tiers=[Tier(start=200000, price=Decimal('1.8'))]),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-sol',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-5.6-sol'), ClauseRegex(regex='^gpt-5\\.6-sol-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-5.6 Sol',
                context_window=400000,
                price_comments='Prompts over 272,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('4'), tiers=[Tier(start=272000, price=Decimal('8'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=272000, price=Decimal('10'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.4'), tiers=[Tier(start=272000, price=Decimal('0.8'))]),
                    output_mtok=TieredPrices(base=Decimal('20'), tiers=[Tier(start=272000, price=Decimal('30'))]),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-terra',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.6-terra'),
                        ClauseRegex(regex='^gpt-5\\.6-terra-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.6 Terra',
                context_window=400000,
                price_comments='Prompts over 272,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=272000, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('12'), tiers=[Tier(start=272000, price=Decimal('18'))]),
                ),
            ),
            ModelInfo(
                id='grok-4.5',
                match=ClauseEquals(equals='grok-4.5'),
                name='Grok 4.5',
                context_window=328000,
                price_comments='Prompts over 200,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=200000, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=200000, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('6'), tiers=[Tier(start=200000, price=Decimal('12'))]),
                ),
            ),
            ModelInfo(
                id='grok-4.6',
                match=ClauseEquals(equals='grok-4.6'),
                name='Grok 4.6',
                context_window=328000,
                price_comments='Prompts over 200,000 tokens are billed at the long-context rates.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=200000, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=200000, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('6'), tiers=[Tier(start=200000, price=Decimal('12'))]),
                ),
            ),
            ModelInfo(
                id='kimi-k2.7-code',
                match=ClauseEquals(equals='kimi-k2.7-code'),
                name='Kimi K2.7 Code',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.19'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='kimi-k3',
                match=ClauseEquals(equals='kimi-k3'),
                name='Kimi K3',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='mai-code-1-flash-picker',
                match=ClauseEquals(equals='mai-code-1-flash-picker'),
                name='MAI-Code-1-Flash',
                context_window=256000,
                price_comments='The catalog id carries a `-picker` suffix; the pricing page names it MAI-Code-1-Flash.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('4.5')
                ),
            ),
            ModelInfo(
                id='mai-code-1.1-flash',
                match=ClauseEquals(equals='mai-code-1.1-flash'),
                name='MAI-Code-1.1-Flash',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('1.2')
                ),
            ),
        ],
    ),
    Provider(
        id='google',
        name='Google',
        api_pattern='https://(.*\\.)?googleapis\\.com',
        pricing_urls=[
            'https://ai.google.dev/gemini-api/docs/pricing',
            'https://cloud.google.com/vertex-ai/generative-ai/pricing',
        ],
        model_match=ClauseContains(contains='gemini'),
        provider_match=ClauseOr(
            or_=[
                ClauseContains(contains='google'),
                ClauseContains(contains='vertex'),
                ClauseContains(contains='gemini'),
            ]
        ),
        extractors=[
            UsageExtractor(
                root='usageMetadata',
                mappings=[
                    UsageExtractorMapping(path='promptTokenCount', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cachedContentTokenCount', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(
                        path=[
                            'cacheTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='TEXT')),
                            'tokenCount',
                        ],
                        dest='cache_text_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'cacheTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='AUDIO')),
                            'tokenCount',
                        ],
                        dest='cache_audio_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'cacheTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='IMAGE')),
                            'tokenCount',
                        ],
                        dest='cache_image_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'cacheTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='DOCUMENT')),
                            'tokenCount',
                        ],
                        dest='cache_image_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'cacheTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='VIDEO')),
                            'tokenCount',
                        ],
                        dest='cache_video_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'promptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='TEXT')),
                            'tokenCount',
                        ],
                        dest='input_text_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'promptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='AUDIO')),
                            'tokenCount',
                        ],
                        dest='input_audio_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'promptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='IMAGE')),
                            'tokenCount',
                        ],
                        dest='input_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'promptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='DOCUMENT')),
                            'tokenCount',
                        ],
                        dest='input_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'promptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='VIDEO')),
                            'tokenCount',
                        ],
                        dest='input_video_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'candidatesTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='TEXT')),
                            'tokenCount',
                        ],
                        dest='output_text_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'candidatesTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='AUDIO')),
                            'tokenCount',
                        ],
                        dest='output_audio_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'candidatesTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='IMAGE')),
                            'tokenCount',
                        ],
                        dest='output_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'candidatesTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='DOCUMENT')),
                            'tokenCount',
                        ],
                        dest='output_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'candidatesTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='VIDEO')),
                            'tokenCount',
                        ],
                        dest='output_video_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='candidatesTokenCount', dest='output_tokens', required=False),
                    UsageExtractorMapping(path='thoughtsTokenCount', dest='output_tokens', required=False),
                    UsageExtractorMapping(path='thoughtsTokenCount', dest='output_reasoning_tokens', required=False),
                    UsageExtractorMapping(path='toolUsePromptTokenCount', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='toolUsePromptTokenCount', dest='input_tool_tokens', required=False),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='TEXT')),
                            'tokenCount',
                        ],
                        dest='input_text_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='TEXT')),
                            'tokenCount',
                        ],
                        dest='input_text_tool_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='AUDIO')),
                            'tokenCount',
                        ],
                        dest='input_audio_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='AUDIO')),
                            'tokenCount',
                        ],
                        dest='input_audio_tool_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='IMAGE')),
                            'tokenCount',
                        ],
                        dest='input_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='IMAGE')),
                            'tokenCount',
                        ],
                        dest='input_image_tool_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='DOCUMENT')),
                            'tokenCount',
                        ],
                        dest='input_image_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='DOCUMENT')),
                            'tokenCount',
                        ],
                        dest='input_image_tool_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='VIDEO')),
                            'tokenCount',
                        ],
                        dest='input_video_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=[
                            'toolUsePromptTokensDetails',
                            ArrayMatch(type='array-match', field='modality', match=ClauseEquals(equals='VIDEO')),
                            'tokenCount',
                        ],
                        dest='input_video_tool_tokens',
                        required=False,
                    ),
                ],
                api_flavor='default',
                model_path='modelVersion',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_creation_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path='cache_creation_input_tokens', dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='anthropic',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        fallback_model_providers=['anthropic'],
        models=[
            ModelInfo(
                id='claude-3-5-haiku',
                match=ClauseContains(contains='claude-3-5-haiku'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'),
                    cache_write_mtok=Decimal('1'),
                    cache_read_mtok=Decimal('0.08'),
                    output_mtok=Decimal('4'),
                ),
            ),
            ModelInfo(
                id='claude-3-5-sonnet',
                match=ClauseContains(contains='claude-3-5-sonnet'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='claude-3-7-sonnet',
                match=ClauseContains(contains='claude-3-7-sonnet'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='claude-3-haiku',
                match=ClauseContains(contains='claude-3-haiku'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'),
                    cache_write_mtok=Decimal('0.3'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('1.25'),
                ),
            ),
            ModelInfo(
                id='claude-3-opus',
                match=ClauseContains(contains='claude-3-opus'),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='claude-4-opus',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-4-opus'),
                        ClauseContains(contains='claude-opus-4@'),
                        ClauseContains(contains='claude-opus-4-0'),
                        ClauseContains(contains='claude-opus-4-1'),
                        ClauseEquals(equals='claude-opus-4'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='claude-4-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-4-sonnet'),
                        ClauseContains(contains='claude-sonnet-4-0'),
                        ClauseContains(contains='claude-sonnet-4@'),
                        ClauseContains(contains='claude-sonnet-4-2025'),
                        ClauseEquals(equals='claude-sonnet-4'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='claude-fable-5',
                match=ClauseOr(
                    or_=[ClauseEndsWith(ends_with='claude-fable-5'), ClauseContains(contains='claude-fable-5@')]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='claude-fable-5-1',
                match=ClauseOr(
                    or_=[ClauseEndsWith(ends_with='claude-fable-5-1'), ClauseContains(contains='claude-fable-5-1@')]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window. Global endpoint; regional and multi-region endpoints add a 10% premium. Cache hits are 0.025x base input (not the usual 0.1x), unique to Fable 5.1 and Mythos 5.1. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models Model ID ref: https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-6',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-4-6-opus'),
                        ClauseContains(contains='claude-opus-4-6'),
                        ClauseContains(contains='claude-4.6-opus'),
                        ClauseContains(contains='claude-opus-4.6'),
                    ]
                ),
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=200000, price=Decimal('10'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('6.25'), tiers=[Tier(start=200000, price=Decimal('12.5'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=200000, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('25'), tiers=[Tier(start=200000, price=Decimal('37.5'))]),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-7',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-4-7-opus'),
                        ClauseContains(contains='claude-opus-4-7'),
                        ClauseContains(contains='claude-4.7-opus'),
                        ClauseContains(contains='claude-opus-4.7'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-opus-4-8',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-4-8-opus'),
                        ClauseContains(contains='claude-opus-4-8'),
                        ClauseContains(contains='claude-4.8-opus'),
                        ClauseContains(contains='claude-opus-4.8'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-opus-5',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-5-opus'),
                        ClauseEndsWith(ends_with='claude-opus-5'),
                        ClauseContains(contains='claude-opus-5@'),
                        ClauseContains(contains='claude-5.0-opus'),
                        ClauseContains(contains='claude-opus-5.0'),
                    ]
                ),
                context_window=1000000,
                price_comments='Global endpoint pricing, flat across the full 1M context window. Multi-region and regional endpoints carry a 10% premium. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='claude-opus-5-5',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='claude-5-5-opus'),
                        ClauseEndsWith(ends_with='claude-opus-5-5'),
                        ClauseContains(contains='claude-opus-5-5@'),
                        ClauseContains(contains='claude-5.5-opus'),
                        ClauseContains(contains='claude-opus-5.5'),
                    ]
                ),
                context_window=1000000,
                price_comments="Global endpoint pricing, flat across the full 1M context window. Multi-region and regional endpoints carry a 10% premium. Google's pricing page renders client-side and could not be read when this entry was added; the rates follow Anthropic's list price, as every other Claude entry in this file does. Cache hits are 0.05x base input (not the usual 0.1x), unique to Opus 5.5. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models Anthropic ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Model ID ref: https://platform.claude.com/docs/en/models/opus-5-5/overview",
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_write_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('20'),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-4-5',
                match=ClauseOr(
                    or_=[ClauseContains(contains='claude-sonnet-4-5'), ClauseContains(contains='claude-sonnet-4.5')]
                ),
                context_window=200000,
                price_comments='Long-context rates apply above 200K input tokens. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#partner-models',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('3'), tiers=[Tier(start=200000, price=Decimal('6'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('3.75'), tiers=[Tier(start=200000, price=Decimal('7.5'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=200000, price=Decimal('0.6'))]),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=200000, price=Decimal('22.5'))]),
                ),
            ),
            ModelInfo(
                id='claude-sonnet-4-6',
                match=ClauseOr(
                    or_=[ClauseContains(contains='claude-sonnet-4-6'), ClauseContains(contains='claude-sonnet-4.6')]
                ),
                context_window=1000000,
                price_comments='Flat pricing across the full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#partner-models',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='gemini-1.0-pro-vision-001',
                match=ClauseEquals(equals='gemini-1.0-pro-vision-001'),
                name='gemini 1.0 pro vision',
                description="Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",
                context_window=32768,
                price_comments="I can't find anything about this model or it's pricing, so trusting the original source",
                prices=ModelPrice(input_mtok=Decimal('0.125'), output_mtok=Decimal('0.375')),
            ),
            ModelInfo(
                id='gemini-1.5-flash',
                match=ClauseContains(contains='gemini-1.5-flash'),
                name='gemini 1.5 flash',
                description='A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.075'), tiers=[Tier(start=128000, price=Decimal('0.15'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.01875'), tiers=[Tier(start=128000, price=Decimal('0.0375'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=128000, price=Decimal('0.6'))]),
                ),
            ),
            ModelInfo(
                id='gemini-1.5-pro',
                match=ClauseContains(contains='gemini-1.5-pro'),
                name='gemini 1.5 Pro',
                description="Google's most capable multimodal model with an extremely long context window of up to 1 million tokens. It excels at complex reasoning, long-form content processing, and multimodal understanding.",
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1.25'), tiers=[Tier(start=128000, price=Decimal('2.5'))]),
                    output_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=128000, price=Decimal('10'))]),
                ),
            ),
            ModelInfo(
                id='gemini-2.0-flash',
                match=ClauseOr(
                    or_=[
                        ClauseEndsWith(ends_with='gemini-2.0-flash'),
                        ClauseContains(contains='gemini-2.0-flash-0'),
                        ClauseContains(contains='gemini-2.0-flash-exp'),
                        ClauseContains(contains='gemini-2.0-flash-thinking'),
                        ClauseContains(contains='gemini-2.0-flash-latest'),
                    ]
                ),
                name='gemini 2.0 flash',
                description="The newest generation of Google's Gemini models, featuring improved reasoning, instruction following, and factual accuracy, with the Flash variant optimized for cost-efficiency and performance.",
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'),
                    cache_read_mtok=Decimal('0.025'),
                    output_mtok=Decimal('0.4'),
                    input_audio_mtok=Decimal('0.7'),
                    cache_audio_read_mtok=Decimal('0.175'),
                ),
            ),
            ModelInfo(
                id='gemini-2.0-flash-lite',
                match=ClauseContains(contains='gemini-2.0-flash-lite'),
                name='gemini 2.0 flash lite',
                description='A lighter, more cost-effective version of Gemini 2.0 Flash, designed for applications requiring high efficiency while maintaining good performance. Ideal for high-volume, cost-sensitive deployments.',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='gemini-2.5-flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-2.5-flash'),
                        ClauseEquals(equals='gemini-2.5-flash-latest'),
                        ClauseEquals(equals='gemini-2.5-flash-preview-09-2025'),
                    ]
                ),
                name='Gemini 2.5 Flash',
                description='Gemini 2.5 Flash is Google\'s state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('2.5'),
                    input_audio_mtok=Decimal('1'),
                    cache_audio_read_mtok=Decimal('0.1'),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-flash-image',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-2.5-flash-image'),
                        ClauseEquals(equals='gemini-2.5-flash-image-preview'),
                    ]
                ),
                name='Gemini 2.5 Flash Image',
                description="Google's specialized image generation model optimized for fast, high-quality image generation. Outputs images at 1024x1024 resolution, with each image consuming 1290 output tokens.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-flash-image. Image output is priced at $30 per 1M tokens, with each 1024x1024 image = 1290 tokens = $0.039/image. Cache pricing is not available for this model. Text output uses the Gemini 2.5 Flash $2.50 rate and is the aggregate remainder when modality details omit text.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), output_mtok=Decimal('2.5'), output_image_mtok=Decimal('30')
                ),
            ),
            ModelInfo(
                id='gemini-2.5-flash-lite',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-2.5-flash-lite'),
                        ClauseAnd(
                            and_=[
                                ClauseStartsWith(starts_with='gemini-2.5-flash-lite-preview'),
                                ClauseRegex(regex='^(?!.*-[tT][tT][sS](?:$|-))'),
                            ]
                        ),
                    ]
                ),
                name='Gemini 2.5 Flash Lite',
                description='Gemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance across common benchmarks compared to earlier Flash models. By default, "thinking" (i.e. multi-pass reasoning) is disabled to prioritize speed, but developers can enable it via the Reasoning API parameter to selectively trade off cost for intelligence.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'),
                    cache_read_mtok=Decimal('0.01'),
                    output_mtok=Decimal('0.4'),
                    input_audio_mtok=Decimal('0.3'),
                    cache_audio_read_mtok=Decimal('0.03'),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-flash-lite-preview-tts',
                match=ClauseEquals(equals='gemini-2.5-flash-lite-preview-tts'),
                name='Gemini 2.5 Flash-Lite Preview TTS',
                context_window=8192,
                price_comments='See https://cloud.google.com/text-to-speech/pricing#gemini-tts.',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='gemini-2.5-flash-preview',
                match=ClauseOr(
                    or_=[
                        ClauseContains(contains='gemini-2.5-flash-preview-05-20'),
                        ClauseContains(contains='gemini-2.5-flash-preview-04-17'),
                        ClauseEquals(equals='gemini-2.5-flash-preview-05-20:thinking'),
                        ClauseEquals(equals='gemini-2.5-flash-preview'),
                        ClauseEquals(equals='gemini-2.5-flash-preview:thinking'),
                    ]
                ),
                name='Gemini 2.5 Flash Preview 05-20',
                description='Gemini 2.5 Flash May 20th Checkpoint is Google\'s state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.',
                price_comments='from https://cloud.google.com/vertex-ai/generative-ai/pricing should be retired 2025-07-15',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='gemini-2.5-flash-tts',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-2.5-flash-tts'),
                        ClauseEquals(equals='gemini-2.5-flash-preview-tts'),
                    ]
                ),
                name='Gemini 2.5 Flash TTS',
                context_window=8192,
                price_comments='See https://cloud.google.com/text-to-speech/pricing#gemini-tts.',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='gemini-2.5-pro',
                match=ClauseAnd(
                    and_=[
                        ClauseStartsWith(starts_with='gemini-2.5-pro'),
                        ClauseRegex(regex='^(?!.*-[tT][tT][sS](?:$|-))'),
                    ]
                ),
                name='Gemini 2.5 Pro',
                description='Gemini 2.5 Pro is Google\'s state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs "thinking" capabilities, enabling it to reason through responses with enhanced accuracy and nuanced context handling. Gemini 2.5 Pro achieves top-tier performance on multiple benchmarks, including first-place positioning on the LMArena leaderboard, reflecting superior human-preference alignment and complex problem-solving abilities.',
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1.25'), tiers=[Tier(start=200000, price=Decimal('2.5'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.125'), tiers=[Tier(start=200000, price=Decimal('0.25'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('10'), tiers=[Tier(start=200000, price=Decimal('15'))]),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-pro-tts',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gemini-2.5-pro-tts'), ClauseEquals(equals='gemini-2.5-pro-preview-tts')]
                ),
                name='Gemini 2.5 Pro TTS',
                context_window=8192,
                price_comments='See https://cloud.google.com/text-to-speech/pricing#gemini-tts.',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='gemini-3-flash-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-3-flash-preview'),
                        ClauseStartsWith(starts_with='gemini-3-flash-preview-'),
                    ]
                ),
                name='Gemini 3 Flash Preview',
                description="Google's ultra-fast frontier model optimized for speed and efficiency. Delivers state-of-the-art performance while maintaining low latency and cost, with improved reasoning and coding capabilities.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard pricing shown; Batch API offers 50% discount on input/output.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'),
                    cache_read_mtok=Decimal('0.05'),
                    output_mtok=Decimal('3'),
                    input_audio_mtok=Decimal('1'),
                    cache_audio_read_mtok=Decimal('0.1'),
                ),
            ),
            ModelInfo(
                id='gemini-3-pro-image-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-3-pro-image'),
                        ClauseStartsWith(starts_with='gemini-3-pro-image-preview'),
                    ]
                ),
                name='Gemini 3 Pro Image Preview',
                description="Google's image generation model optimized for high-quality image generation. Supports 1K/2K and 4K resolution outputs with flexible pricing based on image dimensions.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-3-pro-image. Image output is priced at $120 per 1M tokens, with each 1K/2K image = 1120 tokens = $0.134/image and each 4K image = 2000 tokens = $0.24/image. Text and thinking output is $12 per 1M tokens and is the aggregate remainder when modality details omit text.',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('12'), output_image_mtok=Decimal('120')),
            ),
            ModelInfo(
                id='gemini-3-pro-preview',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='gemini-3-pro-preview'),
                        ClauseEquals(equals='gemini-3-pro-text-preview'),
                    ]
                ),
                name='Gemini 3 Pro Preview',
                description='The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=200000, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=200000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('12'), tiers=[Tier(start=200000, price=Decimal('18'))]),
                ),
            ),
            ModelInfo(
                id='gemini-3.1-flash-image-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-3.1-flash-image'),
                        ClauseStartsWith(starts_with='gemini-3.1-flash-image-preview'),
                    ]
                ),
                name='Gemini 3.1 Flash Image Preview',
                description="Google's latest image generation model (Nano Banana 2) optimized for fast, high-quality image generation. Supports multiple output resolutions from 512px to 4K, with text and thinking output priced separately from image output tokens.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Text and thinking output is priced at $3 per 1M tokens and is the aggregate remainder when modality details omit text. Image output is priced at $60 per 1M tokens. Preview model - pricing may change.',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('3'), output_image_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='gemini-3.1-flash-lite',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-3.1-flash-lite'),
                        ClauseStartsWith(starts_with='gemini-3.1-flash-lite-preview'),
                    ]
                ),
                name='Gemini 3.1 Flash Lite',
                description="Google's fastest and most cost-efficient Gemini 3 series model, built for intelligence at scale. Optimized for high-volume, low-latency applications while maintaining strong multimodal capabilities.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'),
                    cache_read_mtok=Decimal('0.025'),
                    output_mtok=Decimal('1.5'),
                    input_audio_mtok=Decimal('0.5'),
                    cache_audio_read_mtok=Decimal('0.05'),
                ),
            ),
            ModelInfo(
                id='gemini-3.1-flash-lite-image',
                match=ClauseStartsWith(starts_with='gemini-3.1-flash-lite-image'),
                name='Gemini 3.1 Flash Lite Image',
                description="Google's low-latency, cost-efficient image generation and editing model.",
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-3.1-flash-lite-image.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), output_mtok=Decimal('1.5'), output_image_mtok=Decimal('30')
                ),
            ),
            ModelInfo(
                id='gemini-3.1-flash-live-preview',
                match=ClauseStartsWith(starts_with='gemini-3.1-flash-live-preview'),
                name='Gemini 3.1 Flash Live Preview',
                description="Google's low-latency audio-to-audio model with multimodal input support.",
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-3.1-flash-live-preview.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'),
                    output_mtok=Decimal('4.5'),
                    input_audio_mtok=Decimal('3'),
                    output_audio_mtok=Decimal('12'),
                    input_image_mtok=Decimal('1'),
                    input_video_mtok=Decimal('1'),
                ),
            ),
            ModelInfo(
                id='gemini-3.1-pro-preview',
                match=ClauseStartsWith(starts_with='gemini-3.1-pro-preview'),
                name='Gemini 3.1 Pro Preview',
                description='The latest performance, intelligence, and usability improvements to the best model family in the world for multimodal understanding, agentic capabilities, and vibe-coding.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=200000, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=200000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('12'), tiers=[Tier(start=200000, price=Decimal('18'))]),
                ),
            ),
            ModelInfo(
                id='gemini-3.5-flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-3.5-flash'),
                        ClauseStartsWith(starts_with='gemini-3.5-flash-preview'),
                        ClauseRegex(regex='^gemini-3\\.5-flash-\\d'),
                    ]
                ),
                name='Gemini 3.5 Flash',
                description="Google's most intelligent model built for speed, combining frontier intelligence with improved reasoning, coding, and multimodal understanding.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount on input/output.',
                prices=ModelPrice(input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('9')),
            ),
            ModelInfo(
                id='gemini-3.5-flash-lite',
                match=ClauseStartsWith(starts_with='gemini-3.5-flash-lite'),
                name='Gemini 3.5 Flash Lite',
                description="Google's fastest and most cost-efficient Gemini 3.5 series model, optimized for high-volume, low-latency applications while maintaining strong multimodal capabilities.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount. Input rate is unified across text/image/video/audio (no separate audio rate).',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='gemini-3.6-flash',
                match=ClauseStartsWith(starts_with='gemini-3.6-flash'),
                name='Gemini 3.6 Flash',
                description="Google's most intelligent model built for speed, combining frontier intelligence with improved reasoning, coding, and multimodal understanding.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount. No separate audio input rate documented. Introductory rates apply through 2026-12-31. The cache storage price ($0.50 per 1M tokens per hour) has no unit in prices/units.yml and is not represented here.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2027, 1, 1)),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('7.5')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gemini-3.7-flash',
                match=ClauseStartsWith(starts_with='gemini-3.7-flash'),
                name='Gemini 3.7 Flash',
                description="Google's most capable Flash model, built for complex coding, web development, agentic workflows and reliable multi-step execution.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount, Priority tier is 1.8x. Introductory rates apply through 2026-12-31. The cache storage price ($0.50 per 1M tokens per hour) has no unit in prices/units.yml and is not represented here.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2027, 1, 1)),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('7.5')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gemini-3.8-flash',
                match=ClauseStartsWith(starts_with='gemini-3.8-flash'),
                name='Gemini 3.8 Flash',
                description="Google's most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows.",
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount, Priority tier is 1.8x. Introductory rates apply through 2026-12-31. The cache storage price ($0.50 per 1M tokens per hour) has no unit in prices/units.yml and is not represented here.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('3.75')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2027, 1, 1)),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('7.5')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gemini-embedding-001',
                match=ClauseEquals(equals='gemini-embedding-001'),
                prices=ModelPrice(input_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='gemini-embedding-2',
                match=ClauseEquals(equals='gemini-embedding-2'),
                name='Gemini Embedding 2',
                description="Google's multimodal embedding model for text, images, audio, video, and documents.",
                context_window=8192,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-embedding-2.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'),
                    input_audio_mtok=Decimal('6.5'),
                    input_image_mtok=Decimal('0.45'),
                    input_video_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='gemini-flash-1.5',
                match=ClauseEquals(equals='gemini-flash-1.5'),
                name='Gemini 1.5 Flash',
                description="Gemini 1.5 Flash is a foundation model that performs well at a variety of multimodal tasks such as visual understanding, classification, summarization, and creating content from image, audio and video. It's adept at processing visual and text inputs such as photographs, documents, infographics, and screenshots.",
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.075'), tiers=[Tier(start=128000, price=Decimal('0.15'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.01875'), tiers=[Tier(start=128000, price=Decimal('0.0375'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=128000, price=Decimal('0.6'))]),
                ),
            ),
            ModelInfo(
                id='gemini-flash-1.5-8b',
                match=ClauseEquals(equals='gemini-flash-1.5-8b'),
                name='gemini 1.5 flash',
                description='A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.',
                context_window=1000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash-8b',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.0375'), tiers=[Tier(start=128000, price=Decimal('0.075'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.01'), tiers=[Tier(start=128000, price=Decimal('0.02'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.15'), tiers=[Tier(start=128000, price=Decimal('0.3'))]),
                ),
            ),
            ModelInfo(
                id='gemini-live-2.5-flash',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='gemini-live-2.5-flash'),
                        ClauseStartsWith(starts_with='gemini-2.5-flash-native-audio-preview'),
                        ClauseEquals(equals='gemini-2.5-flash-native-audio-latest'),
                    ]
                ),
                name='Gemini Live 2.5 Flash',
                description="Google's Live API model for low-latency bidirectional voice and video interactions, GA on Vertex AI (model id `gemini-live-2.5-flash`, served from the `global` location). The prefix match also covers the AI Studio preview ids (`gemini-live-2.5-flash-preview*`).",
                price_comments='See https://cloud.google.com/vertex-ai/generative-ai/pricing (Live API) and https://ai.google.dev/gemini-api/docs/pricing - GA pricing matches the preview.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'),
                    output_mtok=Decimal('2'),
                    input_audio_mtok=Decimal('3'),
                    output_audio_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='gemini-omni-flash-preview',
                match=ClauseStartsWith(starts_with='gemini-omni-flash-preview'),
                name='Gemini Omni Flash Preview',
                description="Google's video generation and editing model with multimodal input.",
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-omni-flash-preview.',
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'), output_mtok=Decimal('9'), output_video_mtok=Decimal('17.5')
                ),
            ),
            ModelInfo(
                id='gemini-pro',
                match=ClauseOr(or_=[ClauseEquals(equals='gemini-pro'), ClauseEquals(equals='gemini-1.0-pro')]),
                name='gemini 1.0 pro',
                description="Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",
                context_window=32768,
                price_comments="I can't find anything so trusting these prices, not sure the model still exists",
                prices=ModelPrice(input_mtok=Decimal('0.125'), output_mtok=Decimal('0.375')),
            ),
            ModelInfo(
                id='gemini-pro-1.5',
                match=ClauseEquals(equals='gemini-pro-1.5'),
                name='Gemini 1.5 Pro',
                description="Google's latest multimodal model, supports image and video[0] in text or chat prompts.",
                context_window=2000000,
                price_comments='See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-pro',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1.25'), tiers=[Tier(start=128000, price=Decimal('2.5'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.3125'), tiers=[Tier(start=128000, price=Decimal('0.625'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=128000, price=Decimal('10'))]),
                ),
            ),
            ModelInfo(
                id='gemma-2-27b-it',
                match=ClauseEquals(equals='gemma-2-27b-it'),
                name='Gemma 2 27B',
                description='Gemma 2 27B by Google is an open model built from the same research and technology used to create the Gemini models. Gemma models are well-suited for a variety of text generation and instruction-following tasks.',
                price_comments='Imported from OpenRouter pricing; verify against Google pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.65'), output_mtok=Decimal('0.65')),
            ),
            ModelInfo(
                id='gemma-3',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='gemma-3-'), ClauseEquals(equals='gemma-3')]),
                name='Gemma 3 (free)',
                description='Lightweight, state-of the art, open model built from the same technology that powers our Gemini models.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-3n',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='gemma-3n')]),
                name='Gemma 3n (free)',
                description='Our open model built for efficient performance on everyday devices like mobile phones, laptops, and tablets.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-4-26b-a4b-it',
                match=ClauseEquals(equals='gemma-4-26b-a4b-it'),
                name='Gemma 4 26B A4B',
                description='Gemma 4 26B A4B IT is an instruction-tuned Mixture-of-Experts (MoE) model from Google DeepMind. Despite 25.2B total parameters, only 3.8B activate per token during inference.',
                context_window=262144,
                price_comments='Gemini API model ID. Free of charge on the Gemini API with no paid tier, see https://ai.google.dev/gemini-api/docs/pricing. The Vertex AI Model-as-a-Service offering uses the gemma-4-26b-a4b-it-maas ID and is priced separately. The previous rates were imported from OpenRouter, not Google.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-4-26b-a4b-it-maas',
                match=ClauseEquals(equals='gemma-4-26b-a4b-it-maas'),
                name='Gemma 4 26B A4B (Vertex AI MaaS)',
                description='Gemma 4 26B A4B IT served by Vertex AI as a managed Model-as-a-Service endpoint.',
                context_window=262144,
                price_comments='Vertex AI Model-as-a-Service rates, see https://cloud.google.com/vertex-ai/generative-ai/pricing. Model ID from https://cloud.google.com/vertex-ai/generative-ai/docs/maas/use-open-models.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='gemma-4-31b-it',
                match=ClauseEquals(equals='gemma-4-31b-it'),
                name='Gemma 4 31B',
                description="Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. It features a 256K token context window, configurable thinking/reasoning mode, and native function calling.",
                context_window=262144,
                price_comments='Free of charge on the Gemini API with no paid tier, see https://ai.google.dev/gemini-api/docs/pricing. Not offered as Model-as-a-Service on Vertex AI (only Gemma 4 26B is); there it is self-deployed from Model Garden and billed as endpoint compute, so no per-token price applies. The previous rates were imported from OpenRouter, not Google.',
                prices=ModelPrice(),
            ),
        ],
    ),
    Provider(
        id='groq',
        name='Groq',
        api_pattern='https://api\\.groq\\.com',
        pricing_urls=['https://console.groq.com/docs/models'],
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                ],
                api_flavor='default',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='deepseek-r1-distill-llama-70b',
                match=ClauseEquals(equals='deepseek-r1-distill-llama-70b'),
                name='DeepSeek R1 Distill Llama 70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.75'), output_mtok=Decimal('0.99')),
            ),
            ModelInfo(
                id='gemma-7b-it',
                match=ClauseEquals(equals='gemma-7b-it'),
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.07')),
            ),
            ModelInfo(
                id='gemma2-9b-it',
                match=ClauseOr(or_=[ClauseEquals(equals='gemma2-9b-it'), ClauseEquals(equals='gemma2-9b')]),
                name='Gemma 2 9B 8k',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='llama-3.1-405b-reasoning',
                match=ClauseEquals(equals='llama-3.1-405b-reasoning'),
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='llama-3.1-70b-versatile',
                match=ClauseEquals(equals='llama-3.1-70b-versatile'),
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='llama-3.1-8b-instant',
                match=ClauseEquals(equals='llama-3.1-8b-instant'),
                name='Llama 3.1 8B Instant 128k',
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.08')),
            ),
            ModelInfo(
                id='llama-3.2-11b-text-preview',
                match=ClauseEquals(equals='llama-3.2-11b-text-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='llama-3.2-11b-vision-preview',
                match=ClauseEquals(equals='llama-3.2-11b-vision-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='llama-3.2-1b-preview',
                match=ClauseEquals(equals='llama-3.2-1b-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='llama-3.2-3b-preview',
                match=ClauseEquals(equals='llama-3.2-3b-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='llama-3.2-90b-text-preview',
                match=ClauseEquals(equals='llama-3.2-90b-text-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='llama-3.2-90b-vision-preview',
                match=ClauseEquals(equals='llama-3.2-90b-vision-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='llama-3.3-70b-specdec',
                match=ClauseEquals(equals='llama-3.3-70b-specdec'),
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.99')),
            ),
            ModelInfo(
                id='llama-3.3-70b-versatile',
                match=ClauseEquals(equals='llama-3.3-70b-versatile'),
                name='Llama 3.3 70B Versatile 128k',
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='llama-guard-3-8b',
                match=ClauseEquals(equals='llama-guard-3-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='llama2-70b-4096',
                match=ClauseEquals(equals='llama2-70b-4096'),
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='llama3-70b-8192',
                match=ClauseEquals(equals='llama3-70b-8192'),
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='llama3-8b-8192',
                match=ClauseEquals(equals='llama3-8b-8192'),
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.08')),
            ),
            ModelInfo(
                id='llama3-groq-70b-8192-tool-use-preview',
                match=ClauseEquals(equals='llama3-groq-70b-8192-tool-use-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.89'), output_mtok=Decimal('0.89')),
            ),
            ModelInfo(
                id='llama3-groq-8b-8192-tool-use-preview',
                match=ClauseEquals(equals='llama3-groq-8b-8192-tool-use-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.19'), output_mtok=Decimal('0.19')),
            ),
            ModelInfo(
                id='meta-llama/llama-4-maverick-17b-128e-instruct',
                match=ClauseEquals(equals='meta-llama/llama-4-maverick-17b-128e-instruct'),
                name='Llama 4 Maverick 17B 128E',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='meta-llama/llama-4-scout-17b-16e-instruct',
                match=ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct'),
                name='Llama 4 Scout (17Bx16E) 128k',
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.34')),
            ),
            ModelInfo(
                id='meta-llama/llama-guard-4-12b',
                match=ClauseEquals(equals='meta-llama/llama-guard-4-12b'),
                name='Llama Guard 4 12B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistral-saba-24b',
                match=ClauseEquals(equals='mistral-saba-24b'),
                prices=ModelPrice(input_mtok=Decimal('0.79'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='mixtral-8x7b-32768',
                match=ClauseEquals(equals='mixtral-8x7b-32768'),
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct'),
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct-0905'),
                    ]
                ),
                name='Kimi K2 1T 128k',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('1'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-oss-120b'),
                        ClauseEquals(equals='openai/gpt-oss-safeguard-20b'),
                    ]
                ),
                description="GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with\n120 billion parameters and 128 experts.\n",
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseEquals(equals='openai/gpt-oss-20b'),
                description="GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with\n20 billion parameters and 32 experts.\n",
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.0375'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3-32b',
                match=ClauseEquals(equals='qwen/qwen3-32b'),
                name='Qwen3 32B 131k',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.29'), output_mtok=Decimal('0.59')),
            ),
            ModelInfo(
                id='whisper-large-v3',
                match=ClauseEquals(equals='whisper-large-v3'),
                name='Whisper Large V3',
                price_comments='See https://console.groq.com/docs/model/whisper-large-v3.',
                prices=ModelPrice(audio_hours=Decimal('0.111'), input_audio_hours=Decimal('0.111')),
            ),
            ModelInfo(
                id='whisper-large-v3-turbo',
                match=ClauseEquals(equals='whisper-large-v3-turbo'),
                name='Whisper Large V3 Turbo',
                price_comments='See https://console.groq.com/docs/model/whisper-large-v3-turbo.',
                prices=ModelPrice(audio_hours=Decimal('0.04'), input_audio_hours=Decimal('0.04')),
            ),
        ],
    ),
    Provider(
        id='huggingface_cerebras',
        name='HuggingFace (cerebras)',
        api_pattern='https://router\\.huggingface\\.co/cerebras',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='cerebras')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            )
        ],
    ),
    Provider(
        id='huggingface_fireworks-ai',
        name='HuggingFace (fireworks-ai)',
        api_pattern='https://router\\.huggingface\\.co/fireworks-ai',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(
            and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='fireworks-ai')]
        ),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_groq',
        name='HuggingFace (groq)',
        api_pattern='https://router\\.huggingface\\.co/groq',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='groq')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.29'), output_mtok=Decimal('0.59')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.59'), output_mtok=Decimal('0.79')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Scout-17B-16E-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct'),
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct-fast'),
                    ]
                ),
                name='Llama-4-Scout-17B-16E-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.34')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.5')),
            ),
        ],
    ),
    Provider(
        id='huggingface_hyperbolic',
        name='HuggingFace (hyperbolic)',
        api_pattern='https://router\\.huggingface\\.co/hyperbolic',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='hyperbolic')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/Qwen2.5-VL-72B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-VL-72B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-VL-7B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-vl-7b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-vl-7b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-VL-7B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Instruct-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-480B-A35B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Coder-480B-A35B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Next-80B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Next-80B-A3B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Next-80B-A3B-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking-fast'),
                    ]
                ),
                name='Qwen3-Next-80B-A3B-Thinking',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-fast'),
                    ]
                ),
                name='DeepSeek-R1',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-0528',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528-fast'),
                    ]
                ),
                name='DeepSeek-R1-0528',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3-0324',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324-fast'),
                    ]
                ),
                name='DeepSeek-V3-0324',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
        ],
    ),
    Provider(
        id='huggingface_nebius',
        name='HuggingFace (nebius)',
        api_pattern='https://router\\.huggingface\\.co/nebius',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='nebius')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='NousResearch/Hermes-4-405B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='nousresearch/hermes-4-405b'),
                        ClauseEquals(equals='nousresearch/hermes-4-405b-fast'),
                    ]
                ),
                name='Hermes-4-405B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='NousResearch/Hermes-4-70B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='nousresearch/hermes-4-70b'),
                        ClauseEquals(equals='nousresearch/hermes-4-70b-fast'),
                    ]
                ),
                name='Hermes-4-70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='PrimeIntellect/INTELLECT-3-FP8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='primeintellect/intellect-3-fp8'),
                        ClauseEquals(equals='primeintellect/intellect-3-fp8-fast'),
                    ]
                ),
                name='INTELLECT-3-FP8',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-Coder-7B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-coder-7b'),
                        ClauseEquals(equals='qwen/qwen2.5-coder-7b-fast'),
                    ]
                ),
                name='Qwen2.5-Coder-7B',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.09')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-VL-72B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-VL-72B-Instruct',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Instruct-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Thinking-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-thinking-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-thinking-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Thinking-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-30B-A3B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-30b-a3b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-30b-a3b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-30B-A3B-Instruct-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-30B-A3B-Thinking-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-30b-a3b-thinking-2507'),
                        ClauseEquals(equals='qwen/qwen3-30b-a3b-thinking-2507-fast'),
                    ]
                ),
                name='Qwen3-30B-A3B-Thinking-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-30B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-30b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-30b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Coder-30B-A3B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-480B-A35B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Coder-480B-A35B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-0528',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528-fast'),
                    ]
                ),
                name='DeepSeek-R1-0528',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3-0324',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324-fast'),
                    ]
                ),
                name='DeepSeek-V3-0324',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.75'), output_mtok=Decimal('2.25')),
            ),
            ModelInfo(
                id='google/gemma-2-2b-it',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='google/gemma-2-2b-it'), ClauseEquals(equals='google/gemma-2-2b-it-fast')]
                ),
                name='gemma-2-2b-it',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='google/gemma-2-9b-it',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='google/gemma-2-9b-it'), ClauseEquals(equals='google/gemma-2-9b-it-fast')]
                ),
                name='gemma-2-9b-it',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.09')),
            ),
            ModelInfo(
                id='google/gemma-3-27b-it',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemma-3-27b-it'),
                        ClauseEquals(equals='google/gemma-3-27b-it-fast'),
                    ]
                ),
                name='gemma-3-27b-it',
                context_window=110000,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.09')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct'),
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct-fast'),
                    ]
                ),
                name='Kimi-K2-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-thinking'),
                        ClauseEquals(equals='moonshotai/kimi-k2-thinking-fast'),
                    ]
                ),
                name='Kimi-K2-Thinking',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='nvidia/Llama-3_1-Nemotron-Ultra-253B-v1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='nvidia/llama-3_1-nemotron-ultra-253b-v1'),
                        ClauseEquals(equals='nvidia/llama-3_1-nemotron-ultra-253b-v1-fast'),
                    ]
                ),
                name='Llama-3_1-Nemotron-Ultra-253B-v1',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='nvidia/NVIDIA-Nemotron-Nano-12B-v2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='nvidia/nvidia-nemotron-nano-12b-v2'),
                        ClauseEquals(equals='nvidia/nvidia-nemotron-nano-12b-v2-fast'),
                    ]
                ),
                name='NVIDIA-Nemotron-Nano-12B-v2',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.5'), ClauseEquals(equals='zai-org/glm-4.5-fast')]
                ),
                name='GLM-4.5',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5-Air',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.5-air'), ClauseEquals(equals='zai-org/glm-4.5-air-fast')]
                ),
                name='GLM-4.5-Air',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_novita',
        name='HuggingFace (novita)',
        api_pattern='https://router\\.huggingface\\.co/novita',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='novita')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='MiniMaxAI/MiniMax-M1-80k',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='minimaxai/minimax-m1-80k'),
                        ClauseEquals(equals='minimaxai/minimax-m1-80k-fast'),
                    ]
                ),
                name='MiniMax-M1-80k',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.55'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='MiniMaxAI/MiniMax-M2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='minimaxai/minimax-m2'),
                        ClauseEquals(equals='minimaxai/minimax-m2-fast'),
                        ClauseEquals(equals='minimaxai/minimax-m2.1'),
                        ClauseEquals(equals='minimaxai/minimax-m2.1-fast'),
                        ClauseEquals(equals='minimaxai/minimax-m2.5'),
                        ClauseEquals(equals='minimaxai/minimax-m2.5-fast'),
                    ]
                ),
                name='MiniMax-M2',
                context_window=204800,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='NousResearch/Hermes-2-Pro-Llama-3-8B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='nousresearch/hermes-2-pro-llama-3-8b'),
                        ClauseEquals(equals='nousresearch/hermes-2-pro-llama-3-8b-fast'),
                    ]
                ),
                name='Hermes-2-Pro-Llama-3-8B',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-72B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-72b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-72b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-72B-Instruct',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.38'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3-235b-a22b'), ClauseEquals(equals='qwen/qwen3-235b-a22b-fast')]
                ),
                name='Qwen3-235B-A22B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Instruct-2507',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.58')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Thinking-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-thinking-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-thinking-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Thinking-2507',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-30B-A3B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3-30b-a3b'), ClauseEquals(equals='qwen/qwen3-30b-a3b-fast')]
                ),
                name='Qwen3-30B-A3B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-480B-A35B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Coder-480B-A35B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-Next',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-next'),
                        ClauseEquals(equals='qwen/qwen3-coder-next-fast'),
                    ]
                ),
                name='Qwen3-Coder-Next',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Next-80B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Next-80B-A3B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Next-80B-A3B-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking-fast'),
                    ]
                ),
                name='Qwen3-Next-80B-A3B-Thinking',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-235B-A22B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-instruct-fast'),
                    ]
                ),
                name='Qwen3-VL-235B-A22B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-235B-A22B-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-thinking'),
                        ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-thinking-fast'),
                    ]
                ),
                name='Qwen3-VL-235B-A22B-Thinking',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.98'), output_mtok=Decimal('3.95')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-30B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-VL-30B-A3B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-30B-A3B-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-thinking'),
                        ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-thinking-fast'),
                    ]
                ),
                name='Qwen3-VL-30B-A3B-Thinking',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-8b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-vl-8b-instruct-fast'),
                    ]
                ),
                name='Qwen3-VL-8B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-122B-A10B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-122b-a10b'),
                        ClauseEquals(equals='qwen/qwen3.5-122b-a10b-fast'),
                    ]
                ),
                name='Qwen3.5-122B-A10B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('3.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-27B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.5-27b'), ClauseEquals(equals='qwen/qwen3.5-27b-fast')]
                ),
                name='Qwen3.5-27B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-35B-A3B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.5-35b-a3b'), ClauseEquals(equals='qwen/qwen3.5-35b-a3b-fast')]
                ),
                name='Qwen3.5-35B-A3B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-397B-A17B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b'),
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b-fast'),
                    ]
                ),
                name='Qwen3.5-397B-A17B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('3.6')),
            ),
            ModelInfo(
                id='Sao10K/L3-70B-Euryale-v2.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='sao10k/l3-70b-euryale-v2.1'),
                        ClauseEquals(equals='sao10k/l3-70b-euryale-v2.1-fast'),
                    ]
                ),
                name='L3-70B-Euryale-v2.1',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('1.48'), output_mtok=Decimal('1.48')),
            ),
            ModelInfo(
                id='Sao10K/L3-8B-Lunaris-v1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='sao10k/l3-8b-lunaris-v1'),
                        ClauseEquals(equals='sao10k/l3-8b-lunaris-v1-fast'),
                    ]
                ),
                name='L3-8B-Lunaris-v1',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='Sao10K/L3-8B-Stheno-v3.2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='sao10k/l3-8b-stheno-v3.2'),
                        ClauseEquals(equals='sao10k/l3-8b-stheno-v3.2-fast'),
                    ]
                ),
                name='L3-8B-Stheno-v3.2',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='XiaomiMiMo/MiMo-V2-Flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='xiaomimimo/mimo-v2-flash'),
                        ClauseEquals(equals='xiaomimimo/mimo-v2-flash-fast'),
                    ]
                ),
                name='MiMo-V2-Flash',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='alpindale/WizardLM-2-8x22B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='alpindale/wizardlm-2-8x22b'),
                        ClauseEquals(equals='alpindale/wizardlm-2-8x22b-fast'),
                    ]
                ),
                name='WizardLM-2-8x22B',
                context_window=65535,
                prices=ModelPrice(input_mtok=Decimal('0.62'), output_mtok=Decimal('0.62')),
            ),
            ModelInfo(
                id='baidu/ERNIE-4.5-21B-A3B-PT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='baidu/ernie-4.5-21b-a3b-pt'),
                        ClauseEquals(equals='baidu/ernie-4.5-21b-a3b-pt-fast'),
                    ]
                ),
                name='ERNIE-4.5-21B-A3B-PT',
                context_window=120000,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.28')),
            ),
            ModelInfo(
                id='baidu/ERNIE-4.5-300B-A47B-Base-PT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='baidu/ernie-4.5-300b-a47b-base-pt'),
                        ClauseEquals(equals='baidu/ernie-4.5-300b-a47b-base-pt-fast'),
                    ]
                ),
                name='ERNIE-4.5-300B-A47B-Base-PT',
                context_window=123000,
                prices=ModelPrice(input_mtok=Decimal('0.28'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='baidu/ERNIE-4.5-VL-28B-A3B-PT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='baidu/ernie-4.5-vl-28b-a3b-pt'),
                        ClauseEquals(equals='baidu/ernie-4.5-vl-28b-a3b-pt-fast'),
                    ]
                ),
                name='ERNIE-4.5-VL-28B-A3B-PT',
                context_window=30000,
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.56')),
            ),
            ModelInfo(
                id='baidu/ERNIE-4.5-VL-424B-A47B-Base-PT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='baidu/ernie-4.5-vl-424b-a47b-base-pt'),
                        ClauseEquals(equals='baidu/ernie-4.5-vl-424b-a47b-base-pt-fast'),
                    ]
                ),
                name='ERNIE-4.5-VL-424B-A47B-Base-PT',
                context_window=123000,
                prices=ModelPrice(input_mtok=Decimal('0.42'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-Prover-V2-671B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-prover-v2-671b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-prover-v2-671b-fast'),
                    ]
                ),
                name='DeepSeek-Prover-V2-671B',
                context_window=160000,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-fast'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528-fast'),
                    ]
                ),
                name='DeepSeek-R1',
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Llama-70B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Llama-70B',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-fast'),
                    ]
                ),
                name='DeepSeek-V3',
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('1.3')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3-0324',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324-fast'),
                    ]
                ),
                name='DeepSeek-V3-0324',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('1.12')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1-fast'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1-terminus'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1-terminus-fast'),
                    ]
                ),
                name='DeepSeek-V3.1',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3.2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.2'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.2-fast'),
                    ]
                ),
                name='DeepSeek-V3.2',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.269'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3.2-Exp',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.2-exp'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.2-exp-fast'),
                    ]
                ),
                name='DeepSeek-V3.2-Exp',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.41')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.135'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-4-maverick-17b-128e-instruct-fp8'),
                        ClauseEquals(equals='meta-llama/llama-4-maverick-17b-128e-instruct-fp8-fast'),
                    ]
                ),
                name='Llama-4-Maverick-17B-128E-Instruct-FP8',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Scout-17B-16E-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct'),
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct-fast'),
                    ]
                ),
                name='Llama-4-Scout-17B-16E-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.59')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/meta-llama-3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/meta-llama-3-70b-instruct-fast'),
                    ]
                ),
                name='Meta-Llama-3-70B-Instruct',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.51'), output_mtok=Decimal('0.74')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/meta-llama-3-8b-instruct'),
                        ClauseEquals(equals='meta-llama/meta-llama-3-8b-instruct-fast'),
                    ]
                ),
                name='Meta-Llama-3-8B-Instruct',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct'),
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct-fast'),
                    ]
                ),
                name='Kimi-K2-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.57'), output_mtok=Decimal('2.3')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2-Instruct-0905',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct-0905'),
                        ClauseEquals(equals='moonshotai/kimi-k2-instruct-0905-fast'),
                    ]
                ),
                name='Kimi-K2-Instruct-0905',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2-thinking'),
                        ClauseEquals(equals='moonshotai/kimi-k2-thinking-fast'),
                    ]
                ),
                name='Kimi-K2-Thinking',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='moonshotai/kimi-k2.5'), ClauseEquals(equals='moonshotai/kimi-k2.5-fast')]
                ),
                name='Kimi-K2.5',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='zai-org/AutoGLM-Phone-9B-Multilingual',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-org/autoglm-phone-9b-multilingual'),
                        ClauseEquals(equals='zai-org/autoglm-phone-9b-multilingual-fast'),
                    ]
                ),
                name='AutoGLM-Phone-9B-Multilingual',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.035'), output_mtok=Decimal('0.138')),
            ),
            ModelInfo(
                id='zai-org/GLM-4-32B-0414',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-org/glm-4-32b-0414'),
                        ClauseEquals(equals='zai-org/glm-4-32b-0414-fast'),
                    ]
                ),
                name='GLM-4-32B-0414',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.55'), output_mtok=Decimal('1.66')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.5'), ClauseEquals(equals='zai-org/glm-4.5-fast')]
                ),
                name='GLM-4.5',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5-Air',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.5-air'), ClauseEquals(equals='zai-org/glm-4.5-air-fast')]
                ),
                name='GLM-4.5-Air',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5V',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.5v'), ClauseEquals(equals='zai-org/glm-4.5v-fast')]
                ),
                name='GLM-4.5V',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.6',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.6'), ClauseEquals(equals='zai-org/glm-4.6-fast')]
                ),
                name='GLM-4.6',
                context_window=204800,
                prices=ModelPrice(input_mtok=Decimal('0.55'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.6V-Flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-org/glm-4.6v-flash'),
                        ClauseEquals(equals='zai-org/glm-4.6v-flash-fast'),
                    ]
                ),
                name='GLM-4.6V-Flash',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.7',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.7'), ClauseEquals(equals='zai-org/glm-4.7-fast')]
                ),
                name='GLM-4.7',
                context_window=204800,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.7-Flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-org/glm-4.7-flash'),
                        ClauseEquals(equals='zai-org/glm-4.7-flash-fast'),
                    ]
                ),
                name='GLM-4.7-Flash',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='zai-org/GLM-5',
                match=ClauseOr(or_=[ClauseEquals(equals='zai-org/glm-5'), ClauseEquals(equals='zai-org/glm-5-fast')]),
                name='GLM-5',
                context_window=202800,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_nscale',
        name='HuggingFace (nscale)',
        api_pattern='https://router\\.huggingface\\.co/nscale',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='nscale')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/QwQ-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwq-32b'), ClauseEquals(equals='qwen/qwq-32b-fast')]),
                name='QwQ-32B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-Coder-32B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-coder-32b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-coder-32b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-Coder-32B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-Coder-3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-coder-3b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-coder-3b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-Coder-3B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-Coder-7B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-coder-7b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-coder-7b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-Coder-7B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-14B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-14b'), ClauseEquals(equals='qwen/qwen3-14b-fast')]),
                name='Qwen3-14B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-fast'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B',
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-4B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-4b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-4b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-4B-Instruct-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-4B-Thinking-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-4b-thinking-2507'),
                        ClauseEquals(equals='qwen/qwen3-4b-thinking-2507-fast'),
                    ]
                ),
                name='Qwen3-4B-Thinking-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-8B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-8b'), ClauseEquals(equals='qwen/qwen3-8b-fast')]),
                name='Qwen3-8B',
                context_window=40960,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Llama-70B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Llama-70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.75'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Llama-8B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-8b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-8b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Llama-8B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-1.5b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-1.5b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Qwen-1.5B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Qwen-32B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-32b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-32b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Qwen-32B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Qwen-7B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-7b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-qwen-7b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Qwen-7B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Scout-17B-16E-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct'),
                        ClauseEquals(equals='meta-llama/llama-4-scout-17b-16e-instruct-fast'),
                    ]
                ),
                name='Llama-4-Scout-17B-16E-Instruct',
                context_window=890000,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.29')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_ovhcloud',
        name='HuggingFace (ovhcloud)',
        api_pattern='https://router\\.huggingface\\.co/ovhcloud',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='ovhcloud')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/Qwen2.5-VL-72B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-VL-72B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('1.01'), output_mtok=Decimal('1.01')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-30B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-30b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-30b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Coder-30B-A3B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.26')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.11')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.74'), output_mtok=Decimal('0.74')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.47')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.18')),
            ),
        ],
    ),
    Provider(
        id='huggingface_publicai',
        name='HuggingFace (publicai)',
        api_pattern='https://router\\.huggingface\\.co/publicai',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='publicai')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='aisingapore/Gemma-SEA-LION-v4-27B-IT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='aisingapore/gemma-sea-lion-v4-27b-it'),
                        ClauseEquals(equals='aisingapore/gemma-sea-lion-v4-27b-it-fast'),
                    ]
                ),
                name='Gemma-SEA-LION-v4-27B-IT',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='aisingapore/Qwen-SEA-LION-v4-32B-IT',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='aisingapore/qwen-sea-lion-v4-32b-it'),
                        ClauseEquals(equals='aisingapore/qwen-sea-lion-v4-32b-it-fast'),
                    ]
                ),
                name='Qwen-SEA-LION-v4-32B-IT',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='allenai/Olmo-3-7B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='allenai/olmo-3-7b-instruct'),
                        ClauseEquals(equals='allenai/olmo-3-7b-instruct-fast'),
                    ]
                ),
                name='Olmo-3-7B-Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='allenai/Olmo-3.1-32B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='allenai/olmo-3.1-32b-instruct'),
                        ClauseEquals(equals='allenai/olmo-3.1-32b-instruct-fast'),
                    ]
                ),
                name='Olmo-3.1-32B-Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='dicta-il/DictaLM-3.0-24B-Thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='dicta-il/dictalm-3.0-24b-thinking'),
                        ClauseEquals(equals='dicta-il/dictalm-3.0-24b-thinking-fast'),
                    ]
                ),
                name='DictaLM-3.0-24B-Thinking',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='swiss-ai/Apertus-70B-Instruct-2509',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='swiss-ai/apertus-70b-instruct-2509'),
                        ClauseEquals(equals='swiss-ai/apertus-70b-instruct-2509-fast'),
                    ]
                ),
                name='Apertus-70B-Instruct-2509',
                prices=ModelPrice(input_mtok=Decimal('0.82'), output_mtok=Decimal('2.92')),
            ),
            ModelInfo(
                id='swiss-ai/Apertus-8B-Instruct-2509',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='swiss-ai/apertus-8b-instruct-2509'),
                        ClauseEquals(equals='swiss-ai/apertus-8b-instruct-2509-fast'),
                    ]
                ),
                name='Apertus-8B-Instruct-2509',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='utter-project/EuroLLM-22B-Instruct-2512',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='utter-project/eurollm-22b-instruct-2512'),
                        ClauseEquals(equals='utter-project/eurollm-22b-instruct-2512-fast'),
                    ]
                ),
                name='EuroLLM-22B-Instruct-2512',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_sambanova',
        name='HuggingFace (sambanova)',
        api_pattern='https://router\\.huggingface\\.co/sambanova',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='sambanova')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='Qwen/Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='qwen/qwen3-32b'), ClauseEquals(equals='qwen/qwen3-32b-fast')]),
                name='Qwen3-32B',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-0528',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528-fast'),
                    ]
                ),
                name='DeepSeek-R1-0528',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('7')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1-Distill-Llama-70B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-distill-llama-70b-fast'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Llama-70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('1.4')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3-0324',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324-fast'),
                    ]
                ),
                name='DeepSeek-V3-0324',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('4.5')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-fast'),
                    ]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('0.59')),
            ),
            ModelInfo(
                id='tokyotech-llm/Llama-3.3-Swallow-70B-Instruct-v0.4',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='tokyotech-llm/llama-3.3-swallow-70b-instruct-v0.4'),
                        ClauseEquals(equals='tokyotech-llm/llama-3.3-swallow-70b-instruct-v0.4-fast'),
                    ]
                ),
                name='Llama-3.3-Swallow-70B-Instruct-v0.4',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.2')),
            ),
        ],
    ),
    Provider(
        id='huggingface_together',
        name='HuggingFace (together)',
        api_pattern='https://router\\.huggingface\\.co/together',
        pricing_urls=['https://router.huggingface.co/v1/models', 'https://huggingface.co/inference/models'],
        provider_match=ClauseAnd(and_=[ClauseContains(contains='huggingface'), ClauseContains(contains='together')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='EssentialAI/rnj-1-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='essentialai/rnj-1-instruct'),
                        ClauseEquals(equals='essentialai/rnj-1-instruct-fast'),
                    ]
                ),
                name='rnj-1-instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='Qwen/Qwen2.5-7B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen2.5-7b-instruct'),
                        ClauseEquals(equals='qwen/qwen2.5-7b-instruct-fast'),
                    ]
                ),
                name='Qwen2.5-7B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-235B-A22B-Instruct-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507'),
                        ClauseEquals(equals='qwen/qwen3-235b-a22b-instruct-2507-fast'),
                    ]
                ),
                name='Qwen3-235B-A22B-Instruct-2507',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-480B-A35B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fast'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fp8'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-instruct-fp8-fast'),
                    ]
                ),
                name='Qwen3-Coder-480B-A35B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Coder-Next-FP8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-next-fp8'),
                        ClauseEquals(equals='qwen/qwen3-coder-next-fp8-fast'),
                    ]
                ),
                name='Qwen3-Coder-Next-FP8',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-Next-80B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct-fast'),
                    ]
                ),
                name='Qwen3-Next-80B-A3B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='Qwen/Qwen3-VL-8B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-vl-8b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-vl-8b-instruct-fast'),
                    ]
                ),
                name='Qwen3-VL-8B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.18000000000000002'), output_mtok=Decimal('0.68')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-397B-A17B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b'),
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b-fast'),
                    ]
                ),
                name='Qwen3.5-397B-A17B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('3.6')),
            ),
            ModelInfo(
                id='Qwen/Qwen3.5-9B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.5-9b'), ClauseEquals(equals='qwen/qwen3.5-9b-fast')]
                ),
                name='Qwen3.5-9B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='ServiceNow-AI/Apriel-1.6-15b-Thinker',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='servicenow-ai/apriel-1.6-15b-thinker'),
                        ClauseEquals(equals='servicenow-ai/apriel-1.6-15b-thinker-fast'),
                    ]
                ),
                name='Apriel-1.6-15b-Thinker',
                context_window=131072,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepcogito/cogito-671b-v2.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepcogito/cogito-671b-v2.1'),
                        ClauseEquals(equals='deepcogito/cogito-671b-v2.1-fast'),
                        ClauseEquals(equals='deepcogito/cogito-671b-v2.1-fp8'),
                        ClauseEquals(equals='deepcogito/cogito-671b-v2.1-fp8-fast'),
                    ]
                ),
                name='cogito-671b-v2.1',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-R1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-r1'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-fast'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528'),
                        ClauseEquals(equals='deepseek-ai/deepseek-r1-0528-fast'),
                    ]
                ),
                name='DeepSeek-R1',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('7')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-fast'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3-0324-fast'),
                    ]
                ),
                name='DeepSeek-V3',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='deepseek-ai/DeepSeek-V3.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1'),
                        ClauseEquals(equals='deepseek-ai/deepseek-v3.1-fast'),
                    ]
                ),
                name='DeepSeek-V3.1',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.7')),
            ),
            ModelInfo(
                id='google/gemma-3n-E4B-it',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemma-3n-e4b-it'),
                        ClauseEquals(equals='google/gemma-3n-e4b-it-fast'),
                    ]
                ),
                name='gemma-3n-E4B-it',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct-fast'),
                    ]
                ),
                name='Llama-3.3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-4-maverick-17b-128e-instruct-fp8'),
                        ClauseEquals(equals='meta-llama/llama-4-maverick-17b-128e-instruct-fp8-fast'),
                    ]
                ),
                name='Llama-4-Maverick-17B-128E-Instruct-FP8',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='moonshotai/Kimi-K2.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='moonshotai/kimi-k2.5'), ClauseEquals(equals='moonshotai/kimi-k2.5-fast')]
                ),
                name='Kimi-K2.5',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('2.8')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-120b'), ClauseEquals(equals='openai/gpt-oss-120b-fast')]
                ),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-oss-20b'), ClauseEquals(equals='openai/gpt-oss-20b-fast')]
                ),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.5-Air-FP8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='zai-org/glm-4.5-air-fp8'),
                        ClauseEquals(equals='zai-org/glm-4.5-air-fp8-fast'),
                    ]
                ),
                name='GLM-4.5-Air-FP8',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.6',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.6'), ClauseEquals(equals='zai-org/glm-4.6-fast')]
                ),
                name='GLM-4.6',
                context_window=202752,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='zai-org/GLM-4.7-FP8',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='zai-org/glm-4.7-fp8'), ClauseEquals(equals='zai-org/glm-4.7-fp8-fast')]
                ),
                name='GLM-4.7-FP8',
                context_window=202752,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='zai-org/GLM-5',
                match=ClauseOr(or_=[ClauseEquals(equals='zai-org/glm-5'), ClauseEquals(equals='zai-org/glm-5-fast')]),
                name='GLM-5',
                context_window=202752,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3.2')),
            ),
        ],
    ),
    Provider(
        id='minimax',
        name='MiniMax',
        api_pattern='https://api\\.minimax(i)?\\.(?:com|io)',
        pricing_urls=['https://platform.minimax.io/docs/guides/pricing-paygo'],
        price_comments='Prices sourced from MiniMax international platform USD pricing (platform.minimax.io, May 2026). M2.1, M2.1-highspeed, and M2 are legacy models; prices inferred from CNY pricing at the equivalent 7.00 CNY/USD rate used by the international platform for current models.',
        model_match=ClauseOr(
            or_=[
                ClauseStartsWith(starts_with='MiniMax-M'),
                ClauseStartsWith(starts_with='minimax-m'),
                ClauseEquals(equals='minimax-01'),
                ClauseEquals(equals='M2-her'),
                ClauseEquals(equals='m2-her'),
            ]
        ),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cache_creation_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path='cache_creation_input_tokens', dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(path='cache_read_input_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='M2-her',
                match=ClauseOr(or_=[ClauseEquals(equals='M2-her'), ClauseEquals(equals='m2-her')]),
                name='MiniMax M2-her',
                description='MiniMax M2-her, a text dialogue model optimized for role-playing and multi-turn conversations. 64,000 token context window. No cache support.',
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='MiniMax-M2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='MiniMax-M2'),
                        ClauseEquals(equals='minimax-m2'),
                        ClauseEquals(equals='MiniMax-M2.1'),
                        ClauseEquals(equals='minimax-m2.1'),
                        ClauseEquals(equals='MiniMax-M2.5'),
                        ClauseEquals(equals='minimax-m2.5'),
                    ]
                ),
                name='MiniMax M2',
                description='MiniMax M2 (legacy), a multimodal language model with 204,800 token context window. Supports agentic capabilities and advanced reasoning.',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('1.2'),
                ),
            ),
            ModelInfo(
                id='MiniMax-M2.1-highspeed',
                match=ClauseOr(
                    or_=[ClauseContains(contains='M2.1-highspeed'), ClauseContains(contains='m2.1-highspeed')]
                ),
                name='MiniMax M2.1 Highspeed',
                description='MiniMax M2.1 highspeed variant (legacy) with higher throughput.',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('2.4'),
                ),
            ),
            ModelInfo(
                id='MiniMax-M2.5-highspeed',
                match=ClauseOr(
                    or_=[ClauseContains(contains='M2.5-highspeed'), ClauseContains(contains='m2.5-highspeed')]
                ),
                name='MiniMax M2.5 Highspeed',
                description='MiniMax M2.5 highspeed variant with higher throughput.',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('2.4'),
                ),
            ),
            ModelInfo(
                id='MiniMax-M2.7',
                match=ClauseOr(or_=[ClauseEquals(equals='MiniMax-M2.7'), ClauseEquals(equals='minimax-m2.7')]),
                name='MiniMax M2.7',
                description='MiniMax M2.7, a multimodal language model with 204,800 token context window. Achieves top performance in real-world engineering, office productivity, and character-rich interaction.',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.06'),
                    output_mtok=Decimal('1.2'),
                ),
            ),
            ModelInfo(
                id='MiniMax-M2.7-highspeed',
                match=ClauseOr(
                    or_=[ClauseContains(contains='M2.7-highspeed'), ClauseContains(contains='m2.7-highspeed')]
                ),
                name='MiniMax M2.7 Highspeed',
                description='MiniMax M2.7 highspeed variant with higher throughput.',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.06'),
                    output_mtok=Decimal('2.4'),
                ),
            ),
            ModelInfo(
                id='minimax-01',
                match=ClauseEquals(equals='minimax-01'),
                name='MiniMax-01',
                description='MiniMax-01 combines MiniMax-Text-01 for text generation and MiniMax-VL-01 for image understanding.',
                context_window=1000192,
                price_comments='Imported from OpenRouter pricing; verify against MiniMax pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='minimax-m1',
                match=ClauseEquals(equals='minimax-m1'),
                name='MiniMax M1',
                description='MiniMax-M1 is a large-scale, open-weight reasoning model designed for extended context and high-efficiency inference. It leverages a hybrid Mixture-of-Experts (MoE) architecture paired with a custom "lightning attention" mechanism, allowing efficient long-context processing.',
                price_comments='Imported from OpenRouter pricing; verify against MiniMax pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='minimax-m3',
                match=ClauseEquals(equals='minimax-m3'),
                name='MiniMax M3',
                description='MiniMax-M3 is a multimodal foundation model from MiniMax. It supports text, image, and video inputs with text output, a 1M-token context window, and long-horizon agentic work.',
                context_window=1000000,
                price_comments='Prices from MiniMax pay-as-you-go page (https://platform.minimax.io/docs/guides/pricing-paygo, 2026-07-01), standard service tier "Permanent 50% off" effective rate. Inputs over 512K tokens bill at 2x per MiniMax\'s length-based tiering.',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=512000, price=Decimal('0.6'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.06'), tiers=[Tier(start=512000, price=Decimal('0.12'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('1.2'), tiers=[Tier(start=512000, price=Decimal('2.4'))]),
                ),
            ),
        ],
    ),
    Provider(
        id='mistral',
        name='Mistral',
        api_pattern='https://api\\.mistral\\.ai',
        pricing_urls=['https://mistral.ai/pricing/api'],
        model_match=ClauseRegex(
            regex='^(?![^/]+/)(?:labs-)?(?:(?:mi|code|dev|magi|mini)stral|mixtral|pixtral|voxtral|open-(?:mistral|mixtral))'
        ),
        provider_match=ClauseStartsWith(starts_with='mistral'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage_info',
                mappings=[UsageExtractorMapping(path='pages_processed', dest='input_document_pages', required=True)],
                api_flavor='ocr',
                model_path='model',
            ),
            UsageExtractor(
                root='usage_info',
                mappings=[
                    UsageExtractorMapping(path='pages_processed', dest='input_document_pages', required=True),
                    UsageExtractorMapping(path='pages_processed', dest='input_annotated_document_pages', required=True),
                ],
                api_flavor='ocr_annotated',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='codestral',
                match=ClauseOr(or_=[ClauseEquals(equals='codestral-latest'), ClauseEquals(equals='codestral-2501')]),
                name='Codestral',
                description="Mistral's cutting-edge language model for coding. Codestral specializes in low-latency, high-frequency tasks such as fill-in-the-middle (FIM), code correction and test generation.",
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='codestral-2508',
                match=ClauseEquals(equals='codestral-2508'),
                name='Codestral 2508',
                description="Mistral's cutting-edge language model for coding released end of July 2025. Codestral specializes in low-latency, high-frequency tasks such as fill-in-the-middle (FIM), code correction and test generation.",
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('0.9')
                ),
            ),
            ModelInfo(
                id='devstral-2512',
                match=ClauseEquals(equals='devstral-2512'),
                name='Devstral 2 2512',
                description='Devstral 2 is a state-of-the-art open-source model by Mistral AI specializing in agentic coding. It is a 123B-parameter dense transformer model supporting a 256K context window.',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='devstral-small',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='devstral-small'),
                        ClauseEquals(equals='devstral-small-2505'),
                        ClauseEquals(equals='devstral-small-2507'),
                        ClauseEquals(equals='devstral-small-latest'),
                        ClauseEquals(equals='labs-devstral-small-2512'),
                    ]
                ),
                name='Devstral Small',
                description='Devstral-Small-2505 is a 24B parameter agentic LLM fine-tuned from Mistral-Small-3.1, jointly developed by Mistral AI and All Hands AI for advanced software engineering tasks. It is optimized for codebase exploration, multi-file editing, and integration into coding agents, achieving state-of-the-art results on SWE-Bench Verified (46.8%).',
                price_comments="The previous $0.06/$0.12 rates were not Mistral's; every Devstral Small generation is documented at $0.10/$0.30. Ref: https://github.com/mistralai/platform-docs-public/tree/main/src/schema/models/models (devstral-small-*.ts)",
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='devstral-small:free',
                match=ClauseEquals(equals='devstral-small:free'),
                name='Devstral Small (free)',
                description='Devstral-Small-2505 is a 24B parameter agentic LLM fine-tuned from Mistral-Small-3.1, jointly developed by Mistral AI and All Hands AI for advanced software engineering tasks. It is optimized for codebase exploration, multi-file editing, and integration into coding agents, achieving state-of-the-art results on SWE-Bench Verified (46.8%).',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='magistral-medium',
                match=ClauseOr(or_=[ClauseStartsWith(starts_with='magistral-medium')]),
                name='Magistral Medium',
                description="Magistral is Mistral's first reasoning model. It is ideal for general purpose use requiring longer thought processing and better accuracy than with non-reasoning LLMs. From legal research and financial forecasting to software development and creative storytelling — this model solves multi-step challenges where transparency and precision are critical.",
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='magistral-small',
                match=ClauseStartsWith(starts_with='magistral-small-'),
                name='Magistral Small',
                description='Magistral Small is a 24B parameter instruction-tuned model based on Mistral-Small-3.1 (2503), enhanced through supervised fine-tuning on traces from Magistral Medium and further refined via reinforcement learning. It is optimized for reasoning and supports a wide multilingual range, including over 20 languages.',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='ministral-14b-2512',
                match=ClauseEquals(equals='ministral-14b-2512'),
                name='Ministral 3 14B 2512',
                description='The largest model in the Ministral 3 family, Ministral 3 14B offers frontier capabilities and performance comparable to its larger Mistral Small 3.2 24B counterpart.',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('0.2')
                ),
            ),
            ModelInfo(
                id='ministral-3b',
                match=ClauseEquals(equals='ministral-3b'),
                name='Ministral 3B',
                description="Ministral 3B is a 3B parameter model optimized for on-device and edge computing. It excels in knowledge, commonsense reasoning, and function-calling, outperforming larger models like Mistral 7B on most benchmarks. Supporting up to 128k context length, it's ideal for orchestrating agentic workflows and specialist tasks with efficient inference.",
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='ministral-3b-2512',
                match=ClauseEquals(equals='ministral-3b-2512'),
                name='Ministral 3 3B 2512',
                description='The smallest model in the Ministral 3 family, Ministral 3 3B is a powerful, efficient tiny language model with vision capabilities.',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.1')
                ),
            ),
            ModelInfo(
                id='ministral-8b',
                match=ClauseOr(or_=[ClauseEquals(equals='ministral-8b'), ClauseEquals(equals='ministral-8b-2410')]),
                name='Ministral 8B 24.10',
                description='Ministral 8B is an 8B parameter model featuring a unique interleaved sliding-window attention pattern for faster, memory-efficient inference. Designed for edge use cases, it supports up to 128k context length and excels in knowledge and reasoning tasks. It outperforms peers in the sub-10B category, making it perfect for low-latency, privacy-first applications.',
                price_comments='The previous $1 output price was incorrect; Mistral documented $0.10 from launch. Ref: https://github.com/mistralai/platform-docs-public/blob/4422b455194a/src/schema/models/models/ministral-8b-24-1.ts',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='ministral-8b-2512',
                match=ClauseEquals(equals='ministral-8b-2512'),
                name='Ministral 3 8B 2512',
                description='Ministral 3 8B is an efficient text and vision model for edge deployment.',
                context_window=262144,
                price_comments='Ref: https://mistral.ai/pricing/api',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.15')
                ),
            ),
            ModelInfo(
                id='ministral-8b-latest',
                match=ClauseEquals(equals='ministral-8b-latest'),
                name='Ministral 8B Latest',
                price_comments='The latest alias moved from Ministral 8B 24.10 to Ministral 3 8B on 2025-12-02. Ref: https://github.com/mistralai/platform-docs-public/commit/4975b09514f95978cfeeea814562000348548107',
                prices=[
                    ConditionalPrice(
                        constraint=None, prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1'))
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2025, 12, 2)),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.15')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='mistral-7b',
                match=ClauseOr(or_=[ClauseEquals(equals='mistral-7b'), ClauseEquals(equals='open-mistral-7b')]),
                name='Mistral 7B',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='mistral-embed',
                match=ClauseEquals(equals='mistral-embed'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistral-large',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistral-large'),
                        ClauseEquals(equals='mistral-large-latest'),
                        ClauseEquals(equals='mistral-large-2407'),
                        ClauseEquals(equals='mistral-large-2411'),
                    ]
                ),
                name='Mistral Large',
                description="This is Mistral AI's flagship model, Mistral Large 2 (version `mistral-large-2407`). It's a proprietary weights-available model and excels at reasoning, code, JSON, chat, and more. Read the launch announcement here.",
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='mistral-large-2512',
                match=ClauseEquals(equals='mistral-large-2512'),
                name='Mistral Large 3 2512',
                description="Mistral Large 3 2512 is Mistral's most capable model to date, featuring a sparse mixture-of-experts architecture with 41B active parameters (675B total), and released under the Apache 2.0 license.",
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('1.5')
                ),
            ),
            ModelInfo(
                id='mistral-medium-2312',
                match=ClauseEquals(equals='mistral-medium-2312'),
                name='Mistral Medium 1',
                description="Mistral's first enterprise-grade model, released in December 2023.",
                price_comments='Retired on 2025-06-16; retained for historical usage records at its original $2.70/$8.10 per MTok rates. Ref: https://github.com/mistralai/platform-docs-public/blob/222f4ba9114f84ce9f2d718b9a12fbac1e527f4b/src/schema/models/models/mistral-medium-1-0-23-12.ts',
                prices=ModelPrice(input_mtok=Decimal('2.7'), output_mtok=Decimal('8.1')),
            ),
            ModelInfo(
                id='mistral-medium-3-1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistral-medium'),
                        ClauseEquals(equals='mistral-medium-2505'),
                        ClauseEquals(equals='mistral-medium-2508'),
                    ]
                ),
                name='Mistral Medium 3 and 3.1',
                description='Mistral Medium 3 is a high-performance enterprise-grade language model designed to deliver frontier-level capabilities at significantly reduced operational cost. It balances state-of-the-art reasoning and multimodal performance with 8× lower cost compared to traditional large models, making it suitable for scalable deployments across professional and industrial use cases.',
                price_comments='Mistral Medium 3 and 3.1 retain their original $0.40/$2 per MTok rates. Ref: https://github.com/mistralai/platform-docs-public/blob/222f4ba9114f84ce9f2d718b9a12fbac1e527f4b/src/schema/models/models/mistral-medium-3-1-25-08.ts',
                prices=ModelPrice(input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mistral-medium-3-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistral-medium-3.5'),
                        ClauseEquals(equals='mistral-medium-3-5'),
                        ClauseEquals(equals='mistral-medium-3'),
                    ]
                ),
                name='Mistral Medium 3.5',
                description='Mistral Medium 3.5 is a frontier-class multimodal model optimized for agentic and coding use cases.',
                context_window=262144,
                price_comments='Ref: https://mistral.ai/pricing/api',
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('7.5')
                ),
            ),
            ModelInfo(
                id='mistral-medium-latest',
                match=ClauseEquals(equals='mistral-medium-latest'),
                name='Mistral Medium Latest',
                price_comments='The latest alias moved from Mistral Medium 3.1 to Mistral Medium 3.5 on 2026-06-16. Ref: https://github.com/mistralai/platform-docs-public/commit/cc58c1186b1ca8ad65658f5dfd3ebd29de778c7f',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('2')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 6, 16)),
                        prices=ModelPrice(
                            input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('7.5')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='mistral-nemo',
                match=ClauseOr(or_=[ClauseEquals(equals='mistral-nemo'), ClauseEquals(equals='open-mistral-nemo')]),
                name='Mistral NeMo',
                description='A 12B parameter model with a 128k token context length built by Mistral in collaboration with NVIDIA.',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='mistral-nemo:free',
                match=ClauseEquals(equals='mistral-nemo:free'),
                name='Mistral Nemo (free)',
                description='A 12B parameter model with a 128k token context length built by Mistral in collaboration with NVIDIA.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-ocr-2503',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='mistral-ocr-2503'), ClauseEquals(equals='mistral-ocr-2503-completion')]
                ),
                name='Mistral OCR',
                price_comments='Mistral launched OCR at 1,000 pages per US dollar: https://mistral.ai/news/mistral-ocr/',
                deprecated=True,
                prices=ModelPrice(input_document_kpages=Decimal('1')),
            ),
            ModelInfo(
                id='mistral-ocr-2505',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='mistral-ocr-2505'), ClauseEquals(equals='mistral-ocr-2505-completion')]
                ),
                name='Mistral OCR 2',
                price_comments='OCR 2 retained the original OCR page price and introduced structured annotations on May 22, 2025: https://docs.mistral.ai/resources/changelogs',
                deprecated=True,
                prices=ModelPrice(input_document_kpages=Decimal('1'), input_annotated_document_kpages=Decimal('3')),
            ),
            ModelInfo(
                id='mistral-ocr-2512',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='mistral-ocr-2512'), ClauseEquals(equals='mistral-ocr-2512-completion')]
                ),
                name='Mistral OCR 3',
                context_window=16384,
                price_comments='https://docs.mistral.ai/models/ocr-3-25-12',
                prices=ModelPrice(input_document_kpages=Decimal('2'), input_annotated_document_kpages=Decimal('3')),
            ),
            ModelInfo(
                id='mistral-ocr-4-0',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='mistral-ocr-4-0'), ClauseEquals(equals='mistral-ocr-4-0-completion')]
                ),
                name='Mistral OCR 4.0',
                context_window=16384,
                price_comments='https://docs.mistral.ai/models/ocr-4-0',
                prices=ModelPrice(input_document_kpages=Decimal('4'), input_annotated_document_kpages=Decimal('5')),
            ),
            ModelInfo(
                id='mistral-ocr-4-1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistral-ocr-4'),
                        ClauseEquals(equals='mistral-ocr-4-completion'),
                        ClauseEquals(equals='mistral-ocr-4-1'),
                        ClauseEquals(equals='mistral-ocr-4-1-completion'),
                    ]
                ),
                name='Mistral OCR 4.1',
                context_window=16384,
                price_comments='https://docs.mistral.ai/models/ocr-4-1',
                prices=ModelPrice(input_document_kpages=Decimal('4'), input_annotated_document_kpages=Decimal('5')),
            ),
            ModelInfo(
                id='mistral-ocr-latest',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistral-ocr-latest'),
                        ClauseEquals(equals='mistral-ocr-latest-completion'),
                    ]
                ),
                name='Mistral OCR Latest',
                price_comments='The latest alias moved to OCR 3 on December 18, 2025, OCR 4.0 on June 23, 2026, and OCR 4.1 on July 16, 2026. OCR 4.1 kept the OCR 4.0 rates: https://docs.mistral.ai/resources/changelogs',
                prices=[
                    ConditionalPrice(constraint=None, prices=ModelPrice(input_document_kpages=Decimal('1'))),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2025, 5, 22)),
                        prices=ModelPrice(
                            input_document_kpages=Decimal('1'), input_annotated_document_kpages=Decimal('3')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2025, 12, 18)),
                        prices=ModelPrice(
                            input_document_kpages=Decimal('2'), input_annotated_document_kpages=Decimal('3')
                        ),
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 6, 23)),
                        prices=ModelPrice(
                            input_document_kpages=Decimal('4'), input_annotated_document_kpages=Decimal('5')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='mistral-saba',
                match=ClauseOr(or_=[ClauseEquals(equals='mistral-saba'), ClauseEquals(equals='mistral-saba-latest')]),
                name='Mistral Saba',
                description='Mistral Saba is a 24B-parameter language model specifically designed for the Middle East and South Asia, delivering accurate and contextually relevant responses while maintaining efficient performance. Trained on curated regional datasets, it supports multiple Indian-origin languages—including Tamil and Malayalam—alongside Arabic. This makes it a versatile option for a range of regional and multilingual applications. Read more at the blog post here',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='mistral-small-24b-instruct-2501',
                match=ClauseEquals(equals='mistral-small-24b-instruct-2501'),
                name='Mistral Small 3',
                description='Mistral Small 3 is a 24B-parameter language model optimized for low-latency performance across common AI tasks. Released under the Apache 2.0 license, it features both pre-trained and instruction-tuned versions designed for efficient local deployment.',
                price_comments="Can't find pricing on this model, so just trusting open router",
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.08')),
            ),
            ModelInfo(
                id='mistral-small-24b-instruct-2501:free',
                match=ClauseEquals(equals='mistral-small-24b-instruct-2501:free'),
                name='Mistral Small 3 (free)',
                description='Mistral Small 3 is a 24B-parameter language model optimized for low-latency performance across common AI tasks. Released under the Apache 2.0 license, it features both pre-trained and instruction-tuned versions designed for efficient local deployment.',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-small-2603',
                match=ClauseEquals(equals='mistral-small-2603'),
                name='Mistral Small 4',
                description='Mistral Small 4 is the next major release in the Mistral Small family, unifying the capabilities of several flagship Mistral models into a single system.',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='mistral-small-3.1-24b-instruct',
                match=ClauseEquals(equals='mistral-small-3.1-24b-instruct'),
                name='Mistral Small 3.1 24B',
                description='Mistral Small 3.1 24B Instruct is an upgraded variant of Mistral Small 3 (2501), featuring 24 billion parameters with advanced multimodal capabilities.',
                price_comments='Imported from OpenRouter pricing; verify against Mistral pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.351'), output_mtok=Decimal('0.555')),
            ),
            ModelInfo(
                id='mistral-small-3.2-24b-instruct',
                match=ClauseEquals(equals='mistral-small-3.2-24b-instruct'),
                name='Mistral Small 3.2 24B',
                description='Mistral-Small-3.2-24B-Instruct-2506 is an updated 24B parameter model from Mistral optimized for instruction following, repetition reduction, and improved function calling.',
                price_comments='Imported from OpenRouter pricing; verify against Mistral pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistral-small-latest',
                match=ClauseEquals(equals='mistral-small-latest'),
                name='Mistral Small 3.2',
                description='SOTA. Multimodal. Multilingual. Apache 2.0.',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='mistral-tiny',
                match=ClauseEquals(equals='mistral-tiny'),
                name='Mistral Tiny',
                description='Note: This model is being deprecated. Recommended replacement is the newer Ministral 8B',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='mixtral-8x22b-instruct',
                match=ClauseEquals(equals='mixtral-8x22b-instruct'),
                name='Mixtral 8x22B Instruct',
                description="Mistral's official instruct fine-tuned version of Mixtral 8x22B. It uses 39B active parameters out of 141B, offering unparalleled cost efficiency for its size. Its strengths include:\n- strong math, coding, and reasoning\n- large context length (64k)\n- fluency in English, French, Italian, German, and Spanish",
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='mixtral-8x7b',
                match=ClauseOr(
                    or_=[ClauseStartsWith(starts_with='mixtral-8x7b'), ClauseEquals(equals='open-mixtral-8x7b')]
                ),
                name='Mixtral 8x7B',
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='pixtral-12b',
                match=ClauseOr(or_=[ClauseEquals(equals='pixtral-12b'), ClauseEquals(equals='pixtral-12b-latest')]),
                name='Pixtral 12B',
                description='The first multi-modal, text+image-to-text model from Mistral AI. Its weights were launched via torrent: https://x.com/mistralai/status/1833758285167722836.',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='pixtral-large',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='pixtral-large-latest'), ClauseEquals(equals='pixtral-large-2411')]
                ),
                name='Pixtral Large 2411',
                description='Pixtral Large is a 124B parameter, open-weight, multimodal model built on top of Mistral Large 2. The model is able to understand documents, charts and natural images.',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='voxtral-mini-2602',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='voxtral-mini-latest'), ClauseEquals(equals='voxtral-mini-2602')]
                ),
                name='Voxtral Mini Transcribe 2',
                context_window=16384,
                price_comments='See https://docs.mistral.ai/models/voxtral-mini-transcribe-26-02.',
                prices=ModelPrice(audio_hours=Decimal('0.18'), input_audio_hours=Decimal('0.18')),
            ),
            ModelInfo(
                id='voxtral-small-24b-2507',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='voxtral-small-24b-2507'),
                        ClauseEquals(equals='voxtral-small-2507'),
                        ClauseEquals(equals='voxtral-small-latest'),
                    ]
                ),
                name='Voxtral Small 24B 2507',
                description='Voxtral Small is an enhancement of Mistral Small 3, incorporating state-of-the-art audio input capabilities while retaining best-in-class text performance. It excels at speech transcription, translation and audio understanding.',
                context_window=32768,
                price_comments='Mistral raised output pricing from $0.30 to $0.40 per MTok on 2026-08-11. Ref: https://github.com/mistralai/platform-docs-public/commit/1996c3f1eca754d02436a37fcc899440794a18a5',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.3')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 11)),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.4')
                        ),
                    ),
                ],
            ),
        ],
    ),
    Provider(
        id='modal',
        name='Modal',
        api_pattern='https://[^/]+\\.modal\\.(?:run|direct)(?:/|$)',
        pricing_urls=['https://modal.com/library'],
        provider_match=ClauseContains(contains='modal'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(path='reasoning_tokens', dest='output_reasoning_tokens', required=False),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='moonshotai/Kimi-K3',
                match=ClauseEquals(equals='moonshotai/Kimi-K3'),
                name='Kimi K3',
                description="Moonshot AI's 2.8-trillion-parameter multimodal reasoning model, served by Modal as a Shared Endpoint.",
                context_window=1048576,
                price_comments='Modal Shared Endpoint pricing. Reasoning tokens use the same $15/MTok rate as completion tokens. See https://modal.com/library/moonshot/kimi-k3.',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='thinkingmachines/Inkling-NVFP4',
                match=ClauseEquals(equals='thinkingmachines/Inkling-NVFP4'),
                name='Inkling NVFP4',
                description="Thinking Machines Lab's reasoning model, served by Modal as a Shared Endpoint.",
                price_comments='Modal Shared Endpoint dashboard pricing. Reasoning tokens use the same $5/MTok rate as completion tokens.',
                prices=ModelPrice(input_mtok=Decimal('1.2'), cache_read_mtok=Decimal('0.27'), output_mtok=Decimal('5')),
            ),
        ],
    ),
    Provider(
        id='moonshotai',
        name='MoonshotAi',
        api_pattern='https://api\\.moonshot\\.',
        pricing_urls=[
            'https://platform.kimi.ai/docs/models.md',
            'https://platform.kimi.ai/docs/pricing/chat-k3.md',
            'https://platform.kimi.ai/docs/pricing/chat-k27-code.md',
            'https://platform.kimi.ai/docs/pricing/chat-k26.md',
            'https://platform.kimi.ai/docs/pricing/chat-k25.md',
            'https://platform.kimi.ai/docs/pricing/chat-v1.md',
        ],
        model_match=ClauseOr(or_=[ClauseStartsWith(starts_with='kimi'), ClauseStartsWith(starts_with='moonshot')]),
        provider_match=ClauseContains(contains='moonshot'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='kimi-k2',
                match=ClauseEquals(equals='kimi-k2'),
                name='Kimi K2 0711',
                description='Kimi K2 Instruct is a large-scale Mixture-of-Experts (MoE) language model developed by Moonshot AI, featuring 1 trillion total parameters with 32 billion active per forward pass.',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.57'), output_mtok=Decimal('2.3')),
            ),
            ModelInfo(
                id='kimi-k2-0711-preview',
                match=ClauseEquals(equals='kimi-k2-0711-preview'),
                name='Kimi K2 0711 Preview',
                description='MoE foundation model with exceptional coding and agent capabilities, featuring 1 trillion total parameters and 32 billion activated parameters.',
                context_window=131072,
                deprecated=True,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='kimi-k2-0905-preview',
                match=ClauseEquals(equals='kimi-k2-0905-preview'),
                name='Kimi K2 0905 Preview',
                description='Based on kimi-k2-0711-preview, with enhanced agentic coding abilities, improved frontend code quality and practicality, and better context understanding. MoE foundation model with 1 trillion total parameters and 32 billion activated parameters.',
                context_window=262144,
                deprecated=True,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='kimi-k2-thinking',
                match=ClauseEquals(equals='kimi-k2-thinking'),
                name='Kimi K2 Thinking',
                description='A thinking model with general agentic and reasoning capabilities, specializing in deep reasoning tasks.',
                context_window=262144,
                deprecated=True,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='kimi-k2-thinking-turbo',
                match=ClauseEquals(equals='kimi-k2-thinking-turbo'),
                name='Kimi K2 Thinking Turbo',
                description='High-speed version of kimi-k2-thinking, suitable for scenarios requiring both deep reasoning and extremely fast responses.',
                context_window=262144,
                deprecated=True,
                prices=ModelPrice(
                    input_mtok=Decimal('1.15'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('8')
                ),
            ),
            ModelInfo(
                id='kimi-k2-turbo-preview',
                match=ClauseStartsWith(starts_with='kimi-k2-turbo'),
                name='Kimi K2 Turbo Preview',
                description='High-speed version of kimi-k2, always aligned with the latest kimi-k2. Same model parameters as kimi-k2, output speed up to 60 tokens/sec (max 100 tokens/sec).',
                context_window=262144,
                deprecated=True,
                prices=ModelPrice(
                    input_mtok=Decimal('1.15'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('8')
                ),
            ),
            ModelInfo(
                id='kimi-k2.5',
                match=ClauseStartsWith(starts_with='kimi-k2.5'),
                name='Kimi K2.5',
                description="Kimi's most versatile model featuring a native multimodal architecture that supports both visual and text input, thinking and non-thinking modes, and dialogue and agent tasks. Supports automatic context caching, ToolCalls, JSON Mode, Partial Mode, and internet search.",
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='kimi-k2.6',
                match=ClauseStartsWith(starts_with='kimi-k2.6'),
                name='Kimi K2.6',
                description="Kimi's most capable model with enhanced long-context coding stability, improved instruction compliance and self-correction capabilities. Native multimodal architecture supporting text, image, and video input, thinking and non-thinking modes, and agent tasks. Supports automatic context caching, ToolCalls, JSON Mode, Partial Mode, and internet search.",
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='kimi-k2.7-code',
                match=ClauseEquals(equals='kimi-k2.7-code'),
                name='Kimi K2.7 Code',
                description="Kimi's most intelligent coding model, capable of completing programming tasks with higher success rates in long context. It features a native multimodal architecture that supports text, image, video input, thinking modes, dialogue, and agent tasks.",
                context_window=262144,
                price_comments='Ref: https://platform.kimi.ai/docs/pricing/chat-k27-code.md',
                prices=ModelPrice(
                    input_mtok=Decimal('0.95'), cache_read_mtok=Decimal('0.19'), output_mtok=Decimal('4')
                ),
            ),
            ModelInfo(
                id='kimi-k2.7-code-highspeed',
                match=ClauseEquals(equals='kimi-k2.7-code-highspeed'),
                name='Kimi K2.7 Code HighSpeed',
                description='High-speed version of Kimi K2.7 Code, with output speed of approximately 180 tokens/sec and up to 260 tokens/sec in short context scenarios.',
                context_window=262144,
                price_comments='Ref: https://platform.kimi.ai/docs/pricing/chat-k27-code.md',
                prices=ModelPrice(input_mtok=Decimal('1.9'), cache_read_mtok=Decimal('0.38'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='kimi-k3',
                match=ClauseEquals(equals='kimi-k3'),
                name='Kimi K3',
                description="Kimi's flagship reasoning model with always-on thinking, native multimodal (image and video) input, tool use, and structured output. 2.8 trillion total parameters MoE.",
                context_window=1048576,
                price_comments='Ref: https://platform.kimi.ai/docs/pricing/chat-k3.md',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='moonshot-v1-128k',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshot-v1-128k'),
                        ClauseEquals(equals='moonshot-v1-128k-vision-preview'),
                    ]
                ),
                name='Moonshot V1 128K',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='moonshot-v1-32k',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='moonshot-v1-32k'), ClauseEquals(equals='moonshot-v1-32k-vision-preview')]
                ),
                name='Moonshot V1 32K',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='moonshot-v1-8k',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='moonshot-v1-8k'), ClauseEquals(equals='moonshot-v1-8k-vision-preview')]
                ),
                name='Moonshot V1 8K',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('2')),
            ),
        ],
    ),
    Provider(
        id='novita',
        name='Novita',
        api_pattern='https://api\\.novita\\.ai',
        pricing_urls=['https://novita.ai/pricing'],
        models=[
            ModelInfo(
                id='Sao10K/L3-8B-Stheno-v3.2',
                match=ClauseEquals(equals='Sao10K/L3-8B-Stheno-v3.2'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin-mixtral-8x22b',
                match=ClauseEquals(equals='cognitivecomputations/dolphin-mixtral-8x22b'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1',
                match=ClauseEquals(equals='deepseek/deepseek-r1'),
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-llama-70b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-llama-70b'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-llama-8b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-llama-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-14b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-14b'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-32b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-32b'),
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='deepseek/deepseek_v3',
                match=ClauseEquals(equals='deepseek/deepseek_v3'),
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.89'), output_mtok=Decimal('0.89')),
            ),
            ModelInfo(
                id='google/gemma-2-9b-it',
                match=ClauseEquals(equals='google/gemma-2-9b-it'),
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.08')),
            ),
            ModelInfo(
                id='gryphe/mythomax-l2-13b',
                match=ClauseEquals(equals='gryphe/mythomax-l2-13b'),
                context_window=4096,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.09')),
            ),
            ModelInfo(
                id='jondurbin/airoboros-l2-70b',
                match=ClauseEquals(equals='jondurbin/airoboros-l2-70b'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='meta-llama/llama-3-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3-70b-instruct'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.51'), output_mtok=Decimal('0.74')),
            ),
            ModelInfo(
                id='meta-llama/llama-3-8b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3-8b-instruct'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.1-70b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.34'), output_mtok=Decimal('0.39')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-8b-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                        ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-max'),
                    ]
                ),
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-8b-instruct-bf16',
                match=ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct-bf16'),
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-11b-vision-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-11b-vision-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-1b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-1b-instruct'),
                context_window=131000,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-3b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-3b-instruct'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.3-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                context_window=12288,
                prices=ModelPrice(input_mtok=Decimal('0.39'), output_mtok=Decimal('0.39')),
            ),
            ModelInfo(
                id='microsoft/wizardlm-2-8x22b',
                match=ClauseEquals(equals='microsoft/wizardlm-2-8x22b'),
                context_window=65535,
                prices=ModelPrice(input_mtok=Decimal('0.62'), output_mtok=Decimal('0.62')),
            ),
            ModelInfo(
                id='mistralai/mistral-7b-instruct',
                match=ClauseEquals(equals='mistralai/mistral-7b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.059'), output_mtok=Decimal('0.059')),
            ),
            ModelInfo(
                id='mistralai/mistral-nemo',
                match=ClauseEquals(equals='mistralai/mistral-nemo'),
                context_window=60288,
                prices=ModelPrice(input_mtok=Decimal('0.17'), output_mtok=Decimal('0.17')),
            ),
            ModelInfo(
                id='nousresearch/hermes-2-pro-llama-3-8b',
                match=ClauseEquals(equals='nousresearch/hermes-2-pro-llama-3-8b'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='nousresearch/nous-hermes-llama2-13b',
                match=ClauseEquals(equals='nousresearch/nous-hermes-llama2-13b'),
                context_window=4096,
                prices=ModelPrice(input_mtok=Decimal('0.17'), output_mtok=Decimal('0.17')),
            ),
            ModelInfo(
                id='openchat/openchat-7b',
                match=ClauseEquals(equals='openchat/openchat-7b'),
                context_window=4096,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='qwen/qwen-2-7b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2-7b-instruct'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.054'), output_mtok=Decimal('0.054')),
            ),
            ModelInfo(
                id='qwen/qwen-2-vl-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2-vl-72b-instruct'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-72b-instruct'),
                context_window=32000,
                prices=ModelPrice(input_mtok=Decimal('0.38'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='sao10k/l3-70b-euryale-v2.1',
                match=ClauseEquals(equals='sao10k/l3-70b-euryale-v2.1'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('1.48'), output_mtok=Decimal('1.48')),
            ),
            ModelInfo(
                id='sao10k/l3-8b-lunaris',
                match=ClauseEquals(equals='sao10k/l3-8b-lunaris'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='sao10k/l31-70b-euryale-v2.2',
                match=ClauseEquals(equals='sao10k/l31-70b-euryale-v2.2'),
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('1.48'), output_mtok=Decimal('1.48')),
            ),
            ModelInfo(
                id='sophosympatheia/midnight-rose-70b',
                match=ClauseEquals(equals='sophosympatheia/midnight-rose-70b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='teknium/openhermes-2.5-mistral-7b',
                match=ClauseEquals(equals='teknium/openhermes-2.5-mistral-7b'),
                context_window=4096,
                prices=ModelPrice(input_mtok=Decimal('0.17'), output_mtok=Decimal('0.17')),
            ),
        ],
    ),
    Provider(
        id='openai',
        name='OpenAI',
        api_pattern='https://api\\.openai\\.com',
        pricing_urls=[
            'https://developers.openai.com/api/docs/pricing',
            'https://developers.openai.com/api/docs/guides/prompt-caching',
            'https://platform.openai.com/docs/pricing',
            'https://openai.com/api/pricing/',
            'https://platform.openai.com/docs/models',
            'https://help.openai.com/en/articles/7127956-how-much-does-gpt-4-cost',
        ],
        model_match=ClauseOr(
            or_=[ClauseStartsWith(starts_with='gpt-'), ClauseEquals(equals='whisper-1'), ClauseRegex(regex='^o[134]')]
        ),
        provider_match=ClauseContains(contains='openai'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
            UsageExtractor(
                root=['response', 'usage'],
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path=['input_token_details', 'text_tokens'], dest='input_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'image_tokens'], dest='input_image_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'text_tokens'],
                        dest='cache_text_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'audio_tokens'],
                        dest='cache_audio_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'cached_tokens_details', 'image_tokens'],
                        dest='cache_image_read_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(
                        path=['output_token_details', 'text_tokens'], dest='output_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_token_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=False),
                ],
                api_flavor='realtime',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'text_tokens'], dest='input_text_tokens', required=True
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'image_tokens'], dest='input_image_tokens', required=True
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'text_tokens'], dest='output_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'image_tokens'], dest='output_image_tokens', required=False
                    ),
                ],
                api_flavor='images',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True)],
                api_flavor='embeddings',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='ada',
                match=ClauseOr(or_=[ClauseEquals(equals='ada'), ClauseEquals(equals='text-ada-001')]),
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='babbage',
                match=ClauseEquals(equals='babbage'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='chatgpt-4o-latest',
                match=ClauseEquals(equals='chatgpt-4o-latest'),
                name='ChatGPT-4o',
                description='OpenAI ChatGPT 4o is continually updated by OpenAI to point to the current version of GPT-4o used by ChatGPT. It therefore differs slightly from the API version of GPT-4o in that it has additional RLHF. It is intended for research and evaluation.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='codex-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='codex-mini'), ClauseEquals(equals='codex-mini-latest')]),
                name='Codex Mini',
                description='codex-mini-latest is a fine-tuned version of o4-mini specifically for use in Codex CLI. For direct use in the API, we recommend starting with gpt-4.1.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.375'), output_mtok=Decimal('6')
                ),
            ),
            ModelInfo(
                id='computer-use',
                match=ClauseStartsWith(starts_with='computer-use'),
                name='Computer use',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('12')),
            ),
            ModelInfo(
                id='curie',
                match=ClauseOr(or_=[ClauseEquals(equals='curie'), ClauseEquals(equals='text-curie-001')]),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='davinci',
                match=ClauseOr(or_=[ClauseEquals(equals='davinci'), ClauseEquals(equals='text-davinci-001')]),
                prices=ModelPrice(input_mtok=Decimal('20'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='ft:gpt-3.5-turbo-',
                match=ClauseStartsWith(starts_with='ft:gpt-3.5-turbo'),
                description='GPT-3.5 Turbo fine tuned.',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='ft:gpt-4o',
                match=ClauseStartsWith(starts_with='ft:gpt-4o-2024-'),
                description='GPT-4o fine tuned.',
                prices=ModelPrice(input_mtok=Decimal('3.75'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='ft:gpt-4o-mini',
                match=ClauseStartsWith(starts_with='ft:gpt-4o-mini-2024-'),
                description='GPT-4o Mini fine tuned.',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='gpt-3.5-0301',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-3.5-turbo-0301'), ClauseEquals(equals='gpt-3.5-0301')]),
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-3.5-turbo'),
                        ClauseEquals(equals='gpt-35-turbo'),
                        ClauseEquals(equals='gpt-3.5-turbo-0125'),
                    ]
                ),
                name='gpt 3.5 turbo',
                description='GPT-3.5 Turbo offers a balance between cost and performance.',
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo-0613',
                match=ClauseEquals(equals='gpt-3.5-turbo-0613'),
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo-1106',
                match=ClauseEquals(equals='gpt-3.5-turbo-1106'),
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo-16k',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-3.5-turbo-16k'),
                        ClauseEquals(equals='gpt-3.5-turbo-16k-0613'),
                        ClauseEquals(equals='gpt-35-turbo-16k-0613'),
                        ClauseEquals(equals='gpt-35-turbo-16k'),
                    ]
                ),
                name='GPT-3.5 Turbo 16k',
                description='This model offers four times the context length of gpt-3.5-turbo, allowing it to support approximately 20 pages of text in a single request at a higher cost. Training data: up to Sep 2021.',
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseStartsWith(starts_with='gpt-3.5-turbo-instruct'),
                        ClauseEquals(equals='gpt-3.5-turbo-instruct-0914'),
                    ]
                ),
                name='gpt 3.5 turbo instruct',
                description='GPT-3.5 Turbo offers a balance between cost and performance.',
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-4',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4'),
                        ClauseEquals(equals='gpt-4-0314'),
                        ClauseEquals(equals='gpt-4-0613'),
                        ClauseStartsWith(starts_with='ft:gpt-4-0'),
                    ]
                ),
                name='gpt 4',
                description='GPT-4 is the latest and most advanced model in the GPT series, demonstrating sophisticated capabilities in complex reasoning, theory of mind, and narrative understanding.',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('30'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='gpt-4-32k',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4-32k'),
                        ClauseEquals(equals='gpt-4-32k-0314'),
                        ClauseEquals(equals='gpt-4-32k-0613'),
                    ]
                ),
                name='gpt 4',
                description='GPT-4 is the latest and most advanced model in the GPT series, demonstrating sophisticated capabilities in complex reasoning, theory of mind, and narrative understanding.',
                context_window=32000,
                price_comments='see https://help.openai.com/en/articles/7127956-how-much-does-gpt-4-cost',
                prices=ModelPrice(input_mtok=Decimal('60'), output_mtok=Decimal('120')),
            ),
            ModelInfo(
                id='gpt-4-turbo',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4-turbo'),
                        ClauseEquals(equals='gpt-4-turbo-2024-04-09'),
                        ClauseEquals(equals='gpt-4-turbo-0125-preview'),
                        ClauseEquals(equals='gpt-4-0125-preview'),
                        ClauseEquals(equals='gpt-4-1106-preview'),
                        ClauseEquals(equals='gpt-4-turbo-preview'),
                    ]
                ),
                name='gpt 4 turbo',
                description='GPT-4 Turbo offers a balance between cost and performance.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='gpt-4-vision-preview',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-4-vision-preview'), ClauseEquals(equals='gpt-4-1106-vision-preview')]
                ),
                name='gpt 4 vision',
                description='GPT-4 Vision is a model that offers a balance between cost and performance.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='gpt-4.1',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-4.1'), ClauseEquals(equals='gpt-4.1-2025-04-14')]),
                name='gpt 4.1',
                description="GPT-4.1 is OpenAI's latest flagship model, offering major improvements in coding, instruction following, and long context understanding with up to 1 million tokens of context.",
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('8'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-4.1-mini',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-4.1-mini'), ClauseEquals(equals='gpt-4.1-mini-2025-04-14')]
                ),
                name='gpt 4.1 mini',
                description='GPT-4.1 Mini is a significant leap in small model performance, matching or exceeding GPT-4o in many benchmarks while reducing latency by nearly half and cost by 83%.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('1.6'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-4.1-nano',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-4.1-nano'), ClauseEquals(equals='gpt-4.1-nano-2025-04-14')]
                ),
                name='gpt 4.1 nano',
                description="GPT-4.1 Nano is OpenAI's fastest and cheapest model, delivering exceptional performance for its size with a 1 million token context window, ideal for classification and autocompletion tasks.",
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('0.4')
                ),
            ),
            ModelInfo(
                id='gpt-4.5-preview',
                match=ClauseStartsWith(starts_with='gpt-4.5-preview'),
                name='GPT-4.5 (Preview)',
                description="GPT-4.5 (Preview) is a research preview of OpenAI's latest language model, designed to advance capabilities in reasoning, creativity, and multi-turn conversation. It builds on previous iterations with improvements in world knowledge, contextual coherence, and the ability to follow user intent more effectively.",
                prices=ModelPrice(
                    input_mtok=Decimal('75'), cache_read_mtok=Decimal('37.5'), output_mtok=Decimal('150')
                ),
            ),
            ModelInfo(
                id='gpt-4o',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4o'),
                        ClauseEquals(equals='gpt-4o-2024-08-06'),
                        ClauseEquals(equals='gpt-4o-2024-11-20'),
                    ]
                ),
                name='gpt 4o',
                description='GPT-4 Optimized (GPT-4o) is designed for high performance in reasoning, creativity, and technical tasks while maintaining consistent output quality.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('1.25'),
                    output_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-4o-2024-05-13',
                match=ClauseEquals(equals='gpt-4o-2024-05-13'),
                name='gpt 4o (2024-05-13)',
                description='Original GPT-4o snapshot, retained at its launch rates, which are higher than later gpt-4o snapshots and have no cached-input discount.',
                context_window=128000,
                price_comments='Split out of the shared gpt-4o entry: OpenAI lists this snapshot separately at $5/$15 with no cached-input price. Ref: https://developers.openai.com/api/docs/pricing.md',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    output_mtok=Decimal('15'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-4o-audio-preview',
                match=ClauseStartsWith(starts_with='gpt-4o-audio-preview'),
                name='gpt 4o audio preview',
                description='Audio model for gpt-4o',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='gpt-4o-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4o-mini'),
                        ClauseEquals(equals='gpt-4o-mini-2024-07-18'),
                        ClauseEquals(equals='gpt-4o-mini-search-preview'),
                        ClauseEquals(equals='gpt-4o-mini-search-preview-2025-03-11'),
                    ]
                ),
                name='gpt 4o mini',
                description='GPT-4o Mini is a cost-optimized variant of GPT-4o, designed for high-efficiency processing while maintaining strong performance. It excels in rapid inference and resource-efficient operations, making it ideal for production deployments requiring a balance of cost and capability.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'),
                    cache_read_mtok=Decimal('0.075'),
                    output_mtok=Decimal('0.6'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-4o-mini-2024-07-18.ft-',
                match=ClauseStartsWith(starts_with='gpt-4o-mini-2024-07-18.ft-'),
                description='GPT-4o Mini fine tuned.',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='gpt-4o-mini-audio-preview',
                match=ClauseStartsWith(starts_with='gpt-4o-mini-audio'),
                name='gpt 4o mini audio preview',
                description='Audio model for gpt-4o mini',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='gpt-4o-mini-realtime-preview',
                match=ClauseStartsWith(starts_with='gpt-4o-mini-realtime'),
                context_window=16000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('2.4'),
                    input_audio_mtok=Decimal('10'),
                    cache_audio_read_mtok=Decimal('0.3'),
                    output_audio_mtok=Decimal('20'),
                ),
            ),
            ModelInfo(
                id='gpt-4o-mini-transcribe',
                match=ClauseEquals(equals='gpt-4o-mini-transcribe'),
                context_window=16000,
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('5'), input_audio_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='gpt-4o-mini-tts',
                match=ClauseEquals(equals='gpt-4o-mini-tts'),
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('12')),
            ),
            ModelInfo(
                id='gpt-4o-realtime-preview',
                match=ClauseStartsWith(starts_with='gpt-4o-realtime'),
                context_window=32000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('2.5'),
                    output_mtok=Decimal('20'),
                    input_audio_mtok=Decimal('40'),
                    cache_audio_read_mtok=Decimal('2.5'),
                    output_audio_mtok=Decimal('80'),
                ),
            ),
            ModelInfo(
                id='gpt-4o-search-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-4o-search-preview'),
                        ClauseEquals(equals='gpt-4o-search-preview-2025-03-11'),
                    ]
                ),
                name='GPT-4o Search Preview',
                description='GPT-4o Search Previewis a specialized model for web search in Chat Completions. It is trained to understand and execute web search queries.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='gpt-4o-transcribe',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-4o-transcribe'), ClauseEquals(equals='gpt-4o-transcribe-diarize')]
                ),
                context_window=16000,
                price_comments='See https://developers.openai.com/api/docs/models/gpt-4o-transcribe-diarize.',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10'), input_audio_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='gpt-4o:extended',
                match=ClauseEquals(equals='gpt-4o:extended'),
                name='GPT-4o (extended)',
                description='GPT-4o ("o" for "omni") is OpenAI\'s latest AI model, supporting both text and image inputs with text outputs. It maintains the intelligence level of GPT-4 Turbo while being twice as fast and 50% more cost-effective. GPT-4o also offers improved performance in processing non-English languages and enhanced visual capabilities.',
                prices=ModelPrice(input_mtok=Decimal('6'), output_mtok=Decimal('18')),
            ),
            ModelInfo(
                id='gpt-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5'),
                        ClauseEquals(equals='gpt-5-2025-08-07'),
                        ClauseEquals(equals='gpt-5-chat'),
                        ClauseEquals(equals='gpt-5-chat-latest'),
                        ClauseEquals(equals='gpt-5-codex'),
                    ]
                ),
                name='GPT-5',
                description="GPT-5 is OpenAI's flagship model for coding, reasoning, and agentic tasks across domains.",
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.125'),
                    output_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5-image',
                match=ClauseEquals(equals='gpt-5-image'),
                price_comments='Seen on OpenRouter before OpenAI',
                prices=ModelPrice(input_mtok=Decimal('10'), cache_read_mtok=Decimal('1.25'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='gpt-5-image-mini',
                match=ClauseEquals(equals='gpt-5-image-mini'),
                price_comments='Seen on OpenRouter before OpenAI',
                prices=ModelPrice(input_mtok=Decimal('2.5'), cache_read_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-5-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-5-mini'), ClauseEquals(equals='gpt-5-mini-2025-08-07')]),
                name='GPT-5 mini',
                description="GPT-5 mini is a faster, more cost-efficient version of GPT-5. It's great for well-defined tasks and precise prompts.",
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'),
                    cache_read_mtok=Decimal('0.025'),
                    output_mtok=Decimal('2'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5-nano',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-5-nano'), ClauseStartsWith(starts_with='gpt-5-nano-')]),
                name='GPT-5 nano',
                description="GPT-5 Nano is OpenAI's fastest, cheapest version of GPT-5. It's great for summarization and classification tasks.",
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.05'),
                    cache_read_mtok=Decimal('0.005'),
                    output_mtok=Decimal('0.4'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5-pro',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-5-pro'), ClauseEquals(equals='gpt-5-pro-2025-10-06')]),
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    output_mtok=Decimal('120'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.1'),
                        ClauseEquals(equals='gpt-5.1-2025-11-13'),
                        ClauseEquals(equals='gpt-5.1-codex'),
                        ClauseEquals(equals='gpt-5.1-codex-max'),
                        ClauseEquals(equals='gpt-5.1-chat'),
                        ClauseEquals(equals='gpt-5.1-chat-latest'),
                        ClauseEquals(equals='gpt-5-1'),
                        ClauseEquals(equals='gpt-5-1-2025-11-13'),
                        ClauseEquals(equals='gpt-5-1-codex'),
                        ClauseEquals(equals='gpt-5-1-codex-max'),
                        ClauseEquals(equals='gpt-5-1-chat'),
                        ClauseEquals(equals='gpt-5-1-chat-latest'),
                    ]
                ),
                name='GPT-5.1',
                description='The best model for coding and agentic tasks across industries',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.125'),
                    output_mtok=Decimal('10'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.1-codex-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.1-codex-mini'),
                        ClauseEquals(equals='gpt-5.1-mini'),
                        ClauseEquals(equals='gpt-5-1-codex-mini'),
                        ClauseEquals(equals='gpt-5-1-mini'),
                    ]
                ),
                name='GPT-5.1 Codex Mini',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('2')
                ),
            ),
            ModelInfo(
                id='gpt-5.2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.2'),
                        ClauseEquals(equals='gpt-5.2-2025-12-11'),
                        ClauseEquals(equals='gpt-5-2'),
                        ClauseEquals(equals='gpt-5-2-2025-12-11'),
                        ClauseEquals(equals='gpt-5.2-chat'),
                        ClauseEquals(equals='gpt-5.2-chat-latest'),
                        ClauseEquals(equals='gpt-5-2-chat'),
                        ClauseEquals(equals='gpt-5-2-chat-latest'),
                        ClauseEquals(equals='gpt-5.2-codex'),
                        ClauseEquals(equals='gpt-5-2-codex'),
                    ]
                ),
                name='GPT-5.2',
                description='The best model for coding and agentic tasks across industries',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'),
                    cache_read_mtok=Decimal('0.175'),
                    output_mtok=Decimal('14'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.2-pro',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.2-pro'),
                        ClauseEquals(equals='gpt-5.2-pro-2025-12-11'),
                        ClauseEquals(equals='gpt-5-2-pro-2025-12-11'),
                    ]
                ),
                description='Version of GPT-5.2 that produces smarter and more precise responses.',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('21'),
                    output_mtok=Decimal('168'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.3'),
                        ClauseEquals(equals='gpt-5-3'),
                        ClauseEquals(equals='gpt-5.3-chat'),
                        ClauseEquals(equals='gpt-5.3-chat-latest'),
                        ClauseEquals(equals='gpt-5-3-chat'),
                        ClauseEquals(equals='gpt-5-3-chat-latest'),
                    ]
                ),
                name='GPT-5.3 Chat',
                description='GPT-5.3 Instant model used in ChatGPT',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='gpt-5.3-codex',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-5.3-codex'), ClauseEquals(equals='gpt-5-3-codex')]),
                name='GPT-5.3-Codex',
                description='The most capable agentic coding model',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='gpt-5.4',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.4'),
                        ClauseEquals(equals='gpt-5.4-2026-03-05'),
                        ClauseEquals(equals='gpt-5-4'),
                        ClauseEquals(equals='gpt-5-4-2026-03-05'),
                    ]
                ),
                name='GPT-5.4',
                description="OpenAI's most capable model with a 1.05M token context window.",
                context_window=1050000,
                price_comments='OpenAI lists the standard rates for prompts with <272K input tokens, so the long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Ref: https://developers.openai.com/api/docs/pricing',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=271999, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=271999, price=Decimal('0.5'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=271999, price=Decimal('22.5'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.4-image-2',
                match=ClauseEquals(equals='gpt-5.4-image-2'),
                name='GPT-5.4 Image 2',
                description="GPT-5.4 Image 2 combines OpenAI's GPT-5.4 model with state-of-the-art image generation capabilities from GPT Image 2. It enables rich multimodal workflows across reasoning, coding, and image generation.",
                price_comments='Imported from OpenRouter pricing; verify against OpenAI pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('8'), cache_read_mtok=Decimal('2'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='gpt-5.4-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.4-mini'),
                        ClauseEquals(equals='gpt-5.4-mini-2026-03-17'),
                        ClauseEquals(equals='gpt-5-4-mini'),
                        ClauseEquals(equals='gpt-5-4-mini-2026-03-17'),
                    ]
                ),
                name='GPT-5.4 mini',
                description='Our strongest mini model yet for coding, computer use, and subagents.',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'),
                    cache_read_mtok=Decimal('0.075'),
                    output_mtok=Decimal('4.5'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.4-nano',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.4-nano'),
                        ClauseEquals(equals='gpt-5.4-nano-2026-03-17'),
                        ClauseEquals(equals='gpt-5-4-nano'),
                        ClauseEquals(equals='gpt-5-4-nano-2026-03-17'),
                    ]
                ),
                name='GPT-5.4 nano',
                description='Our cheapest GPT-5.4-class model for simple high-volume tasks.',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'),
                    cache_read_mtok=Decimal('0.02'),
                    output_mtok=Decimal('1.25'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.4-pro',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.4-pro'),
                        ClauseEquals(equals='gpt-5.4-pro-2026-03-05'),
                        ClauseEquals(equals='gpt-5-4-pro'),
                        ClauseEquals(equals='gpt-5-4-pro-2026-03-05'),
                    ]
                ),
                name='GPT-5.4 Pro',
                description='Version of GPT-5.4 that produces smarter and more precise responses.',
                context_window=1050000,
                price_comments='OpenAI lists the standard rates for prompts with <272K input tokens, so the long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Ref: https://developers.openai.com/api/docs/pricing',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=271999, price=Decimal('60'))]),
                    output_mtok=TieredPrices(base=Decimal('180'), tiers=[Tier(start=271999, price=Decimal('270'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.5'),
                        ClauseEquals(equals='gpt-5.5-2026-04-23'),
                        ClauseEquals(equals='gpt-5.5-2026-04-24'),
                        ClauseEquals(equals='gpt-5-5'),
                        ClauseEquals(equals='gpt-5-5-2026-04-23'),
                        ClauseEquals(equals='gpt-5-5-2026-04-24'),
                        ClauseEquals(equals='gpt-5.5-chat'),
                        ClauseEquals(equals='gpt-5.5-chat-latest'),
                        ClauseEquals(equals='gpt-5-5-chat'),
                        ClauseEquals(equals='gpt-5-5-chat-latest'),
                        ClauseEquals(equals='gpt-5.5-codex'),
                        ClauseEquals(equals='gpt-5-5-codex'),
                    ]
                ),
                name='GPT-5.5',
                description='The best model for coding and agentic tasks across industries',
                context_window=1000000,
                price_comments='OpenAI lists the standard rates for prompts with <272K input tokens, so the long-context rates begin at exactly 272K and bill the full request at 2x input and cached input and 1.5x output. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Ref: https://developers.openai.com/api/docs/models/gpt-5.5',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=271999, price=Decimal('10'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=271999, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=271999, price=Decimal('45'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.5-pro',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.5-pro'),
                        ClauseEquals(equals='gpt-5.5-pro-2026-04-23'),
                        ClauseEquals(equals='gpt-5-5-pro'),
                        ClauseEquals(equals='gpt-5-5-pro-2026-04-23'),
                    ]
                ),
                name='GPT-5.5 Pro',
                description='Version of GPT-5.5 that produces smarter and more precise responses.',
                context_window=1000000,
                price_comments='OpenAI lists the standard rates for prompts with <272K input tokens, so the long-context rates begin at exactly 272K and bill the full request at 2x input and 1.5x output. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Ref: https://developers.openai.com/api/docs/pricing',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=271999, price=Decimal('60'))]),
                    output_mtok=TieredPrices(base=Decimal('180'), tiers=[Tier(start=271999, price=Decimal('270'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-luna',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.6-luna'),
                        ClauseEquals(equals='gpt-5-6-luna'),
                        ClauseRegex(regex='^gpt-5\\.6-luna-\\d{4}-\\d{2}-\\d{2}$'),
                        ClauseRegex(regex='^gpt-5-6-luna-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.6 Luna',
                description='GPT-5.6 model optimized for cost-sensitive workloads.',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. OpenAI lists the standard rates for prompts with <272K input tokens, so the 2x input and 1.5x output long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. OpenAI reduced Luna prices by 80% on 2026-07-30. Refs: https://developers.openai.com/api/docs/models/gpt-5.6-luna, https://developers.openai.com/api/docs/changelog',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('1'), tiers=[Tier(start=271999, price=Decimal('2'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('1.25'), tiers=[Tier(start=271999, price=Decimal('2.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.1'), tiers=[Tier(start=271999, price=Decimal('0.2'))]
                            ),
                            output_mtok=TieredPrices(base=Decimal('6'), tiers=[Tier(start=271999, price=Decimal('9'))]),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 7, 30)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('0.2'), tiers=[Tier(start=271999, price=Decimal('0.4'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('0.25'), tiers=[Tier(start=271999, price=Decimal('0.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.02'), tiers=[Tier(start=271999, price=Decimal('0.04'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('1.2'), tiers=[Tier(start=271999, price=Decimal('1.8'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gpt-5.6-sol',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.6-sol'),
                        ClauseEquals(equals='gpt-5-6-sol'),
                        ClauseEquals(equals='gpt-5.6'),
                        ClauseEquals(equals='gpt-5-6'),
                        ClauseRegex(regex='^gpt-5\\.6-sol-\\d{4}-\\d{2}-\\d{2}$'),
                        ClauseRegex(regex='^gpt-5-6-sol-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.6 Sol',
                description='Frontier model for complex professional work.',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. OpenAI lists the standard rates for prompts with <272K input tokens, so the 2x input and 1.5x output long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. OpenAI reduced Sol input prices by 20% and output prices by 33% on 2026-08-21. Refs: https://developers.openai.com/api/docs/models/gpt-5.6-sol, https://developers.openai.com/api/docs/changelog',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=271999, price=Decimal('10'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('6.25'), tiers=[Tier(start=271999, price=Decimal('12.5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.5'), tiers=[Tier(start=271999, price=Decimal('1'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('30'), tiers=[Tier(start=271999, price=Decimal('45'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 21)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('4'), tiers=[Tier(start=271999, price=Decimal('8'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('5'), tiers=[Tier(start=271999, price=Decimal('10'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.4'), tiers=[Tier(start=271999, price=Decimal('0.8'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('20'), tiers=[Tier(start=271999, price=Decimal('30'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gpt-5.6-terra',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-5.6-terra'),
                        ClauseEquals(equals='gpt-5-6-terra'),
                        ClauseRegex(regex='^gpt-5\\.6-terra-\\d{4}-\\d{2}-\\d{2}$'),
                        ClauseRegex(regex='^gpt-5-6-terra-\\d{4}-\\d{2}-\\d{2}$'),
                    ]
                ),
                name='GPT-5.6 Terra',
                description='GPT-5.6 model that balances intelligence and cost.',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. OpenAI lists the standard rates for prompts with <272K input tokens, so the 2x input and 1.5x output long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. OpenAI reduced Terra prices by 20% on 2026-07-30. Refs: https://developers.openai.com/api/docs/models/gpt-5.6-terra, https://developers.openai.com/api/docs/changelog',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=TieredPrices(
                                base=Decimal('2.5'), tiers=[Tier(start=271999, price=Decimal('5'))]
                            ),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('3.125'), tiers=[Tier(start=271999, price=Decimal('6.25'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.25'), tiers=[Tier(start=271999, price=Decimal('0.5'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('15'), tiers=[Tier(start=271999, price=Decimal('22.5'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 7, 30)),
                        prices=ModelPrice(
                            input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=271999, price=Decimal('4'))]),
                            cache_write_mtok=TieredPrices(
                                base=Decimal('2.5'), tiers=[Tier(start=271999, price=Decimal('5'))]
                            ),
                            cache_read_mtok=TieredPrices(
                                base=Decimal('0.2'), tiers=[Tier(start=271999, price=Decimal('0.4'))]
                            ),
                            output_mtok=TieredPrices(
                                base=Decimal('12'), tiers=[Tier(start=271999, price=Decimal('18'))]
                            ),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='gpt-6-astra',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-6-astra'), ClauseRegex(regex='^gpt-6-astra-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-6 Astra',
                description='Our most capable model, built for the hardest end-to-end work.',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. OpenAI lists the standard rates for prompts with <272K input tokens, so the 2x input and 1.5x output long-context rates begin at exactly 272K. Tier starts are encoded as 271999 because the pricing engines select a tier when the token count is greater than start. Refs: https://developers.openai.com/api/docs/models/gpt-6-astra, https://developers.openai.com/api/docs/pricing',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('10'), tiers=[Tier(start=271999, price=Decimal('20'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('12.5'), tiers=[Tier(start=271999, price=Decimal('25'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('1'), tiers=[Tier(start=271999, price=Decimal('2'))]),
                    output_mtok=TieredPrices(base=Decimal('50'), tiers=[Tier(start=271999, price=Decimal('75'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-6-luna',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-6-luna'), ClauseRegex(regex='^gpt-6-luna-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-6 Luna',
                description='Efficient model for focused, high-volume tasks.',
                context_window=1050000,
                price_comments='Cache reads cost 10% of input; cache writes cost 1.25x. Prompts with more than 272K input tokens cost 2x for input and cache tokens and 1.5x for output. Tier starts use 272000 because the pricing engines select a tier when token count exceeds start. Ref: https://developers.openai.com/api/docs/models/gpt-6-luna',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.1'), tiers=[Tier(start=272000, price=Decimal('0.2'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.125'), tiers=[Tier(start=272000, price=Decimal('0.25'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.01'), tiers=[Tier(start=272000, price=Decimal('0.02'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=272000, price=Decimal('0.75'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-6-sol',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-6-sol'), ClauseRegex(regex='^gpt-6-sol-\\d{4}-\\d{2}-\\d{2}$')]
                ),
                name='GPT-6 Sol',
                description='Model for complex coding and agentic workflows.',
                context_window=1050000,
                price_comments='Cache reads cost 10% of input; cache writes cost 1.25x. Prompts with more than 272K input tokens cost 2x for input and cache tokens and 1.5x for output. Tier starts use 272000 because the pricing engines select a tier when token count exceeds start. Ref: https://developers.openai.com/api/docs/models/gpt-6-sol',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=272000, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('10'), tiers=[Tier(start=272000, price=Decimal('15'))]),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-audio',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-audio'),
                        ClauseEquals(equals='gpt-audio-2025-08-28'),
                        ClauseEquals(equals='gpt-audio-1.5'),
                    ]
                ),
                name='GPT Audio',
                description="The gpt-audio model is OpenAI's first generally available audio model. The new snapshot features an upgraded decoder for more natural-sounding voices and maintains better voice consistency.",
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('2.5'),
                    output_mtok=Decimal('10'),
                    input_audio_mtok=Decimal('32'),
                    output_audio_mtok=Decimal('64'),
                ),
            ),
            ModelInfo(
                id='gpt-audio-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-audio-mini'),
                        ClauseEquals(equals='gpt-audio-mini-2025-10-06'),
                        ClauseEquals(equals='gpt-audio-mini-2025-12-15'),
                    ]
                ),
                name='GPT Audio Mini',
                description='A cost-efficient version of GPT Audio. The new snapshot features an upgraded decoder for more natural sounding voices and maintains better voice consistency.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    output_mtok=Decimal('2.4'),
                    input_audio_mtok=Decimal('10'),
                    output_audio_mtok=Decimal('20'),
                ),
            ),
            ModelInfo(
                id='gpt-chat-latest',
                match=ClauseEquals(equals='gpt-chat-latest'),
                name='GPT Chat Latest',
                description="GPT Chat Latest points to OpenAI's stable API alias `chat-latest` that always resolves to the latest Instant chat model used in ChatGPT.",
                price_comments='Imported from OpenRouter pricing; verify against OpenAI pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('5'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='gpt-image-1',
                match=ClauseEquals(equals='gpt-image-1'),
                name='GPT Image 1',
                description="OpenAI's previous image generation model.",
                price_comments='See https://developers.openai.com/api/docs/models/gpt-image-1.',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('1.25'),
                    output_mtok=Decimal('40'),
                    input_image_mtok=Decimal('10'),
                    cache_image_read_mtok=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='gpt-image-1-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-image-1-mini')]),
                name='GPT Image 1 Mini',
                description='A cost-efficient image generation model from OpenAI with text input pricing.',
                price_comments='See https://developers.openai.com/api/docs/models/gpt-image-1-mini.',
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('8'),
                    input_image_mtok=Decimal('2.5'),
                    cache_image_read_mtok=Decimal('0.25'),
                ),
            ),
            ModelInfo(
                id='gpt-image-1.5',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='gpt-image-1.5'), ClauseEquals(equals='gpt-image-1.5-2025-12-16')]
                ),
                name='GPT Image 1.5',
                description='An improved image generation model from OpenAI supporting text input and output pricing.',
                price_comments='See https://developers.openai.com/api/docs/models/gpt-image-1.5.',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('1.25'),
                    output_mtok=Decimal('10'),
                    input_image_mtok=Decimal('8'),
                    cache_image_read_mtok=Decimal('2'),
                    output_image_mtok=Decimal('32'),
                ),
            ),
            ModelInfo(
                id='gpt-image-2',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-image-2'), ClauseEquals(equals='gpt-image-2-2026-04-21')]),
                name='GPT Image 2',
                description="OpenAI's latest image generation model with text input pricing.",
                price_comments='See https://developers.openai.com/api/docs/models/gpt-image-2.',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('1.25'),
                    output_mtok=Decimal('30'),
                    input_image_mtok=Decimal('8'),
                    cache_image_read_mtok=Decimal('2'),
                ),
            ),
            ModelInfo(
                id='gpt-oss-120b',
                match=ClauseEquals(equals='gpt-oss-120b'),
                name='gpt-oss-120b',
                description='gpt-oss-120b is an open-weight, 117B-parameter Mixture-of-Experts (MoE) language model from OpenAI designed for high-reasoning, agentic, and general-purpose production use cases.',
                context_window=131072,
                price_comments='Imported from OpenRouter pricing; verify against OpenAI pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.039'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='gpt-oss-20b',
                match=ClauseEquals(equals='gpt-oss-20b'),
                name='gpt-oss-20b',
                description='gpt-oss-20b is an open-weight 21B parameter model released by OpenAI under the Apache 2.0 license. It uses a Mixture-of-Experts (MoE) architecture with 3.6B active parameters per forward pass.',
                context_window=131072,
                price_comments='Imported from OpenRouter pricing; verify against OpenAI pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('0.029'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='gpt-oss-safeguard-20b',
                match=ClauseEquals(equals='gpt-oss-safeguard-20b'),
                name='gpt-oss-safeguard-20b',
                description='gpt-oss-safeguard-20b is a safety reasoning model from OpenAI built upon gpt-oss-20b. This open-weight, 21B-parameter Mixture-of-Experts (MoE) model offers lower latency for safety tasks.',
                context_window=131072,
                price_comments='Imported from OpenRouter pricing; verify against OpenAI pricing when native API pricing is published.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.037'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='gpt-realtime',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-realtime'),
                        ClauseEquals(equals='gpt-realtime-2025-08-28'),
                        ClauseEquals(equals='gpt-realtime-1.5'),
                    ]
                ),
                context_window=32000,
                price_comments='See https://developers.openai.com/api/docs/models/gpt-realtime.',
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_read_mtok=Decimal('0.4'),
                    output_mtok=Decimal('16'),
                    input_audio_mtok=Decimal('32'),
                    cache_audio_read_mtok=Decimal('0.4'),
                    output_audio_mtok=Decimal('64'),
                    input_image_mtok=Decimal('5'),
                    cache_image_read_mtok=Decimal('0.5'),
                ),
            ),
            ModelInfo(
                id='gpt-realtime-2',
                match=ClauseOr(or_=[ClauseEquals(equals='gpt-realtime-2'), ClauseEquals(equals='gpt-realtime-2.1')]),
                context_window=128000,
                price_comments='See https://developers.openai.com/api/docs/models/gpt-realtime-2.1.',
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_read_mtok=Decimal('0.4'),
                    output_mtok=Decimal('24'),
                    input_audio_mtok=Decimal('32'),
                    cache_audio_read_mtok=Decimal('0.4'),
                    output_audio_mtok=Decimal('64'),
                    input_image_mtok=Decimal('5'),
                    cache_image_read_mtok=Decimal('0.5'),
                ),
            ),
            ModelInfo(
                id='gpt-realtime-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gpt-realtime-mini'),
                        ClauseEquals(equals='gpt-realtime-2.1-mini'),
                        ClauseEquals(equals='gpt-realtime-mini-2025-12-15'),
                        ClauseEquals(equals='gpt-realtime-mini-2025-10-06'),
                    ]
                ),
                price_comments='See https://developers.openai.com/api/docs/models/gpt-realtime-2.1-mini.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'),
                    cache_read_mtok=Decimal('0.06'),
                    output_mtok=Decimal('2.4'),
                    input_audio_mtok=Decimal('10'),
                    cache_audio_read_mtok=Decimal('0.3'),
                    output_audio_mtok=Decimal('20'),
                    input_image_mtok=Decimal('0.8'),
                    cache_image_read_mtok=Decimal('0.08'),
                ),
            ),
            ModelInfo(
                id='gpt-transcribe',
                match=ClauseEquals(equals='gpt-transcribe'),
                price_comments='See https://developers.openai.com/api/docs/models/gpt-transcribe.',
                prices=ModelPrice(audio_hours=Decimal('0.27'), input_audio_hours=Decimal('0.27')),
            ),
            ModelInfo(
                id='moderation',
                match=ClauseContains(contains='moderation'),
                description='All OpenAI moderation models and endpoints are free of charge',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='o1',
                match=ClauseOr(or_=[ClauseEquals(equals='o1'), ClauseEquals(equals='o1-2024-12-17')]),
                name='o1',
                description='O1 is a model that offers a balance between cost and performance.',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('15'), cache_read_mtok=Decimal('7.5'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='o1-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-mini'), ClauseEquals(equals='o1-mini-2024-09-12')]),
                name='o1 mini',
                description='O1 Mini is a model that offers a balance between cost and performance.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='o1-preview',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-preview'), ClauseEquals(equals='o1-preview-2024-09-12')]),
                name='o1 preview',
                description="Preview release of OpenAI's first reasoning model.",
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('15'), cache_read_mtok=Decimal('7.5'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='o1-pro',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-pro'), ClauseEquals(equals='o1-pro-2025-03-19')]),
                name='o1-pro',
                description='The o1 series of models are trained with reinforcement learning to think before they answer and perform complex reasoning. The o1-pro model uses more compute to think harder and provide consistently better answers.',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('150'), output_mtok=Decimal('600')),
            ),
            ModelInfo(
                id='o3',
                match=ClauseOr(or_=[ClauseEquals(equals='o3'), ClauseEquals(equals='o3-2025-04-16')]),
                name='o3',
                description='o3 is a well-rounded and powerful model across domains. It sets a new standard for math, science, coding, and visual reasoning tasks. It also excels at technical writing and instruction-following. Use it to think through multi-step problems that involve analysis across text, code, and images. Note that BYOK is required for this model. Set up here: https://openrouter.ai/settings/integrations',
                context_window=200000,
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('10'),
                            cache_read_mtok=Decimal('0.5'),
                            output_mtok=Decimal('40'),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2025, 6, 10)),
                        prices=ModelPrice(
                            input_mtok=Decimal('2'),
                            cache_read_mtok=Decimal('0.5'),
                            output_mtok=Decimal('8'),
                            web_searches_kcount=Decimal('10'),
                            storage_searches_kcount=Decimal('2.5'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='o3-deep-research',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='o3-deep-research'), ClauseEquals(equals='o3-deep-research-2025-06-26')]
                ),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('10'), cache_read_mtok=Decimal('2.5'), output_mtok=Decimal('40')),
            ),
            ModelInfo(
                id='o3-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='o3-mini'),
                        ClauseEquals(equals='o3-mini-2025-01-31'),
                        ClauseEquals(equals='o3-mini-high'),
                    ]
                ),
                name='o3 Mini',
                description='OpenAI o3-mini is a cost-efficient language model optimized for STEM reasoning tasks, particularly excelling in science, mathematics, and coding.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='o3-pro',
                match=ClauseOr(or_=[ClauseEquals(equals='o3-pro'), ClauseEquals(equals='o3-pro-2025-06-10')]),
                name='o3 Pro',
                description='The o-series of models are trained with reinforcement learning to think before they answer and perform complex reasoning. The o3-pro model uses more compute to think harder and provide consistently better answers.',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('20'), output_mtok=Decimal('80')),
            ),
            ModelInfo(
                id='o4-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='o4-mini-2025-04-16'),
                        ClauseEquals(equals='o4-mini-high'),
                        ClauseEquals(equals='o4-mini'),
                    ]
                ),
                name='o4 Mini High',
                description='OpenAI o4-mini-high is the same model as o4-mini with reasoning_effort set to high.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'),
                    cache_read_mtok=Decimal('0.275'),
                    output_mtok=Decimal('4.4'),
                    web_searches_kcount=Decimal('10'),
                    storage_searches_kcount=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='o4-mini-deep-research',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='o4-mini-deep-research'),
                        ClauseEquals(equals='o4-mini-deep-research-2025-06-26'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='text-davinci-002',
                match=ClauseEquals(equals='text-davinci-002'),
                prices=ModelPrice(input_mtok=Decimal('20'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='text-davinci-003',
                match=ClauseEquals(equals='text-davinci-003'),
                prices=ModelPrice(input_mtok=Decimal('20'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='text-embedding-3-large',
                match=ClauseEquals(equals='text-embedding-3-large'),
                name='text embedding 3',
                description='Text Embedding 3 is a model that offers a balance between cost and performance.',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.13')),
            ),
            ModelInfo(
                id='text-embedding-3-small',
                match=ClauseEquals(equals='text-embedding-3-small'),
                name='text embedding 3',
                description='Text Embedding 3 is a model that offers a balance between cost and performance.',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='text-embedding-ada-002',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='text-embedding-ada'),
                        ClauseEquals(equals='text-embedding-ada-002'),
                        ClauseEquals(equals='text-embedding-ada-002-v2'),
                    ]
                ),
                name='text embedding ada',
                description='Text Embedding Ada is a model that offers a balance between cost and performance.',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='whisper-1',
                match=ClauseEquals(equals='whisper-1'),
                price_comments='See https://developers.openai.com/api/docs/models/whisper-1.',
                prices=ModelPrice(audio_hours=Decimal('0.36'), input_audio_hours=Decimal('0.36')),
            ),
        ],
    ),
    Provider(
        id='openrouter',
        name='OpenRouter',
        api_pattern='https://(api\\.)?openrouter\\.ai',
        pricing_urls=['https://openrouter.ai/models'],
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='01-ai/yi-large',
                match=ClauseEquals(equals='01-ai/yi-large'),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='aetherwiing/mn-starcannon-12b',
                match=ClauseEquals(equals='aetherwiing/mn-starcannon-12b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='agentica-org/deepcoder-14b-preview:free',
                match=ClauseEquals(equals='agentica-org/deepcoder-14b-preview:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='ai21/jamba-1-5-large',
                match=ClauseEquals(equals='ai21/jamba-1-5-large'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='ai21/jamba-1-5-mini',
                match=ClauseEquals(equals='ai21/jamba-1-5-mini'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='ai21/jamba-1.6-large',
                match=ClauseEquals(equals='ai21/jamba-1.6-large'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='ai21/jamba-1.6-mini',
                match=ClauseEquals(equals='ai21/jamba-1.6-mini'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='ai21/jamba-instruct',
                match=ClauseEquals(equals='ai21/jamba-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='ai21/jamba-large-1.7',
                match=ClauseEquals(equals='ai21/jamba-large-1.7'),
                name='Jamba Large 1.7',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='aion-labs/aion-1.0',
                match=ClauseEquals(equals='aion-labs/aion-1.0'),
                name='Aion-1.0',
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='aion-labs/aion-1.0-mini',
                match=ClauseEquals(equals='aion-labs/aion-1.0-mini'),
                name='Aion-1.0-Mini',
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('1.4')),
            ),
            ModelInfo(
                id='aion-labs/aion-2.0',
                match=ClauseEquals(equals='aion-labs/aion-2.0'),
                name='Aion-2.0',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('1.6')
                ),
            ),
            ModelInfo(
                id='aion-labs/aion-rp-llama-3.1-8b',
                match=ClauseEquals(equals='aion-labs/aion-rp-llama-3.1-8b'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='alfredpros/codellama-7b-instruct-solidity',
                match=ClauseEquals(equals='alfredpros/codellama-7b-instruct-solidity'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='all-hands/openhands-lm-32b-v0.1',
                match=ClauseEquals(equals='all-hands/openhands-lm-32b-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('2.6'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='allenai/molmo-7b-d:free', match=ClauseEquals(equals='allenai/molmo-7b-d:free'), prices=ModelPrice()
            ),
            ModelInfo(
                id='allenai/olmo-3-32b-think',
                match=ClauseEquals(equals='allenai/olmo-3-32b-think'),
                name='Olmo 3 32B Think',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='alpindale/goliath-120b',
                match=ClauseEquals(equals='alpindale/goliath-120b'),
                prices=ModelPrice(input_mtok=Decimal('6.5625'), output_mtok=Decimal('9.375')),
            ),
            ModelInfo(
                id='alpindale/magnum-72b',
                match=ClauseEquals(equals='alpindale/magnum-72b'),
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2.25')),
            ),
            ModelInfo(
                id='amazon/nova-2-lite-v1',
                match=ClauseEquals(equals='amazon/nova-2-lite-v1'),
                name='Nova 2 Lite',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='amazon/nova-lite-v1',
                match=ClauseEquals(equals='amazon/nova-lite-v1'),
                context_window=300000,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='amazon/nova-micro-v1',
                match=ClauseEquals(equals='amazon/nova-micro-v1'),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.035'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='amazon/nova-premier-v1',
                match=ClauseEquals(equals='amazon/nova-premier-v1'),
                name='Nova Premier 1.0',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('2.5'), cache_read_mtok=Decimal('0.625'), output_mtok=Decimal('12.5')
                ),
            ),
            ModelInfo(
                id='amazon/nova-pro-v1',
                match=ClauseEquals(equals='amazon/nova-pro-v1'),
                context_window=300000,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('3.2')),
            ),
            ModelInfo(
                id='anthracite-org/magnum-v2-72b',
                match=ClauseEquals(equals='anthracite-org/magnum-v2-72b'),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='anthracite-org/magnum-v4-72b',
                match=ClauseEquals(equals='anthracite-org/magnum-v4-72b'),
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2.25')),
            ),
            ModelInfo(
                id='anthropic/claude-2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-2'),
                        ClauseEquals(equals='anthropic/claude-2.0'),
                        ClauseEquals(equals='anthropic/claude-2.0:beta'),
                        ClauseEquals(equals='anthropic/claude-2.1'),
                        ClauseEquals(equals='anthropic/claude-2.1:beta'),
                        ClauseEquals(equals='anthropic/claude-2:beta'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('8'), output_mtok=Decimal('24')),
            ),
            ModelInfo(
                id='anthropic/claude-3-haiku',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3-haiku'),
                        ClauseEquals(equals='anthropic/claude-3-haiku:beta'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='anthropic/claude-3-opus',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3-opus'),
                        ClauseEquals(equals='anthropic/claude-3-opus:beta'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('15'), output_mtok=Decimal('75')),
            ),
            ModelInfo(
                id='anthropic/claude-3-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3-sonnet'),
                        ClauseEquals(equals='anthropic/claude-3-sonnet:beta'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='anthropic/claude-3.5-haiku',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3.5-haiku'),
                        ClauseEquals(equals='anthropic/claude-3.5-haiku-20241022'),
                        ClauseEquals(equals='anthropic/claude-3.5-haiku-20241022:beta'),
                        ClauseEquals(equals='anthropic/claude-3.5-haiku:beta'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='anthropic/claude-3.5-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3.5-sonnet'),
                        ClauseEquals(equals='anthropic/claude-3.5-sonnet-20240620'),
                        ClauseEquals(equals='anthropic/claude-3.5-sonnet-20240620:beta'),
                        ClauseEquals(equals='anthropic/claude-3.5-sonnet:beta'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='anthropic/claude-3.7-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-3.7-sonnet'),
                        ClauseEquals(equals='anthropic/claude-3.7-sonnet:beta'),
                        ClauseEquals(equals='anthropic/claude-3.7-sonnet:thinking'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='anthropic/claude-fable-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-fable-5'),
                        ClauseEquals(equals='anthropic/claude-fable-5:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-fable-5.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-fable-5.1'),
                        ClauseEquals(equals='anthropic/claude-fable-5.1:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Cache hits are 0.025x base input (not the usual 0.1x), unique to Fable 5.1 and Mythos 5.1. Ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Cache-read rate confirmed via https://openrouter.ai/api/v1/models',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-haiku-4.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-haiku-4.5'),
                        ClauseEquals(equals='anthropic/claude-4.5-haiku-20251001'),
                        ClauseEquals(equals='anthropic/claude-4.5-haiku-20251001:beta'),
                        ClauseEquals(equals='anthropic/claude-haiku-4.5-20251001'),
                        ClauseEquals(equals='anthropic/claude-haiku-4.5-20251001:beta'),
                        ClauseEquals(equals='anthropic/claude-haiku-4.5:beta'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1'),
                    cache_write_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('5'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-4'),
                        ClauseEquals(equals='anthropic/claude-opus-4.1'),
                    ]
                ),
                name='Claude Opus 4',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-4.5'),
                        ClauseEquals(equals='anthropic/claude-4.5-opus-20251124'),
                        ClauseEquals(equals='anthropic/claude-4.5-opus-20251124:beta'),
                        ClauseEquals(equals='anthropic/claude-opus-4.5-20251124'),
                        ClauseEquals(equals='anthropic/claude-opus-4.5-20251124:beta'),
                        ClauseEquals(equals='anthropic/claude-opus-4.5:beta'),
                    ]
                ),
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.6',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-4.6'),
                        ClauseEquals(equals='anthropic/claude-4.6-opus-20260205'),
                        ClauseEquals(equals='anthropic/claude-4.6-opus-20260205:beta'),
                        ClauseEquals(equals='anthropic/claude-opus-4.6-20260205'),
                        ClauseEquals(equals='anthropic/claude-opus-4.6-20260205:beta'),
                        ClauseEquals(equals='anthropic/claude-opus-4.6:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.6-fast',
                match=ClauseEquals(equals='anthropic/claude-opus-4.6-fast'),
                name='Claude Opus 4.6 (Fast)',
                prices=ModelPrice(
                    input_mtok=Decimal('30'),
                    cache_write_mtok=Decimal('37.5'),
                    cache_read_mtok=Decimal('3'),
                    output_mtok=Decimal('150'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.7',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-4.7'),
                        ClauseEquals(equals='anthropic/claude-opus-4.7:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.7-fast',
                match=ClauseEquals(equals='anthropic/claude-opus-4.7-fast'),
                name='Claude Opus 4.7 (Fast)',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('30'),
                    cache_write_mtok=Decimal('37.5'),
                    cache_read_mtok=Decimal('3'),
                    output_mtok=Decimal('150'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.8',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-4.8'),
                        ClauseEquals(equals='anthropic/claude-opus-4.8:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-4.8-fast',
                match=ClauseEquals(equals='anthropic/claude-opus-4.8-fast'),
                name='Claude Opus 4.8 (Fast)',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-5'),
                        ClauseEquals(equals='anthropic/claude-opus-5:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('5'),
                    cache_write_mtok=Decimal('6.25'),
                    cache_read_mtok=Decimal('0.5'),
                    output_mtok=Decimal('25'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-5-fast',
                match=ClauseEquals(equals='anthropic/claude-opus-5-fast'),
                name='Claude Opus 5 (Fast)',
                context_window=1000000,
                price_comments='Fast mode premium pricing, applies across the full context window. Ref: https://platform.claude.com/docs/en/about-claude/pricing#fast-mode-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-opus-5.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-opus-5.5'),
                        ClauseEquals(equals='anthropic/claude-opus-5.5:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Cache hits are 0.05x base input (not the usual 0.1x), unique to Opus 5.5. Ref: https://platform.claude.com/docs/en/about-claude/pricing#model-pricing Cache-read rate confirmed via https://openrouter.ai/api/v1/models',
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_write_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('20'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-sonnet-4',
                match=ClauseEquals(equals='anthropic/claude-sonnet-4'),
                name='Claude Sonnet 4',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-sonnet-4.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-sonnet-4.5'),
                        ClauseEquals(equals='anthropic/claude-4.5-sonnet-20250929'),
                        ClauseEquals(equals='anthropic/claude-4.5-sonnet-20250929:beta'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.5-20250929'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.5-20250929:beta'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.5:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Tiered pricing: Unlike 4.6 models, Sonnet 4.5 has long-context surcharge. Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('3'), tiers=[Tier(start=200000, price=Decimal('6'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('3.75'), tiers=[Tier(start=200000, price=Decimal('7.5'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=200000, price=Decimal('0.6'))]),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=200000, price=Decimal('22.5'))]),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-sonnet-4.6',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-sonnet-4.6'),
                        ClauseEquals(equals='anthropic/claude-4.6-sonnet-20260217'),
                        ClauseEquals(equals='anthropic/claude-4.6-sonnet-20260217:beta'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.6-20260217'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.6-20260217:beta'),
                        ClauseEquals(equals='anthropic/claude-sonnet-4.6:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='anthropic/claude-sonnet-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='anthropic/claude-sonnet-5'),
                        ClauseEquals(equals='anthropic/claude-sonnet-5:beta'),
                    ]
                ),
                context_window=1000000,
                price_comments='Flat pricing across the full 1M context window (no tiered pricing). Anthropic made the introductory $2/$10 per MTok rates permanent and cancelled the previously scheduled increase. Refs: https://openrouter.ai/anthropic/claude-sonnet-5, https://platform.claude.com/docs/en/about-claude/pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='anubis-pro-105b-v1',
                match=ClauseEquals(equals='anubis-pro-105b-v1'),
                name='Anubis Pro 105B V1',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='arcee-ai/coder-large',
                match=ClauseEquals(equals='arcee-ai/coder-large'),
                name='Coder Large',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='arcee-ai/trinity-large-thinking',
                match=ClauseEquals(equals='arcee-ai/trinity-large-thinking'),
                name='Trinity Large Thinking',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.22'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('0.85')
                ),
            ),
            ModelInfo(
                id='arcee-ai/trinity-mini',
                match=ClauseEquals(equals='arcee-ai/trinity-mini'),
                name='Trinity Mini',
                prices=ModelPrice(input_mtok=Decimal('0.045'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='arcee-ai/virtuoso-large',
                match=ClauseEquals(equals='arcee-ai/virtuoso-large'),
                name='Virtuoso Large',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.75'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='arcee-blitz',
                match=ClauseEquals(equals='arcee-blitz'),
                name='Arcee Blitz',
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='arliai/qwq-32b-arliai-rpr-v1:free',
                match=ClauseEquals(equals='arliai/qwq-32b-arliai-rpr-v1:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='baidu/ernie-4.5-vl-424b-a47b',
                match=ClauseEquals(equals='baidu/ernie-4.5-vl-424b-a47b'),
                name='ERNIE 4.5 VL 424B A47B',
                context_window=123000,
                prices=ModelPrice(input_mtok=Decimal('0.42'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='bytedance-research/ui-tars-72b:free',
                match=ClauseEquals(equals='bytedance-research/ui-tars-72b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='bytedance-seed/seed-1.6',
                match=ClauseEquals(equals='bytedance-seed/seed-1.6'),
                name='Seed 1.6',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='bytedance-seed/seed-1.6-flash',
                match=ClauseEquals(equals='bytedance-seed/seed-1.6-flash'),
                name='Seed 1.6 Flash',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='bytedance-seed/seed-2.0-lite',
                match=ClauseEquals(equals='bytedance-seed/seed-2.0-lite'),
                name='Seed-2.0-Lite',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='bytedance-seed/seed-2.0-mini',
                match=ClauseEquals(equals='bytedance-seed/seed-2.0-mini'),
                name='Seed-2.0-Mini',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='bytedance/ui-tars-1.5-7b',
                match=ClauseEquals(equals='bytedance/ui-tars-1.5-7b'),
                name='UI-TARS 7B',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='caller-large',
                match=ClauseEquals(equals='caller-large'),
                name='Caller Large',
                prices=ModelPrice(input_mtok=Decimal('0.55'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='chatgpt-4o-latest',
                match=ClauseEquals(equals='chatgpt-4o-latest'),
                name='ChatGPT-4o',
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='claude-2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='claude-2'),
                        ClauseEquals(equals='claude-2.0'),
                        ClauseEquals(equals='claude-2.0:beta'),
                        ClauseEquals(equals='claude-2.1'),
                        ClauseEquals(equals='claude-2.1:beta'),
                        ClauseEquals(equals='claude-2:beta'),
                    ]
                ),
                name='Claude v2',
                prices=ModelPrice(input_mtok=Decimal('8'), output_mtok=Decimal('24')),
            ),
            ModelInfo(
                id='claude-3-opus',
                match=ClauseOr(or_=[ClauseEquals(equals='claude-3-opus'), ClauseEquals(equals='claude-3-opus:beta')]),
                name='Claude 3 Opus',
                prices=ModelPrice(
                    input_mtok=Decimal('15'),
                    cache_write_mtok=Decimal('18.75'),
                    cache_read_mtok=Decimal('1.5'),
                    output_mtok=Decimal('75'),
                ),
            ),
            ModelInfo(
                id='claude-3-sonnet',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='claude-3-sonnet'), ClauseEquals(equals='claude-3-sonnet:beta')]
                ),
                name='Claude 3 Sonnet',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='claude-3.5-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='claude-3.5-sonnet'),
                        ClauseEquals(equals='claude-3.5-sonnet-20240620'),
                        ClauseEquals(equals='claude-3.5-sonnet-20240620:beta'),
                        ClauseEquals(equals='claude-3.5-sonnet:beta'),
                    ]
                ),
                name='Claude 3.5 Sonnet',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='claude-3.7-sonnet',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='claude-3.7-sonnet'),
                        ClauseEquals(equals='claude-3.7-sonnet:beta'),
                        ClauseEquals(equals='claude-3.7-sonnet:thinking'),
                    ]
                ),
                name='Claude 3.7 Sonnet',
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='codellama-7b-instruct-solidity',
                match=ClauseEquals(equals='codellama-7b-instruct-solidity'),
                name='CodeLLaMa 7B Instruct Solidity',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='codestral-2501',
                match=ClauseEquals(equals='codestral-2501'),
                name='Codestral 2501',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='codex-mini',
                match=ClauseEquals(equals='codex-mini'),
                name='Codex Mini',
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.375'), output_mtok=Decimal('6')
                ),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin-mistral-24b-venice-edition:free',
                match=ClauseEquals(equals='cognitivecomputations/dolphin-mistral-24b-venice-edition:free'),
                name='Uncensored (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin-mixtral-8x22b',
                match=ClauseEquals(equals='cognitivecomputations/dolphin-mixtral-8x22b'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin-mixtral-8x7b',
                match=ClauseEquals(equals='cognitivecomputations/dolphin-mixtral-8x7b'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin3.0-mistral-24b:free',
                match=ClauseEquals(equals='cognitivecomputations/dolphin3.0-mistral-24b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='cognitivecomputations/dolphin3.0-r1-mistral-24b:free',
                match=ClauseEquals(equals='cognitivecomputations/dolphin3.0-r1-mistral-24b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='cohere/command',
                match=ClauseEquals(equals='cohere/command'),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='cohere/command-a',
                match=ClauseEquals(equals='cohere/command-a'),
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='cohere/command-r',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='cohere/command-r'), ClauseEquals(equals='cohere/command-r-03-2024')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='cohere/command-r-08-2024',
                match=ClauseEquals(equals='cohere/command-r-08-2024'),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='cohere/command-r-plus',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='cohere/command-r-plus'),
                        ClauseEquals(equals='cohere/command-r-plus-04-2024'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='cohere/command-r-plus-08-2024',
                match=ClauseEquals(equals='cohere/command-r-plus-08-2024'),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='cohere/command-r7b-12-2024',
                match=ClauseEquals(equals='cohere/command-r7b-12-2024'),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.0375'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='command',
                match=ClauseEquals(equals='command'),
                name='Command',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='command-r',
                match=ClauseOr(or_=[ClauseEquals(equals='command-r'), ClauseEquals(equals='command-r-03-2024')]),
                name='Command R',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='command-r-plus',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='command-r-plus'), ClauseEquals(equals='command-r-plus-04-2024')]
                ),
                name='Command R+',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='deepcoder-14b-preview:free',
                match=ClauseEquals(equals='deepcoder-14b-preview:free'),
                name='Deepcoder 14B Preview (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepcogito/cogito-v2.1-671b',
                match=ClauseEquals(equals='deepcogito/cogito-v2.1-671b'),
                name='Cogito v2.1 671B',
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='deephermes-3-llama-3-8b-preview:free',
                match=ClauseEquals(equals='deephermes-3-llama-3-8b-preview:free'),
                name='DeepHermes 3 Llama 3 8B Preview (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-chat-v3-0324:free',
                match=ClauseEquals(equals='deepseek-chat-v3-0324:free'),
                name='DeepSeek V3 0324 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-chat:free',
                match=ClauseEquals(equals='deepseek-chat:free'),
                name='DeepSeek V3 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-prover-v2',
                match=ClauseEquals(equals='deepseek-prover-v2'),
                name='DeepSeek Prover V2',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('2.18')),
            ),
            ModelInfo(
                id='deepseek-r1-0528-qwen3-8b',
                match=ClauseEquals(equals='deepseek-r1-0528-qwen3-8b'),
                name='Deepseek R1 0528 Qwen3 8B',
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='deepseek-r1-0528-qwen3-8b:free',
                match=ClauseEquals(equals='deepseek-r1-0528-qwen3-8b:free'),
                name='Deepseek R1 0528 Qwen3 8B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1-0528:free',
                match=ClauseEquals(equals='deepseek-r1-0528:free'),
                name='R1 0528 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1-distill-llama-70b:free',
                match=ClauseEquals(equals='deepseek-r1-distill-llama-70b:free'),
                name='R1 Distill Llama 70B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1-distill-llama-8b',
                match=ClauseEquals(equals='deepseek-r1-distill-llama-8b'),
                name='R1 Distill Llama 8B',
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='deepseek-r1-distill-qwen-1.5b',
                match=ClauseEquals(equals='deepseek-r1-distill-qwen-1.5b'),
                name='R1 Distill Qwen 1.5B',
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='deepseek-r1-distill-qwen-14b',
                match=ClauseEquals(equals='deepseek-r1-distill-qwen-14b'),
                name='R1 Distill Qwen 14B',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='deepseek-r1-distill-qwen-14b:free',
                match=ClauseEquals(equals='deepseek-r1-distill-qwen-14b:free'),
                name='R1 Distill Qwen 14B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1-distill-qwen-32b:free',
                match=ClauseEquals(equals='deepseek-r1-distill-qwen-32b:free'),
                name='R1 Distill Qwen 32B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1-distill-qwen-7b',
                match=ClauseEquals(equals='deepseek-r1-distill-qwen-7b'),
                name='R1 Distill Qwen 7B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='deepseek-r1:free',
                match=ClauseEquals(equals='deepseek-r1:free'),
                name='R1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-r1t-chimera:free',
                match=ClauseEquals(equals='deepseek-r1t-chimera:free'),
                name='DeepSeek R1T Chimera (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek-v3-base:free',
                match=ClauseEquals(equals='deepseek-v3-base:free'),
                name='DeepSeek V3 Base (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-chat',
                match=ClauseEquals(equals='deepseek/deepseek-chat'),
                name='DeepSeek V3',
                prices=ModelPrice(input_mtok=Decimal('0.38'), output_mtok=Decimal('0.89')),
            ),
            ModelInfo(
                id='deepseek/deepseek-chat-v3-0324',
                match=ClauseEquals(equals='deepseek/deepseek-chat-v3-0324'),
                name='DeepSeek V3 0324',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='deepseek/deepseek-chat-v3-0324:free',
                match=ClauseEquals(equals='deepseek/deepseek-chat-v3-0324:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-chat-v3.1',
                match=ClauseEquals(equals='deepseek/deepseek-chat-v3.1'),
                name='DeepSeek V3.1',
                prices=ModelPrice(
                    input_mtok=Decimal('0.21'), cache_read_mtok=Decimal('0.13'), output_mtok=Decimal('0.79')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-chat:free',
                match=ClauseEquals(equals='deepseek/deepseek-chat:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1',
                match=ClauseEquals(equals='deepseek/deepseek-r1'),
                name='R1',
                context_window=64000,
                prices=ModelPrice(input_mtok=Decimal('0.45'), output_mtok=Decimal('2.15')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-0528',
                match=ClauseEquals(equals='deepseek/deepseek-r1-0528'),
                name='R1 0528',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('2.15')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-llama-70b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-llama-70b'),
                name='R1 Distill Llama 70B',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-llama-70b:free',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-llama-70b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-llama-8b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-llama-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-1.5b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-1.5b'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-14b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-14b'),
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-14b:free',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-14b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-32b',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-32b'),
                name='R1 Distill Qwen 32B',
                prices=ModelPrice(input_mtok=Decimal('0.12'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-distill-qwen-32b:free',
                match=ClauseEquals(equals='deepseek/deepseek-r1-distill-qwen-32b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1-zero:free',
                match=ClauseEquals(equals='deepseek/deepseek-r1-zero:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-r1:free',
                match=ClauseEquals(equals='deepseek/deepseek-r1:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-v3-base:free',
                match=ClauseEquals(equals='deepseek/deepseek-v3-base:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='deepseek/deepseek-v3.1-terminus',
                match=ClauseEquals(equals='deepseek/deepseek-v3.1-terminus'),
                name='DeepSeek V3.1 Terminus',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.23'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='deepseek/deepseek-v3.2',
                match=ClauseEquals(equals='deepseek/deepseek-v3.2'),
                name='DeepSeek V3.2',
                prices=ModelPrice(input_mtok=Decimal('0.2288'), output_mtok=Decimal('0.3432')),
            ),
            ModelInfo(
                id='deepseek/deepseek-v3.2-exp',
                match=ClauseEquals(equals='deepseek/deepseek-v3.2-exp'),
                name='DeepSeek V3.2 Exp',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.41')),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-flash',
                match=ClauseEquals(equals='deepseek/deepseek-v4-flash'),
                name='DeepSeek V4 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.0983'), cache_read_mtok=Decimal('0.0197'), output_mtok=Decimal('0.1966')
                ),
            ),
            ModelInfo(
                id='deepseek/deepseek-v4-pro',
                match=ClauseEquals(equals='deepseek/deepseek-v4-pro'),
                name='DeepSeek V4 Pro',
                prices=ModelPrice(
                    input_mtok=Decimal('0.435'), cache_read_mtok=Decimal('0.003625'), output_mtok=Decimal('0.87')
                ),
            ),
            ModelInfo(
                id='devstral-small',
                match=ClauseEquals(equals='devstral-small'),
                name='Devstral Small',
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='devstral-small:free',
                match=ClauseEquals(equals='devstral-small:free'),
                name='Devstral Small (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='dobby-mini-unhinged-plus-llama-3.1-8b',
                match=ClauseEquals(equals='dobby-mini-unhinged-plus-llama-3.1-8b'),
                name='Dobby Mini Plus Llama 3.1 8B',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='dolphin-mixtral-8x22b',
                match=ClauseEquals(equals='dolphin-mixtral-8x22b'),
                name='Dolphin 2.9.2 Mixtral 8x22B 🐬',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='dolphin3.0-mistral-24b:free',
                match=ClauseEquals(equals='dolphin3.0-mistral-24b:free'),
                name='Dolphin3.0 Mistral 24B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='dolphin3.0-r1-mistral-24b:free',
                match=ClauseEquals(equals='dolphin3.0-r1-mistral-24b:free'),
                name='Dolphin3.0 R1 Mistral 24B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='eleutherai/llemma_7b',
                match=ClauseEquals(equals='eleutherai/llemma_7b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='essentialai/rnj-1-instruct',
                match=ClauseEquals(equals='essentialai/rnj-1-instruct'),
                name='Rnj 1 Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='eva-llama-3.33-70b',
                match=ClauseEquals(equals='eva-llama-3.33-70b'),
                name='EVA Llama 3.33 70B',
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='eva-qwen-2.5-32b',
                match=ClauseEquals(equals='eva-qwen-2.5-32b'),
                name='EVA Qwen2.5 32B',
                prices=ModelPrice(input_mtok=Decimal('2.6'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='eva-qwen-2.5-72b',
                match=ClauseEquals(equals='eva-qwen-2.5-72b'),
                name='EVA Qwen2.5 72B',
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='eva-unit-01/eva-llama-3.33-70b',
                match=ClauseEquals(equals='eva-unit-01/eva-llama-3.33-70b'),
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='eva-unit-01/eva-qwen-2.5-32b',
                match=ClauseEquals(equals='eva-unit-01/eva-qwen-2.5-32b'),
                prices=ModelPrice(input_mtok=Decimal('2.6'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='eva-unit-01/eva-qwen-2.5-72b',
                match=ClauseEquals(equals='eva-unit-01/eva-qwen-2.5-72b'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='featherless/qwerky-72b:free',
                match=ClauseEquals(equals='featherless/qwerky-72b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='fimbulvetr-11b-v2',
                match=ClauseEquals(equals='fimbulvetr-11b-v2'),
                name='Fimbulvetr 11B v2',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='gemini-2.0-flash-001',
                match=ClauseEquals(equals='gemini-2.0-flash-001'),
                name='Gemini 2.0 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'),
                    cache_write_mtok=Decimal('0.1833'),
                    cache_read_mtok=Decimal('0.025'),
                    output_mtok=Decimal('0.4'),
                ),
            ),
            ModelInfo(
                id='gemini-2.0-flash-exp:free',
                match=ClauseEquals(equals='gemini-2.0-flash-exp:free'),
                name='Gemini 2.0 Flash Experimental (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemini-2.0-flash-lite-001',
                match=ClauseEquals(equals='gemini-2.0-flash-lite-001'),
                name='Gemini 2.0 Flash Lite',
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='gemini-2.5-flash-lite-preview-06-17',
                match=ClauseEquals(equals='gemini-2.5-flash-lite-preview-06-17'),
                name='Gemini 2.5 Flash Lite Preview 06-17',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='gemini-2.5-flash-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='gemini-2.5-flash-preview'),
                        ClauseEquals(equals='gemini-2.5-flash-preview-05-20'),
                    ]
                ),
                name='Gemini 2.5 Flash Preview 04-17',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'),
                    cache_write_mtok=Decimal('0.2333'),
                    cache_read_mtok=Decimal('0.0375'),
                    output_mtok=Decimal('0.6'),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-flash-preview-05-20:thinking',
                match=ClauseEquals(equals='gemini-2.5-flash-preview-05-20:thinking'),
                name='Gemini 2.5 Flash Preview 05-20 (thinking)',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'),
                    cache_write_mtok=Decimal('0.2333'),
                    cache_read_mtok=Decimal('0.0375'),
                    output_mtok=Decimal('3.5'),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-flash-preview:thinking',
                match=ClauseEquals(equals='gemini-2.5-flash-preview:thinking'),
                name='Gemini 2.5 Flash Preview 04-17 (thinking)',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'),
                    cache_write_mtok=Decimal('0.2333'),
                    cache_read_mtok=Decimal('0.0375'),
                    output_mtok=Decimal('3.5'),
                ),
            ),
            ModelInfo(
                id='gemini-2.5-pro-exp-03-25',
                match=ClauseEquals(equals='gemini-2.5-pro-exp-03-25'),
                name='Gemini 2.5 Pro Experimental',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemini-flash-1.5',
                match=ClauseEquals(equals='gemini-flash-1.5'),
                name='Gemini 1.5 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'),
                    cache_write_mtok=Decimal('0.1583'),
                    cache_read_mtok=Decimal('0.01875'),
                    output_mtok=Decimal('0.3'),
                ),
            ),
            ModelInfo(
                id='gemini-flash-1.5-8b',
                match=ClauseEquals(equals='gemini-flash-1.5-8b'),
                name='Gemini 1.5 Flash 8B',
                prices=ModelPrice(
                    input_mtok=Decimal('0.0375'),
                    cache_write_mtok=Decimal('0.0583'),
                    cache_read_mtok=Decimal('0.01'),
                    output_mtok=Decimal('0.15'),
                ),
            ),
            ModelInfo(
                id='gemini-pro-1.5',
                match=ClauseEquals(equals='gemini-pro-1.5'),
                name='Gemini 1.5 Pro',
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='gemma-2-9b-it',
                match=ClauseEquals(equals='gemma-2-9b-it'),
                name='Gemma 2 9B',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='gemma-2-9b-it:free',
                match=ClauseEquals(equals='gemma-2-9b-it:free'),
                name='Gemma 2 9B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-3-12b-it:free',
                match=ClauseEquals(equals='gemma-3-12b-it:free'),
                name='Gemma 3 12B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-3-27b-it:free',
                match=ClauseEquals(equals='gemma-3-27b-it:free'),
                name='Gemma 3 27B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-3-4b-it:free',
                match=ClauseEquals(equals='gemma-3-4b-it:free'),
                name='Gemma 3 4B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='gemma-3n-e4b-it:free',
                match=ClauseEquals(equals='gemma-3n-e4b-it:free'),
                name='Gemma 3n 4B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='glm-4-32b',
                match=ClauseEquals(equals='glm-4-32b'),
                name='GLM 4 32B',
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='glm-4-32b:free',
                match=ClauseEquals(equals='glm-4-32b:free'),
                name='GLM 4 32B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='glm-4.5-air:free',
                match=ClauseEquals(equals='glm-4.5-air:free'),
                name='GLM 4.5 Air (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='glm-5v-turbo',
                match=ClauseEquals(equals='glm-5v-turbo'),
                name='GLM 5V Turbo',
                prices=ModelPrice(input_mtok=Decimal('1.2'), cache_read_mtok=Decimal('0.24'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='glm-z1-32b',
                match=ClauseEquals(equals='glm-z1-32b'),
                name='GLM Z1 32B',
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='glm-z1-32b:free',
                match=ClauseEquals(equals='glm-z1-32b:free'),
                name='GLM Z1 32B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='glm-z1-rumination-32b',
                match=ClauseEquals(equals='glm-z1-rumination-32b'),
                name='GLM Z1 Rumination 32B',
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='goliath-120b',
                match=ClauseEquals(equals='goliath-120b'),
                name='Goliath 120B',
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('12.5')),
            ),
            ModelInfo(
                id='google/gemini-2.0-flash-001',
                match=ClauseEquals(equals='google/gemini-2.0-flash-001'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='google/gemini-2.0-flash-exp:free',
                match=ClauseEquals(equals='google/gemini-2.0-flash-exp:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemini-2.0-flash-lite-001',
                match=ClauseEquals(equals='google/gemini-2.0-flash-lite-001'),
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='google/gemini-2.0-flash-thinking-exp-1219:free',
                match=ClauseEquals(equals='google/gemini-2.0-flash-thinking-exp-1219:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemini-2.0-flash-thinking-exp:free',
                match=ClauseEquals(equals='google/gemini-2.0-flash-thinking-exp:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash',
                match=ClauseEquals(equals='google/gemini-2.5-flash'),
                name='Gemini 2.5 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_write_mtok=Decimal('0.3833'),
                    cache_read_mtok=Decimal('0.075'),
                    output_mtok=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-image',
                match=ClauseEquals(equals='google/gemini-2.5-flash-image'),
                name='Nano Banana (Gemini 2.5 Flash Image)',
                context_window=32768,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.03'),
                    output_mtok=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-lite',
                match=ClauseEquals(equals='google/gemini-2.5-flash-lite'),
                name='Gemini 2.5 Flash Lite',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.01'),
                    output_mtok=Decimal('0.4'),
                ),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-lite-preview-09-2025',
                match=ClauseEquals(equals='google/gemini-2.5-flash-lite-preview-09-2025'),
                name='Gemini 2.5 Flash Lite Preview 09-2025',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-preview',
                match=ClauseEquals(equals='google/gemini-2.5-flash-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-preview-09-2025',
                match=ClauseEquals(equals='google/gemini-2.5-flash-preview-09-2025'),
                name='Gemini 2.5 Flash Preview 09-2025',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'),
                    cache_write_mtok=Decimal('0.383'),
                    cache_read_mtok=Decimal('0.075'),
                    output_mtok=Decimal('2.5'),
                ),
            ),
            ModelInfo(
                id='google/gemini-2.5-flash-preview:thinking',
                match=ClauseEquals(equals='google/gemini-2.5-flash-preview:thinking'),
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('3.5')),
            ),
            ModelInfo(
                id='google/gemini-2.5-pro',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemini-2.5-pro'),
                        ClauseEquals(equals='google/gemini-2.5-pro-preview'),
                        ClauseEquals(equals='google/gemini-2.5-pro-preview-05-06'),
                    ]
                ),
                name='Gemini 2.5 Pro',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'),
                    cache_write_mtok=Decimal('1.625'),
                    cache_read_mtok=Decimal('0.31'),
                    output_mtok=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='google/gemini-2.5-pro-exp-03-25:free',
                match=ClauseEquals(equals='google/gemini-2.5-pro-exp-03-25:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemini-2.5-pro-preview-03-25',
                match=ClauseEquals(equals='google/gemini-2.5-pro-preview-03-25'),
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='google/gemini-3-flash-preview',
                match=ClauseEquals(equals='google/gemini-3-flash-preview'),
                name='Gemini 3 Flash Preview',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.05'),
                    output_mtok=Decimal('3'),
                ),
            ),
            ModelInfo(
                id='google/gemini-3-pro-image-preview',
                match=ClauseEquals(equals='google/gemini-3-pro-image-preview'),
                name='Nano Banana Pro (Gemini 3 Pro Image Preview)',
                context_window=65536,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='google/gemini-3.1-flash-image-preview',
                match=ClauseEquals(equals='google/gemini-3.1-flash-image-preview'),
                name='Nano Banana 2 (Gemini 3.1 Flash Image Preview)',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='google/gemini-3.1-flash-lite',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemini-3.1-flash-lite'),
                        ClauseEquals(equals='google/gemini-3.1-flash-lite-preview'),
                    ]
                ),
                name='Gemini 3.1 Flash Lite',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.025'),
                    output_mtok=Decimal('1.5'),
                ),
            ),
            ModelInfo(
                id='google/gemini-3.1-pro-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemini-3.1-pro-preview'),
                        ClauseEquals(equals='google/gemini-3.1-pro-preview-customtools'),
                    ]
                ),
                name='Gemini 3.1 Pro Preview',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='google/gemini-3.5-flash',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/gemini-3.5-flash'),
                        ClauseRegex(regex='^google/gemini-3\\.5-flash-\\d{8}$'),
                    ]
                ),
                name='Gemini 3.5 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.15'),
                    output_mtok=Decimal('9'),
                ),
            ),
            ModelInfo(
                id='google/gemini-flash-1.5',
                match=ClauseEquals(equals='google/gemini-flash-1.5'),
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='google/gemini-flash-1.5-8b',
                match=ClauseEquals(equals='google/gemini-flash-1.5-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.0375'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='google/gemini-flash-1.5-8b-exp',
                match=ClauseEquals(equals='google/gemini-flash-1.5-8b-exp'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemini-pro',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='google/gemini-pro'), ClauseEquals(equals='google/gemini-pro-vision')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='google/gemini-pro-1.5',
                match=ClauseEquals(equals='google/gemini-pro-1.5'),
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='google/gemma-2-27b-it',
                match=ClauseEquals(equals='google/gemma-2-27b-it'),
                name='Gemma 2 27B',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='google/gemma-2-9b-it',
                match=ClauseEquals(equals='google/gemma-2-9b-it'),
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.07')),
            ),
            ModelInfo(
                id='google/gemma-2-9b-it:free',
                match=ClauseEquals(equals='google/gemma-2-9b-it:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-3-12b-it',
                match=ClauseEquals(equals='google/gemma-3-12b-it'),
                name='Gemma 3 12B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='google/gemma-3-12b-it:free',
                match=ClauseEquals(equals='google/gemma-3-12b-it:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-3-1b-it:free',
                match=ClauseEquals(equals='google/gemma-3-1b-it:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-3-27b-it',
                match=ClauseEquals(equals='google/gemma-3-27b-it'),
                name='Gemma 3 27B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='google/gemma-3-27b-it:free',
                match=ClauseEquals(equals='google/gemma-3-27b-it:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-3-4b-it',
                match=ClauseEquals(equals='google/gemma-3-4b-it'),
                name='Gemma 3 4B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='google/gemma-3-4b-it:free',
                match=ClauseEquals(equals='google/gemma-3-4b-it:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-3n-e4b-it',
                match=ClauseEquals(equals='google/gemma-3n-e4b-it'),
                name='Gemma 3n 4B',
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='google/gemma-4-26b-a4b-it',
                match=ClauseEquals(equals='google/gemma-4-26b-a4b-it'),
                name='Gemma 4 26B A4B',
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.33')),
            ),
            ModelInfo(
                id='google/gemma-4-26b-a4b-it:free',
                match=ClauseEquals(equals='google/gemma-4-26b-a4b-it:free'),
                name='Gemma 4 26B A4B  (free)',
                context_window=262144,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/gemma-4-31b-it',
                match=ClauseEquals(equals='google/gemma-4-31b-it'),
                name='Gemma 4 31B',
                context_window=262144,
                price_comments='OpenRouter reports the cheapest active endpoint for this model. It was Venice ($0.12/$0.36) when checked on 2026-06-09 and DeepInfra ($0.09/$0.34) on 2026-08-27; OpenRouter publishes no history, so the dated entry starts on the day the lower rate was verified. Ref: https://openrouter.ai/api/v1/models/google/gemma-4-31b-it/endpoints',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('0.12'), cache_read_mtok=Decimal('0.09'), output_mtok=Decimal('0.36')
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 27)),
                        prices=ModelPrice(
                            input_mtok=Decimal('0.09'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.34')
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='google/gemma-4-31b-it:free',
                match=ClauseEquals(equals='google/gemma-4-31b-it:free'),
                name='Gemma 4 31B (free)',
                context_window=262144,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/learnlm-1.5-pro-experimental:free',
                match=ClauseEquals(equals='google/learnlm-1.5-pro-experimental:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/lyria-3-clip-preview',
                match=ClauseEquals(equals='google/lyria-3-clip-preview'),
                name='Lyria 3 Clip Preview',
                context_window=1048576,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/lyria-3-pro-preview',
                match=ClauseEquals(equals='google/lyria-3-pro-preview'),
                name='Lyria 3 Pro Preview',
                context_window=1048576,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='google/palm-2-chat-bison',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/palm-2-chat-bison'),
                        ClauseEquals(equals='google/palm-2-chat-bison-32k'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='google/palm-2-codechat-bison',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='google/palm-2-codechat-bison'),
                        ClauseEquals(equals='google/palm-2-codechat-bison-32k'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-3.5-turbo-1106',
                match=ClauseEquals(equals='gpt-3.5-turbo-1106'),
                name='GPT-3.5 Turbo 16k (older v1106)',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='gpt-4-1106-preview',
                match=ClauseEquals(equals='gpt-4-1106-preview'),
                name='GPT-4 Turbo (older v1106)',
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='gpt-4.5-preview',
                match=ClauseEquals(equals='gpt-4.5-preview'),
                name='GPT-4.5 (Preview)',
                prices=ModelPrice(
                    input_mtok=Decimal('75'), cache_read_mtok=Decimal('37.5'), output_mtok=Decimal('150')
                ),
            ),
            ModelInfo(
                id='gpt-4o:extended',
                match=ClauseEquals(equals='gpt-4o:extended'),
                name='GPT-4o (extended)',
                prices=ModelPrice(input_mtok=Decimal('6'), output_mtok=Decimal('18')),
            ),
            ModelInfo(
                id='grok-2-1212',
                match=ClauseEquals(equals='grok-2-1212'),
                name='Grok 2 1212',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='grok-2-vision-1212',
                match=ClauseEquals(equals='grok-2-vision-1212'),
                name='Grok 2 Vision 1212',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='grok-3',
                match=ClauseOr(or_=[ClauseEquals(equals='grok-3'), ClauseEquals(equals='grok-3-beta')]),
                name='Grok 3',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.75'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='grok-3-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='grok-3-mini'), ClauseEquals(equals='grok-3-mini-beta')]),
                name='Grok 3 Mini',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-beta',
                match=ClauseEquals(equals='grok-beta'),
                name='Grok Beta',
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='grok-vision-beta',
                match=ClauseEquals(equals='grok-vision-beta'),
                name='Grok Vision Beta',
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='gryphe/mythomax-l2-13b',
                match=ClauseEquals(equals='gryphe/mythomax-l2-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.065'), output_mtok=Decimal('0.065')),
            ),
            ModelInfo(
                id='hermes-2-pro-llama-3-8b',
                match=ClauseEquals(equals='hermes-2-pro-llama-3-8b'),
                name='Hermes 2 Pro - Llama-3 8B',
                prices=ModelPrice(input_mtok=Decimal('0.025'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='huggingfaceh4/zephyr-7b-beta:free',
                match=ClauseEquals(equals='huggingfaceh4/zephyr-7b-beta:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='ibm-granite/granite-4.0-h-micro',
                match=ClauseEquals(equals='ibm-granite/granite-4.0-h-micro'),
                name='Granite 4.0 Micro',
                context_window=131000,
                prices=ModelPrice(input_mtok=Decimal('0.017'), output_mtok=Decimal('0.112')),
            ),
            ModelInfo(
                id='ibm-granite/granite-4.1-8b',
                match=ClauseEquals(equals='ibm-granite/granite-4.1-8b'),
                name='Granite 4.1 8B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='inception/mercury-2',
                match=ClauseEquals(equals='inception/mercury-2'),
                name='Mercury 2',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('0.75')
                ),
            ),
            ModelInfo(
                id='inclusionai/ling-2.6-1t',
                match=ClauseEquals(equals='inclusionai/ling-2.6-1t'),
                name='Ling-2.6-1T',
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.625')
                ),
            ),
            ModelInfo(
                id='inclusionai/ling-2.6-flash',
                match=ClauseEquals(equals='inclusionai/ling-2.6-flash'),
                name='Ling-2.6-flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.01'), cache_read_mtok=Decimal('0.002'), output_mtok=Decimal('0.03')
                ),
            ),
            ModelInfo(
                id='inclusionai/ring-2.6-1t',
                match=ClauseEquals(equals='inclusionai/ring-2.6-1t'),
                name='Ring-2.6-1T',
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.625')
                ),
            ),
            ModelInfo(
                id='infermatic/mn-inferor-12b',
                match=ClauseEquals(equals='infermatic/mn-inferor-12b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='inflection/inflection-3-pi',
                match=ClauseEquals(equals='inflection/inflection-3-pi'),
                name='Inflection 3 Pi',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='inflection/inflection-3-productivity',
                match=ClauseEquals(equals='inflection/inflection-3-productivity'),
                name='Inflection 3 Productivity',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='internvl3-14b:free',
                match=ClauseEquals(equals='internvl3-14b:free'),
                name='InternVL3 14B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='internvl3-2b:free',
                match=ClauseEquals(equals='internvl3-2b:free'),
                name='InternVL3 2B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='jamba-1.6-large',
                match=ClauseEquals(equals='jamba-1.6-large'),
                name='Jamba 1.6 Large',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='jamba-1.6-mini',
                match=ClauseEquals(equals='jamba-1.6-mini'),
                name='Jamba Mini 1.6',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='jondurbin/airoboros-l2-70b',
                match=ClauseEquals(equals='jondurbin/airoboros-l2-70b'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='kimi-dev-72b:free',
                match=ClauseEquals(equals='kimi-dev-72b:free'),
                name='Kimi Dev 72b (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='kimi-vl-a3b-thinking:free',
                match=ClauseEquals(equals='kimi-vl-a3b-thinking:free'),
                name='Kimi VL A3B Thinking (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='kwaipilot/kat-coder-pro-v2',
                match=ClauseEquals(equals='kwaipilot/kat-coder-pro-v2'),
                name='KAT-Coder-Pro V2',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='l3-euryale-70b',
                match=ClauseEquals(equals='l3-euryale-70b'),
                name='Llama 3 Euryale 70B v2.1',
                prices=ModelPrice(input_mtok=Decimal('1.48'), output_mtok=Decimal('1.48')),
            ),
            ModelInfo(
                id='latitudegames/wayfarer-large-70b-llama-3.3',
                match=ClauseEquals(equals='latitudegames/wayfarer-large-70b-llama-3.3'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='lfm-3b',
                match=ClauseEquals(equals='lfm-3b'),
                name='LFM 3B',
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='lfm-40b',
                match=ClauseEquals(equals='lfm-40b'),
                name='LFM 40B MoE',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='lfm-7b',
                match=ClauseEquals(equals='lfm-7b'),
                name='LFM 7B',
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='liquid/lfm-2-24b-a2b',
                match=ClauseEquals(equals='liquid/lfm-2-24b-a2b'),
                name='LFM2-24B-A2B',
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='liquid/lfm-2.5-1.2b-instruct:free',
                match=ClauseEquals(equals='liquid/lfm-2.5-1.2b-instruct:free'),
                name='LFM2.5-1.2B-Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='liquid/lfm-2.5-1.2b-thinking:free',
                match=ClauseEquals(equals='liquid/lfm-2.5-1.2b-thinking:free'),
                name='LFM2.5-1.2B-Thinking (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='liquid/lfm-3b',
                match=ClauseEquals(equals='liquid/lfm-3b'),
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='liquid/lfm-40b',
                match=ClauseEquals(equals='liquid/lfm-40b'),
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='liquid/lfm-7b',
                match=ClauseEquals(equals='liquid/lfm-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='llama-3-lumimaid-70b',
                match=ClauseEquals(equals='llama-3-lumimaid-70b'),
                name='Llama 3 Lumimaid 70B',
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='llama-3-lumimaid-8b',
                match=ClauseEquals(equals='llama-3-lumimaid-8b'),
                name='Llama 3 Lumimaid 8B',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='llama-3.1-405b',
                match=ClauseEquals(equals='llama-3.1-405b'),
                name='Llama 3.1 405B (base)',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='llama-3.1-405b-instruct',
                match=ClauseEquals(equals='llama-3.1-405b-instruct'),
                name='Llama 3.1 405B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='llama-3.1-8b-instruct:free',
                match=ClauseEquals(equals='llama-3.1-8b-instruct:free'),
                name='Llama 3.1 8B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-3.1-lumimaid-70b',
                match=ClauseEquals(equals='llama-3.1-lumimaid-70b'),
                name='Lumimaid v0.2 70B',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='llama-3.1-lumimaid-8b',
                match=ClauseEquals(equals='llama-3.1-lumimaid-8b'),
                name='Lumimaid v0.2 8B',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='llama-3.1-nemotron-70b-instruct',
                match=ClauseEquals(equals='llama-3.1-nemotron-70b-instruct'),
                name='Llama 3.1 Nemotron 70B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.12'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='llama-3.1-nemotron-ultra-253b-v1',
                match=ClauseEquals(equals='llama-3.1-nemotron-ultra-253b-v1'),
                name='Llama 3.1 Nemotron Ultra 253B v1',
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='llama-3.1-nemotron-ultra-253b-v1:free',
                match=ClauseEquals(equals='llama-3.1-nemotron-ultra-253b-v1:free'),
                name='Llama 3.1 Nemotron Ultra 253B v1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-3.1-sonar-large-128k-online',
                match=ClauseEquals(equals='llama-3.1-sonar-large-128k-online'),
                name='Llama 3.1 Sonar 70B Online',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='llama-3.1-sonar-small-128k-online',
                match=ClauseEquals(equals='llama-3.1-sonar-small-128k-online'),
                name='Llama 3.1 Sonar 8B Online',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='llama-3.2-11b-vision-instruct:free',
                match=ClauseEquals(equals='llama-3.2-11b-vision-instruct:free'),
                name='Llama 3.2 11B Vision Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-3.2-1b-instruct:free',
                match=ClauseEquals(equals='llama-3.2-1b-instruct:free'),
                name='Llama 3.2 1B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-3.2-90b-vision-instruct',
                match=ClauseEquals(equals='llama-3.2-90b-vision-instruct'),
                name='Llama 3.2 90B Vision Instruct',
                prices=ModelPrice(input_mtok=Decimal('1.2'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='llama-3.3-8b-instruct:free',
                match=ClauseEquals(equals='llama-3.3-8b-instruct:free'),
                name='Llama 3.3 8B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-3.3-nemotron-super-49b-v1',
                match=ClauseEquals(equals='llama-3.3-nemotron-super-49b-v1'),
                name='Llama 3.3 Nemotron Super 49B v1',
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='llama-3.3-nemotron-super-49b-v1:free',
                match=ClauseEquals(equals='llama-3.3-nemotron-super-49b-v1:free'),
                name='Llama 3.3 Nemotron Super 49B v1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-4-maverick:free',
                match=ClauseEquals(equals='llama-4-maverick:free'),
                name='Llama 4 Maverick (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-4-scout:free',
                match=ClauseEquals(equals='llama-4-scout:free'),
                name='Llama 4 Scout (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='llama-guard-2-8b',
                match=ClauseEquals(equals='llama-guard-2-8b'),
                name='LlamaGuard 2 8B',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='llama3.1-typhoon2-70b-instruct',
                match=ClauseEquals(equals='llama3.1-typhoon2-70b-instruct'),
                name='Typhoon2 70B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='llemma_7b',
                match=ClauseEquals(equals='llemma_7b'),
                name='Llemma 7b',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='maestro-reasoning',
                match=ClauseEquals(equals='maestro-reasoning'),
                name='Maestro Reasoning',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('3.3')),
            ),
            ModelInfo(
                id='magistral-medium-2506',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='magistral-medium-2506'),
                        ClauseEquals(equals='magistral-medium-2506:thinking'),
                    ]
                ),
                name='Magistral Medium 2506',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='magistral-small-2506',
                match=ClauseEquals(equals='magistral-small-2506'),
                name='Magistral Small 2506',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='magnum-72b',
                match=ClauseEquals(equals='magnum-72b'),
                name='Magnum 72B',
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='magnum-v2-72b',
                match=ClauseEquals(equals='magnum-v2-72b'),
                name='Magnum v2 72B',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='mai-ds-r1:free',
                match=ClauseEquals(equals='mai-ds-r1:free'),
                name='MAI DS R1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mancer/weaver',
                match=ClauseEquals(equals='mancer/weaver'),
                context_window=8000,
                prices=ModelPrice(input_mtok=Decimal('1.125'), output_mtok=Decimal('1.125')),
            ),
            ModelInfo(
                id='mercury-coder-small-beta',
                match=ClauseEquals(equals='mercury-coder-small-beta'),
                name='Mercury Coder Small Beta',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='meta-llama/llama-2-13b-chat',
                match=ClauseEquals(equals='meta-llama/llama-2-13b-chat'),
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('0.22')),
            ),
            ModelInfo(
                id='meta-llama/llama-2-70b-chat',
                match=ClauseEquals(equals='meta-llama/llama-2-70b-chat'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='meta-llama/llama-3-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3-70b-instruct'),
                name='Llama 3 70B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='meta-llama/llama-3-8b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3-8b-instruct'),
                name='Llama 3 8B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.03'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-405b',
                match=ClauseEquals(equals='meta-llama/llama-3.1-405b'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-405b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.1-405b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-405b:free',
                match=ClauseEquals(equals='meta-llama/llama-3.1-405b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.1-70b-instruct'),
                name='Llama 3.1 70B Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.28')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-8b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.03')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.1-8b-instruct:free',
                match=ClauseEquals(equals='meta-llama/llama-3.1-8b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-11b-vision-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-11b-vision-instruct'),
                name='Llama 3.2 11B Vision Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.049'), output_mtok=Decimal('0.049')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-11b-vision-instruct:free',
                match=ClauseEquals(equals='meta-llama/llama-3.2-11b-vision-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-1b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-1b-instruct'),
                name='Llama 3.2 1B Instruct',
                context_window=60000,
                prices=ModelPrice(input_mtok=Decimal('0.005'), output_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-1b-instruct:free',
                match=ClauseEquals(equals='meta-llama/llama-3.2-1b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-3b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-3b-instruct'),
                name='Llama 3.2 3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-3b-instruct:free',
                match=ClauseEquals(equals='meta-llama/llama-3.2-3b-instruct:free'),
                name='Llama 3.2 3B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-3.2-90b-vision-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.2-90b-vision-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.3-70b-instruct',
                match=ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct'),
                name='Llama 3.3 70B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='meta-llama/llama-3.3-70b-instruct:free',
                match=ClauseEquals(equals='meta-llama/llama-3.3-70b-instruct:free'),
                name='Llama 3.3 70B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-4-maverick',
                match=ClauseEquals(equals='meta-llama/llama-4-maverick'),
                name='Llama 4 Maverick',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='meta-llama/llama-4-maverick:free',
                match=ClauseEquals(equals='meta-llama/llama-4-maverick:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-4-scout',
                match=ClauseEquals(equals='meta-llama/llama-4-scout'),
                name='Llama 4 Scout',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='meta-llama/llama-4-scout:free',
                match=ClauseEquals(equals='meta-llama/llama-4-scout:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='meta-llama/llama-guard-2-8b',
                match=ClauseEquals(equals='meta-llama/llama-guard-2-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='meta-llama/llama-guard-3-8b',
                match=ClauseEquals(equals='meta-llama/llama-guard-3-8b'),
                name='Llama Guard 3 8B',
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='meta-llama/llama-guard-4-12b',
                match=ClauseEquals(equals='meta-llama/llama-guard-4-12b'),
                name='Llama Guard 4 12B',
                context_window=163840,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='microsoft/phi-3-medium-128k-instruct',
                match=ClauseEquals(equals='microsoft/phi-3-medium-128k-instruct'),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='microsoft/phi-3-mini-128k-instruct',
                match=ClauseEquals(equals='microsoft/phi-3-mini-128k-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='microsoft/phi-3.5-mini-128k-instruct',
                match=ClauseEquals(equals='microsoft/phi-3.5-mini-128k-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='microsoft/phi-4',
                match=ClauseEquals(equals='microsoft/phi-4'),
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='microsoft/phi-4-mini-instruct',
                match=ClauseEquals(equals='microsoft/phi-4-mini-instruct'),
                name='Phi 4 Mini Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.35')),
            ),
            ModelInfo(
                id='microsoft/phi-4-multimodal-instruct',
                match=ClauseEquals(equals='microsoft/phi-4-multimodal-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='microsoft/wizardlm-2-7b',
                match=ClauseEquals(equals='microsoft/wizardlm-2-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.07')),
            ),
            ModelInfo(
                id='microsoft/wizardlm-2-8x22b',
                match=ClauseEquals(equals='microsoft/wizardlm-2-8x22b'),
                context_window=65535,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='midnight-rose-70b',
                match=ClauseEquals(equals='midnight-rose-70b'),
                name='Midnight Rose 70B',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='minimax-m1:extended',
                match=ClauseEquals(equals='minimax-m1:extended'),
                name='MiniMax M1 (extended)',
                prices=ModelPrice(input_mtok=Decimal('0.55'), output_mtok=Decimal('2.2')),
            ),
            ModelInfo(
                id='minimax/minimax-01',
                match=ClauseEquals(equals='minimax/minimax-01'),
                name='MiniMax-01',
                context_window=1000192,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='minimax/minimax-m1',
                match=ClauseEquals(equals='minimax/minimax-m1'),
                name='MiniMax M1',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('1.65')),
            ),
            ModelInfo(
                id='minimax/minimax-m2',
                match=ClauseEquals(equals='minimax/minimax-m2'),
                name='MiniMax M2',
                prices=ModelPrice(
                    input_mtok=Decimal('0.255'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('1')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m2-her',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='minimax/minimax-m2-her'),
                        ClauseEquals(equals='minimax/minimax-m2-her-20260123'),
                    ]
                ),
                name='MiniMax M2-her',
                context_window=65536,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m2.1',
                match=ClauseEquals(equals='minimax/minimax-m2.1'),
                name='MiniMax M2.1',
                context_window=204800,
                prices=ModelPrice(
                    input_mtok=Decimal('0.29'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('0.95')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m2.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='minimax/minimax-m2.5'),
                        ClauseEquals(equals='minimax/minimax-m2.5-20260211'),
                    ]
                ),
                name='MiniMax M2.5',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.9')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m2.7',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='minimax/minimax-m2.7'),
                        ClauseEquals(equals='minimax/minimax-m2.7-20260318'),
                    ]
                ),
                name='MiniMax M2.7',
                prices=ModelPrice(
                    input_mtok=Decimal('0.27'), cache_read_mtok=Decimal('0.054'), output_mtok=Decimal('1.08')
                ),
            ),
            ModelInfo(
                id='minimax/minimax-m3',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='minimax/minimax-m3'), ClauseEquals(equals='minimax/minimax-m3-20260531')]
                ),
                name='MiniMax M3',
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='ministral-3b',
                match=ClauseEquals(equals='ministral-3b'),
                name='Ministral 3B',
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='ministral-8b',
                match=ClauseEquals(equals='ministral-8b'),
                name='Ministral 8B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistral-7b-instruct',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='mistral-7b-instruct'), ClauseEquals(equals='mistral-7b-instruct-v0.3')]
                ),
                name='Mistral 7B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.028'), output_mtok=Decimal('0.054')),
            ),
            ModelInfo(
                id='mistral-7b-instruct-v0.1',
                match=ClauseEquals(equals='mistral-7b-instruct-v0.1'),
                name='Mistral 7B Instruct v0.1',
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.19')),
            ),
            ModelInfo(
                id='mistral-7b-instruct-v0.2',
                match=ClauseEquals(equals='mistral-7b-instruct-v0.2'),
                name='Mistral 7B Instruct v0.2',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistral-7b-instruct:free',
                match=ClauseEquals(equals='mistral-7b-instruct:free'),
                name='Mistral 7B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-medium',
                match=ClauseEquals(equals='mistral-medium'),
                name='Mistral Medium',
                prices=ModelPrice(input_mtok=Decimal('2.75'), output_mtok=Decimal('8.1')),
            ),
            ModelInfo(
                id='mistral-nemo:free',
                match=ClauseEquals(equals='mistral-nemo:free'),
                name='Mistral Nemo (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-small',
                match=ClauseEquals(equals='mistral-small'),
                name='Mistral Small',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='mistral-small-24b-instruct-2501:free',
                match=ClauseEquals(equals='mistral-small-24b-instruct-2501:free'),
                name='Mistral Small 3 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-small-3.1-24b-instruct:free',
                match=ClauseEquals(equals='mistral-small-3.1-24b-instruct:free'),
                name='Mistral Small 3.1 24B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-small-3.2-24b-instruct:free',
                match=ClauseEquals(equals='mistral-small-3.2-24b-instruct:free'),
                name='Mistral Small 3.2 24B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistral-tiny',
                match=ClauseEquals(equals='mistral-tiny'),
                name='Mistral Tiny',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='mistral/ministral-8b',
                match=ClauseEquals(equals='mistral/ministral-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistralai/codestral-2501',
                match=ClauseEquals(equals='mistralai/codestral-2501'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='mistralai/codestral-2508',
                match=ClauseEquals(equals='mistralai/codestral-2508'),
                name='Codestral 2508',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.03'), output_mtok=Decimal('0.9')
                ),
            ),
            ModelInfo(
                id='mistralai/codestral-mamba',
                match=ClauseEquals(equals='mistralai/codestral-mamba'),
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='mistralai/devstral-2512',
                match=ClauseEquals(equals='mistralai/devstral-2512'),
                name='Devstral 2 2512',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mistralai/ministral-14b-2512',
                match=ClauseEquals(equals='mistralai/ministral-14b-2512'),
                name='Ministral 3 14B 2512',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('0.2')
                ),
            ),
            ModelInfo(
                id='mistralai/ministral-3b',
                match=ClauseEquals(equals='mistralai/ministral-3b'),
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='mistralai/ministral-3b-2512',
                match=ClauseEquals(equals='mistralai/ministral-3b-2512'),
                name='Ministral 3 3B 2512',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.1')
                ),
            ),
            ModelInfo(
                id='mistralai/ministral-8b',
                match=ClauseEquals(equals='mistralai/ministral-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistralai/ministral-8b-2512',
                match=ClauseEquals(equals='mistralai/ministral-8b-2512'),
                name='Ministral 3 8B 2512',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.15')
                ),
            ),
            ModelInfo(
                id='mistralai/mistral-7b-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistralai/mistral-7b-instruct'),
                        ClauseEquals(equals='mistralai/mistral-7b-instruct-v0.3'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.029'), output_mtok=Decimal('0.059')),
            ),
            ModelInfo(
                id='mistralai/mistral-7b-instruct-v0.1',
                match=ClauseEquals(equals='mistralai/mistral-7b-instruct-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/mistral-7b-instruct-v0.2',
                match=ClauseEquals(equals='mistralai/mistral-7b-instruct-v0.2'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/mistral-7b-instruct:free',
                match=ClauseEquals(equals='mistralai/mistral-7b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistralai/mistral-large',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='mistralai/mistral-large'),
                        ClauseEquals(equals='mistralai/mistral-large-2407'),
                        ClauseEquals(equals='mistral-large-2411'),
                    ]
                ),
                name='Mistral Large',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='mistralai/mistral-large-2512',
                match=ClauseEquals(equals='mistralai/mistral-large-2512'),
                name='Mistral Large 3 2512',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('1.5')
                ),
            ),
            ModelInfo(
                id='mistralai/mistral-medium',
                match=ClauseEquals(equals='mistralai/mistral-medium'),
                prices=ModelPrice(input_mtok=Decimal('2.75'), output_mtok=Decimal('8.1')),
            ),
            ModelInfo(
                id='mistralai/mistral-medium-3',
                match=ClauseEquals(equals='mistralai/mistral-medium-3'),
                name='Mistral Medium 3',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mistralai/mistral-medium-3-5',
                match=ClauseEquals(equals='mistralai/mistral-medium-3-5'),
                name='Mistral Medium 3.5',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('7.5')),
            ),
            ModelInfo(
                id='mistralai/mistral-medium-3.1',
                match=ClauseEquals(equals='mistralai/mistral-medium-3.1'),
                name='Mistral Medium 3.1',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='mistralai/mistral-nemo',
                match=ClauseEquals(equals='mistralai/mistral-nemo'),
                name='Mistral Nemo',
                prices=ModelPrice(input_mtok=Decimal('0.01'), output_mtok=Decimal('0.019')),
            ),
            ModelInfo(
                id='mistralai/mistral-nemo:free',
                match=ClauseEquals(equals='mistralai/mistral-nemo:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistralai/mistral-saba',
                match=ClauseEquals(equals='mistralai/mistral-saba'),
                name='Saba',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='mistralai/mistral-small',
                match=ClauseEquals(equals='mistralai/mistral-small'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='mistralai/mistral-small-24b-instruct-2501',
                match=ClauseEquals(equals='mistralai/mistral-small-24b-instruct-2501'),
                name='Mistral Small 3',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.09')),
            ),
            ModelInfo(
                id='mistralai/mistral-small-24b-instruct-2501:free',
                match=ClauseEquals(equals='mistralai/mistral-small-24b-instruct-2501:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistralai/mistral-small-2603',
                match=ClauseEquals(equals='mistralai/mistral-small-2603'),
                name='Mistral Small 4',
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='mistralai/mistral-small-3.1-24b-instruct',
                match=ClauseEquals(equals='mistralai/mistral-small-3.1-24b-instruct'),
                name='Mistral Small 3.1 24B',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='mistralai/mistral-small-3.1-24b-instruct:free',
                match=ClauseEquals(equals='mistralai/mistral-small-3.1-24b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='mistralai/mistral-small-3.2-24b-instruct',
                match=ClauseEquals(equals='mistralai/mistral-small-3.2-24b-instruct'),
                name='Mistral Small 3.2 24B',
                prices=ModelPrice(input_mtok=Decimal('0.075'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/mistral-tiny',
                match=ClauseEquals(equals='mistralai/mistral-tiny'),
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='mistralai/mixtral-8x22b-instruct',
                match=ClauseEquals(equals='mistralai/mixtral-8x22b-instruct'),
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='mistralai/mixtral-8x7b-instruct',
                match=ClauseEquals(equals='mistralai/mixtral-8x7b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.24'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='mistralai/pixtral-12b',
                match=ClauseEquals(equals='mistralai/pixtral-12b'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistralai/pixtral-large-2411',
                match=ClauseEquals(equals='mistralai/pixtral-large-2411'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='mistralai/voxtral-small-24b-2507',
                match=ClauseEquals(equals='mistralai/voxtral-small-24b-2507'),
                name='Voxtral Small 24B 2507',
                context_window=32000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='mixtral-8x7b-instruct',
                match=ClauseEquals(equals='mixtral-8x7b-instruct'),
                name='Mixtral 8x7B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='mn-celeste-12b',
                match=ClauseEquals(equals='mn-celeste-12b'),
                name='Mistral Nemo 12B Celeste',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='mn-inferor-12b',
                match=ClauseEquals(equals='mn-inferor-12b'),
                name='Mistral Nemo Inferor 12B',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='mn-starcannon-12b',
                match=ClauseEquals(equals='mn-starcannon-12b'),
                name='Starcannon 12B',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2',
                match=ClauseEquals(equals='moonshotai/kimi-k2'),
                name='Kimi K2 0711',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.57'), output_mtok=Decimal('2.3')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2-0905',
                match=ClauseEquals(equals='moonshotai/kimi-k2-0905'),
                name='Kimi K2 0905',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2-thinking',
                match=ClauseEquals(equals='moonshotai/kimi-k2-thinking'),
                name='Kimi K2 Thinking',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.5')),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.5',
                match=ClauseEquals(equals='moonshotai/kimi-k2.5'),
                name='Kimi K2.5',
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.09'), output_mtok=Decimal('1.9')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.6',
                match=ClauseEquals(equals='moonshotai/kimi-k2.6'),
                name='Kimi K2.6',
                prices=ModelPrice(
                    input_mtok=Decimal('0.68'), cache_read_mtok=Decimal('0.34'), output_mtok=Decimal('3.41')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.6:free',
                match=ClauseEquals(equals='moonshotai/kimi-k2.6:free'),
                name='Kimi K2.6 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='moonshotai/kimi-k2.7-code',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='moonshotai/kimi-k2.7-code'),
                        ClauseEquals(equals='moonshotai/kimi-k2.7-code-20260612'),
                    ]
                ),
                name='Kimi K2.7 Code',
                context_window=262144,
                price_comments='Ref: https://openrouter.ai/api/v1/models',
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('3.5')
                ),
            ),
            ModelInfo(
                id='moonshotai/kimi-k3',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='moonshotai/kimi-k3'), ClauseEquals(equals='moonshotai/kimi-k3-20260715')]
                ),
                name='Kimi K3',
                context_window=1048576,
                price_comments='Ref: https://openrouter.ai/api/v1/models',
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='moonshotai/kimi-vl-a3b-thinking:free',
                match=ClauseEquals(equals='moonshotai/kimi-vl-a3b-thinking:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='moonshotai/moonlight-16b-a3b-instruct:free',
                match=ClauseEquals(equals='moonshotai/moonlight-16b-a3b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='morph/morph-v3-fast',
                match=ClauseEquals(equals='morph/morph-v3-fast'),
                name='Morph V3 Fast',
                context_window=81920,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='morph/morph-v3-large',
                match=ClauseEquals(equals='morph/morph-v3-large'),
                name='Morph V3 Large',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('1.9')),
            ),
            ModelInfo(
                id='mythalion-13b',
                match=ClauseEquals(equals='mythalion-13b'),
                name='Mythalion 13B',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='neversleep/llama-3-lumimaid-70b',
                match=ClauseEquals(equals='neversleep/llama-3-lumimaid-70b'),
                prices=ModelPrice(input_mtok=Decimal('3.375'), output_mtok=Decimal('4.5')),
            ),
            ModelInfo(
                id='neversleep/llama-3-lumimaid-8b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='neversleep/llama-3-lumimaid-8b'),
                        ClauseEquals(equals='neversleep/llama-3-lumimaid-8b:extended'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.09375'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='neversleep/llama-3.1-lumimaid-70b',
                match=ClauseEquals(equals='neversleep/llama-3.1-lumimaid-70b'),
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2.25')),
            ),
            ModelInfo(
                id='neversleep/llama-3.1-lumimaid-8b',
                match=ClauseEquals(equals='neversleep/llama-3.1-lumimaid-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.09375'), output_mtok=Decimal('0.75')),
            ),
            ModelInfo(
                id='neversleep/noromaid-20b',
                match=ClauseEquals(equals='neversleep/noromaid-20b'),
                prices=ModelPrice(input_mtok=Decimal('0.75'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='nex-agi/nex-n2-pro:free',
                match=ClauseEquals(equals='nex-agi/nex-n2-pro:free'),
                name='Nex-N2-Pro (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='noromaid-20b',
                match=ClauseEquals(equals='noromaid-20b'),
                name='Noromaid 20B',
                prices=ModelPrice(input_mtok=Decimal('1.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='nothingiisreal/mn-celeste-12b',
                match=ClauseEquals(equals='nothingiisreal/mn-celeste-12b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='nous-hermes-2-mixtral-8x7b-dpo',
                match=ClauseEquals(equals='nous-hermes-2-mixtral-8x7b-dpo'),
                name='Hermes 2 Mixtral 8x7B DPO',
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='nousresearch/deephermes-3-llama-3-8b-preview:free',
                match=ClauseEquals(equals='nousresearch/deephermes-3-llama-3-8b-preview:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nousresearch/hermes-2-pro-llama-3-8b',
                match=ClauseEquals(equals='nousresearch/hermes-2-pro-llama-3-8b'),
                prices=ModelPrice(input_mtok=Decimal('0.025'), output_mtok=Decimal('0.04')),
            ),
            ModelInfo(
                id='nousresearch/hermes-3-llama-3.1-405b',
                match=ClauseEquals(equals='nousresearch/hermes-3-llama-3.1-405b'),
                name='Hermes 3 405B Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='nousresearch/hermes-3-llama-3.1-405b:free',
                match=ClauseEquals(equals='nousresearch/hermes-3-llama-3.1-405b:free'),
                name='Hermes 3 405B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nousresearch/hermes-3-llama-3.1-70b',
                match=ClauseEquals(equals='nousresearch/hermes-3-llama-3.1-70b'),
                name='Hermes 3 70B Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.12'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='nousresearch/hermes-4-405b',
                match=ClauseEquals(equals='nousresearch/hermes-4-405b'),
                name='Hermes 4 405B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='nousresearch/hermes-4-70b',
                match=ClauseEquals(equals='nousresearch/hermes-4-70b'),
                name='Hermes 4 70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='nousresearch/nous-hermes-2-mixtral-8x7b-dpo',
                match=ClauseEquals(equals='nousresearch/nous-hermes-2-mixtral-8x7b-dpo'),
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='nousresearch/nous-hermes-llama2-13b',
                match=ClauseEquals(equals='nousresearch/nous-hermes-llama2-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='nvidia/llama-3.1-nemotron-70b-instruct',
                match=ClauseEquals(equals='nvidia/llama-3.1-nemotron-70b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.12'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='nvidia/llama-3.1-nemotron-70b-instruct:free',
                match=ClauseEquals(equals='nvidia/llama-3.1-nemotron-70b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/llama-3.1-nemotron-nano-8b-v1:free',
                match=ClauseEquals(equals='nvidia/llama-3.1-nemotron-nano-8b-v1:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/llama-3.1-nemotron-ultra-253b-v1:free',
                match=ClauseEquals(equals='nvidia/llama-3.1-nemotron-ultra-253b-v1:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/llama-3.3-nemotron-super-49b-v1.5',
                match=ClauseEquals(equals='nvidia/llama-3.3-nemotron-super-49b-v1.5'),
                name='Llama 3.3 Nemotron Super 49B V1.5',
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='nvidia/llama-3.3-nemotron-super-49b-v1:free',
                match=ClauseEquals(equals='nvidia/llama-3.3-nemotron-super-49b-v1:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-nano-30b-a3b',
                match=ClauseEquals(equals='nvidia/nemotron-3-nano-30b-a3b'),
                name='Nemotron 3 Nano 30B A3B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-nano-30b-a3b:free',
                match=ClauseEquals(equals='nvidia/nemotron-3-nano-30b-a3b:free'),
                name='Nemotron 3 Nano 30B A3B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free',
                match=ClauseEquals(equals='nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free'),
                name='Nemotron 3 Nano Omni (free)',
                context_window=256000,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-super-120b-a12b',
                match=ClauseEquals(equals='nvidia/nemotron-3-super-120b-a12b'),
                name='Nemotron 3 Super',
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.45')),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-super-120b-a12b:free',
                match=ClauseEquals(equals='nvidia/nemotron-3-super-120b-a12b:free'),
                name='Nemotron 3 Super (free)',
                context_window=262144,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-ultra-550b-a55b',
                match=ClauseEquals(equals='nvidia/nemotron-3-ultra-550b-a55b'),
                name='Nemotron 3 Ultra',
                prices=ModelPrice(
                    input_mtok=Decimal('0.5'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='nvidia/nemotron-3-ultra-550b-a55b:free',
                match=ClauseEquals(equals='nvidia/nemotron-3-ultra-550b-a55b:free'),
                name='Nemotron 3 Ultra (free)',
                context_window=1000000,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-3.5-content-safety:free',
                match=ClauseEquals(equals='nvidia/nemotron-3.5-content-safety:free'),
                name='Nemotron 3.5 Content Safety (free)',
                context_window=128000,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-nano-12b-v2-vl:free',
                match=ClauseEquals(equals='nvidia/nemotron-nano-12b-v2-vl:free'),
                name='Nemotron Nano 12B 2 VL (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='nvidia/nemotron-nano-9b-v2',
                match=ClauseEquals(equals='nvidia/nemotron-nano-9b-v2'),
                name='Nemotron Nano 9B V2',
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.16')),
            ),
            ModelInfo(
                id='nvidia/nemotron-nano-9b-v2:free',
                match=ClauseEquals(equals='nvidia/nemotron-nano-9b-v2:free'),
                name='Nemotron Nano 9B V2 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='o1-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='o1-mini'), ClauseEquals(equals='o1-mini-2024-09-12')]),
                name='o1-mini',
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='open-r1/olympiccoder-32b:free',
                match=ClauseEquals(equals='open-r1/olympiccoder-32b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='open-r1/olympiccoder-7b:free',
                match=ClauseEquals(equals='open-r1/olympiccoder-7b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='openai/chatgpt-4o-latest',
                match=ClauseEquals(equals='openai/chatgpt-4o-latest'),
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='openai/codex-mini',
                match=ClauseEquals(equals='openai/codex-mini'),
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'), cache_read_mtok=Decimal('0.375'), output_mtok=Decimal('6')
                ),
            ),
            ModelInfo(
                id='openai/gpt-3.5-turbo',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-3.5-turbo'), ClauseEquals(equals='gpt-3.5-turbo-0125')]
                ),
                name='GPT-3.5 Turbo',
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='openai/gpt-3.5-turbo-0613',
                match=ClauseEquals(equals='openai/gpt-3.5-turbo-0613'),
                name='GPT-3.5 Turbo (older v0613)',
                context_window=4095,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='openai/gpt-3.5-turbo-1106',
                match=ClauseEquals(equals='openai/gpt-3.5-turbo-1106'),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='openai/gpt-3.5-turbo-16k',
                match=ClauseEquals(equals='openai/gpt-3.5-turbo-16k'),
                name='GPT-3.5 Turbo 16k',
                context_window=16385,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='openai/gpt-3.5-turbo-instruct',
                match=ClauseEquals(equals='openai/gpt-3.5-turbo-instruct'),
                name='GPT-3.5 Turbo Instruct',
                context_window=4095,
                prices=ModelPrice(input_mtok=Decimal('1.5'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='openai/gpt-4',
                match=ClauseOr(or_=[ClauseEquals(equals='openai/gpt-4'), ClauseEquals(equals='gpt-4-0314')]),
                name='GPT-4',
                context_window=8191,
                prices=ModelPrice(input_mtok=Decimal('30'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='openai/gpt-4-1106-preview',
                match=ClauseEquals(equals='openai/gpt-4-1106-preview'),
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='openai/gpt-4-32k',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-4-32k'), ClauseEquals(equals='openai/gpt-4-32k-0314')]
                ),
                prices=ModelPrice(input_mtok=Decimal('60'), output_mtok=Decimal('120')),
            ),
            ModelInfo(
                id='openai/gpt-4-turbo',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-4-turbo'), ClauseEquals(equals='openai/gpt-4-turbo-preview')]
                ),
                name='GPT-4 Turbo',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('10'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='openai/gpt-4.1',
                match=ClauseEquals(equals='openai/gpt-4.1'),
                name='GPT-4.1',
                context_window=1047576,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='openai/gpt-4.1-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-4.1-mini'),
                        ClauseEquals(equals='openai/gpt-4.1-mini-2025-04-14'),
                    ]
                ),
                name='GPT-4.1 Mini',
                context_window=1047576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.1'), output_mtok=Decimal('1.6')
                ),
            ),
            ModelInfo(
                id='openai/gpt-4.1-nano',
                match=ClauseEquals(equals='openai/gpt-4.1-nano'),
                name='GPT-4.1 Nano',
                context_window=1047576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('0.4')
                ),
            ),
            ModelInfo(
                id='openai/gpt-4.5-preview',
                match=ClauseEquals(equals='openai/gpt-4.5-preview'),
                prices=ModelPrice(input_mtok=Decimal('75'), output_mtok=Decimal('150')),
            ),
            ModelInfo(
                id='openai/gpt-4o',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-4o'),
                        ClauseEquals(equals='openai/gpt-4o-2024-08-06'),
                        ClauseEquals(equals='openai/gpt-4o-2024-11-20'),
                        ClauseEquals(equals='openai/gpt-4o-audio-preview'),
                    ]
                ),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='openai/gpt-4o-2024-05-13',
                match=ClauseEquals(equals='openai/gpt-4o-2024-05-13'),
                name='GPT-4o (2024-05-13)',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='openai/gpt-4o-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-4o-mini'),
                        ClauseEquals(equals='openai/gpt-4o-mini-2024-07-18'),
                    ]
                ),
                name='GPT-4o-mini',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='openai/gpt-4o-mini-search-preview',
                match=ClauseEquals(equals='openai/gpt-4o-mini-search-preview'),
                name='GPT-4o-mini Search Preview',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='openai/gpt-4o-search-preview',
                match=ClauseEquals(equals='openai/gpt-4o-search-preview'),
                name='GPT-4o Search Preview',
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='openai/gpt-4o:extended',
                match=ClauseEquals(equals='openai/gpt-4o:extended'),
                prices=ModelPrice(input_mtok=Decimal('6'), output_mtok=Decimal('18')),
            ),
            ModelInfo(
                id='openai/gpt-5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5'),
                        ClauseEquals(equals='openai/gpt-5-2025-08-07'),
                        ClauseEquals(equals='openai/gpt-5-chat'),
                        ClauseEquals(equals='openai/gpt-5-codex'),
                        ClauseEquals(equals='openai/gpt-5.1-codex-max'),
                    ]
                ),
                name='GPT-5',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'), cache_read_mtok=Decimal('0.125'), output_mtok=Decimal('10')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5-image',
                match=ClauseEquals(equals='openai/gpt-5-image'),
                name='GPT-5 Image',
                context_window=400000,
                prices=ModelPrice(input_mtok=Decimal('10'), cache_read_mtok=Decimal('1.25'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='openai/gpt-5-image-mini',
                match=ClauseEquals(equals='openai/gpt-5-image-mini'),
                name='GPT-5 Image Mini',
                context_window=400000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), cache_read_mtok=Decimal('0.25'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='openai/gpt-5-mini',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-5-mini'), ClauseEquals(equals='openai/gpt-5-mini-2025-08-07')]
                ),
                name='GPT-5 Mini',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('2')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5-nano',
                match=ClauseEquals(equals='openai/gpt-5-nano'),
                name='GPT-5 Nano',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.05'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.4')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5-pro',
                match=ClauseEquals(equals='openai/gpt-5-pro'),
                name='GPT-5 Pro',
                context_window=400000,
                prices=ModelPrice(input_mtok=Decimal('15'), output_mtok=Decimal('120')),
            ),
            ModelInfo(
                id='openai/gpt-5.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.1'),
                        ClauseEquals(equals='openai/gpt-5.1-chat'),
                        ClauseEquals(equals='openai/gpt-5.1-codex'),
                    ]
                ),
                name='GPT-5.1',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'), cache_read_mtok=Decimal('0.13'), output_mtok=Decimal('10')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.1-codex-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.1-codex-mini'),
                        ClauseEquals(equals='openai/gpt-5.1-codex-mini-20251113'),
                    ]
                ),
                name='GPT-5.1-Codex-Mini',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.25'), cache_read_mtok=Decimal('0.025'), output_mtok=Decimal('2')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.2',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.2'),
                        ClauseEquals(equals='openai/gpt-5.2-20251211'),
                        ClauseEquals(equals='openai/gpt-5.2-chat'),
                        ClauseEquals(equals='openai/gpt-5.2-codex'),
                    ]
                ),
                name='GPT-5.2',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.2-pro',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-5.2-pro'), ClauseEquals(equals='openai/gpt-5.2-pro-20251211')]
                ),
                name='GPT-5.2 Pro',
                context_window=400000,
                prices=ModelPrice(input_mtok=Decimal('21'), output_mtok=Decimal('168')),
            ),
            ModelInfo(
                id='openai/gpt-5.3-chat',
                match=ClauseEquals(equals='openai/gpt-5.3-chat'),
                name='GPT-5.3 Chat',
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.3-codex',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.3-codex'),
                        ClauseEquals(equals='openai/gpt-5.3-codex-20260224'),
                    ]
                ),
                name='GPT-5.3-Codex',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.75'), cache_read_mtok=Decimal('0.175'), output_mtok=Decimal('14')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.4',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-5.4'), ClauseEquals(equals='openai/gpt-5.4-20260305')]
                ),
                name='GPT-5.4',
                context_window=1050000,
                price_comments='Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=272000, price=Decimal('0.5'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('15'), tiers=[Tier(start=272000, price=Decimal('22.5'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.4-image-2',
                match=ClauseEquals(equals='openai/gpt-5.4-image-2'),
                name='GPT-5.4 Image 2',
                context_window=272000,
                prices=ModelPrice(input_mtok=Decimal('8'), cache_read_mtok=Decimal('2'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='openai/gpt-5.4-mini',
                match=ClauseEquals(equals='openai/gpt-5.4-mini'),
                name='GPT-5.4 Mini',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('4.5')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.4-nano',
                match=ClauseEquals(equals='openai/gpt-5.4-nano'),
                name='GPT-5.4 Nano',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('1.25')
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.4-pro',
                match=ClauseEquals(equals='openai/gpt-5.4-pro'),
                name='GPT-5.4 Pro',
                context_window=1050000,
                price_comments='Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=272000, price=Decimal('60'))]),
                    output_mtok=TieredPrices(base=Decimal('180'), tiers=[Tier(start=272000, price=Decimal('270'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.5',
                match=ClauseEquals(equals='openai/gpt-5.5'),
                name='GPT-5.5',
                context_window=1050000,
                price_comments='Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=272000, price=Decimal('10'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=272000, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=272000, price=Decimal('45'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.5-pro',
                match=ClauseEquals(equals='openai/gpt-5.5-pro'),
                name='GPT-5.5 Pro',
                context_window=1050000,
                price_comments='Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('30'), tiers=[Tier(start=272000, price=Decimal('60'))]),
                    output_mtok=TieredPrices(base=Decimal('180'), tiers=[Tier(start=272000, price=Decimal('270'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.6-luna',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.6-luna'),
                        ClauseRegex(regex='^openai/gpt-5\\.6-luna-\\d{8}$'),
                    ]
                ),
                name='GPT-5.6 Luna',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.25'), tiers=[Tier(start=272000, price=Decimal('0.5'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.02'), tiers=[Tier(start=272000, price=Decimal('0.04'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('1.2'), tiers=[Tier(start=272000, price=Decimal('1.8'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.6-sol',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/gpt-5.6-sol'), ClauseRegex(regex='^openai/gpt-5\\.6-sol-\\d{8}$')]
                ),
                name='GPT-5.6 Sol',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=272000, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('10'), tiers=[Tier(start=272000, price=Decimal('15'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-5.6-terra',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-5.6-terra'),
                        ClauseRegex(regex='^openai/gpt-5\\.6-terra-\\d{8}$'),
                    ]
                ),
                name='GPT-5.6 Terra',
                context_window=1050000,
                price_comments='Cache writes are billed at 1.25x the uncached input rate. Long-context tier (>272K prompt tokens) is 2x input and 1.5x output, matching OpenAI. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=272000, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('12'), tiers=[Tier(start=272000, price=Decimal('18'))]),
                ),
            ),
            ModelInfo(
                id='openai/gpt-6-luna',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-6-luna'),
                        ClauseEquals(equals='openai/gpt-6-luna-pro'),
                        ClauseRegex(regex='^openai/gpt-6-luna-\\d{8}$'),
                    ]
                ),
                name='GPT-6 Luna',
                context_window=1050000,
                price_comments='OpenRouter lists the base and pro routes at the same rates. Long-context tier (>272K prompt tokens) is 2x input and cache rates and 1.5x output. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.1'), tiers=[Tier(start=272000, price=Decimal('0.2'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.125'), tiers=[Tier(start=272000, price=Decimal('0.25'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.01'), tiers=[Tier(start=272000, price=Decimal('0.02'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=272000, price=Decimal('0.75'))]),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='openai/gpt-6-luna:batch',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-6-luna:batch'),
                        ClauseEquals(equals='openai/gpt-6-luna-pro:batch'),
                    ]
                ),
                name='GPT-6 Luna Batch',
                context_window=1050000,
                price_comments="OpenRouter's batch routes bill input, cache, and output tokens at half the standard rates; web searches retain their $0.01 per-call rate. Ref: https://openrouter.ai/api/v1/models.",
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.05'), tiers=[Tier(start=272000, price=Decimal('0.1'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('0.0625'), tiers=[Tier(start=272000, price=Decimal('0.125'))]
                    ),
                    cache_read_mtok=TieredPrices(
                        base=Decimal('0.005'), tiers=[Tier(start=272000, price=Decimal('0.01'))]
                    ),
                    output_mtok=TieredPrices(base=Decimal('0.25'), tiers=[Tier(start=272000, price=Decimal('0.375'))]),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='openai/gpt-6-sol',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-6-sol'),
                        ClauseEquals(equals='openai/gpt-6-sol-pro'),
                        ClauseRegex(regex='^openai/gpt-6-sol-\\d{8}$'),
                    ]
                ),
                name='GPT-6 Sol',
                context_window=1050000,
                price_comments='OpenRouter lists the base and pro routes at the same rates. Long-context tier (>272K prompt tokens) is 2x input and cache rates and 1.5x output. Ref: https://openrouter.ai/api/v1/models (pricing.overrides).',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=272000, price=Decimal('4'))]),
                    cache_write_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=272000, price=Decimal('5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=272000, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('10'), tiers=[Tier(start=272000, price=Decimal('15'))]),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='openai/gpt-6-sol:batch',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/gpt-6-sol:batch'),
                        ClauseEquals(equals='openai/gpt-6-sol-pro:batch'),
                    ]
                ),
                name='GPT-6 Sol Batch',
                context_window=1050000,
                price_comments="OpenRouter's batch routes bill input, cache, and output tokens at half the standard rates; web searches retain their $0.01 per-call rate. Ref: https://openrouter.ai/api/v1/models.",
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1'), tiers=[Tier(start=272000, price=Decimal('2'))]),
                    cache_write_mtok=TieredPrices(
                        base=Decimal('1.25'), tiers=[Tier(start=272000, price=Decimal('2.5'))]
                    ),
                    cache_read_mtok=TieredPrices(base=Decimal('0.1'), tiers=[Tier(start=272000, price=Decimal('0.2'))]),
                    output_mtok=TieredPrices(base=Decimal('5'), tiers=[Tier(start=272000, price=Decimal('7.5'))]),
                    web_searches_kcount=Decimal('10'),
                ),
            ),
            ModelInfo(
                id='openai/gpt-audio',
                match=ClauseEquals(equals='openai/gpt-audio'),
                name='GPT Audio',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2.5'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='openai/gpt-audio-mini',
                match=ClauseEquals(equals='openai/gpt-audio-mini'),
                name='GPT Audio Mini',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='openai/gpt-chat-latest',
                match=ClauseEquals(equals='openai/gpt-chat-latest'),
                name='GPT Chat Latest',
                context_window=400000,
                prices=ModelPrice(input_mtok=Decimal('5'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b',
                match=ClauseEquals(equals='openai/gpt-oss-120b'),
                name='gpt-oss-120b',
                prices=ModelPrice(input_mtok=Decimal('0.039'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='openai/gpt-oss-120b:free',
                match=ClauseEquals(equals='openai/gpt-oss-120b:free'),
                name='gpt-oss-120b (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b',
                match=ClauseEquals(equals='openai/gpt-oss-20b'),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.029'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='openai/gpt-oss-20b:free',
                match=ClauseEquals(equals='openai/gpt-oss-20b:free'),
                name='gpt-oss-20b (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='openai/gpt-oss-safeguard-20b',
                match=ClauseEquals(equals='openai/gpt-oss-safeguard-20b'),
                name='gpt-oss-safeguard-20b',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.037'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='openai/o1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='openai/o1'),
                        ClauseEquals(equals='o1-preview'),
                        ClauseEquals(equals='o1-preview-2024-09-12'),
                    ]
                ),
                name='o1',
                prices=ModelPrice(input_mtok=Decimal('15'), cache_read_mtok=Decimal('7.5'), output_mtok=Decimal('60')),
            ),
            ModelInfo(
                id='openai/o1-mini',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='openai/o1-mini'), ClauseEquals(equals='openai/o1-mini-2024-09-12')]
                ),
                prices=ModelPrice(input_mtok=Decimal('1.1'), output_mtok=Decimal('4.4')),
            ),
            ModelInfo(
                id='openai/o1-pro',
                match=ClauseEquals(equals='openai/o1-pro'),
                name='o1-pro',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('150'), output_mtok=Decimal('600')),
            ),
            ModelInfo(
                id='openai/o3',
                match=ClauseEquals(equals='openai/o3'),
                name='o3',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='openai/o3-deep-research',
                match=ClauseEquals(equals='openai/o3-deep-research'),
                name='o3 Deep Research',
                prices=ModelPrice(input_mtok=Decimal('10'), cache_read_mtok=Decimal('2.5'), output_mtok=Decimal('40')),
            ),
            ModelInfo(
                id='openai/o3-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='openai/o3-mini'), ClauseEquals(equals='openai/o3-mini-high')]),
                name='o3 Mini',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.55'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='openai/o3-pro',
                match=ClauseEquals(equals='openai/o3-pro'),
                name='o3 Pro',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('20'), output_mtok=Decimal('80')),
            ),
            ModelInfo(
                id='openai/o4-mini',
                match=ClauseOr(or_=[ClauseEquals(equals='openai/o4-mini'), ClauseEquals(equals='openai/o4-mini-high')]),
                name='o4 Mini',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.1'), cache_read_mtok=Decimal('0.275'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='openai/o4-mini-deep-research',
                match=ClauseEquals(equals='openai/o4-mini-deep-research'),
                name='o4 Mini Deep Research',
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='openchat/openchat-7b',
                match=ClauseEquals(equals='openchat/openchat-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.07')),
            ),
            ModelInfo(
                id='openhands-lm-32b-v0.1',
                match=ClauseEquals(equals='openhands-lm-32b-v0.1'),
                name='OpenHands LM 32B V0.1',
                prices=ModelPrice(input_mtok=Decimal('2.6'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='perceptron/perceptron-mk1',
                match=ClauseEquals(equals='perceptron/perceptron-mk1'),
                name='Perceptron Mk1',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('1.5')),
            ),
            ModelInfo(
                id='perplexity/llama-3.1-sonar-large-128k-online',
                match=ClauseEquals(equals='perplexity/llama-3.1-sonar-large-128k-online'),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='perplexity/llama-3.1-sonar-small-128k-online',
                match=ClauseEquals(equals='perplexity/llama-3.1-sonar-small-128k-online'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='perplexity/r1-1776',
                match=ClauseEquals(equals='perplexity/r1-1776'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='perplexity/sonar',
                match=ClauseEquals(equals='perplexity/sonar'),
                context_window=127072,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='perplexity/sonar-deep-research',
                match=ClauseEquals(equals='perplexity/sonar-deep-research'),
                context_window=128000,
                price_comments='OpenRouter reports internal reasoning as a distinct $3 per million-token charge. Ref: https://openrouter.ai/perplexity/sonar-deep-research/pricing',
                prices=ModelPrice(
                    input_mtok=Decimal('2'), output_mtok=Decimal('8'), output_reasoning_mtok=Decimal('3')
                ),
            ),
            ModelInfo(
                id='perplexity/sonar-pro',
                match=ClauseEquals(equals='perplexity/sonar-pro'),
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='perplexity/sonar-reasoning',
                match=ClauseEquals(equals='perplexity/sonar-reasoning'),
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='perplexity/sonar-reasoning-pro',
                match=ClauseEquals(equals='perplexity/sonar-reasoning-pro'),
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='phi-3-medium-128k-instruct',
                match=ClauseEquals(equals='phi-3-medium-128k-instruct'),
                name='Phi-3 Medium 128K Instruct',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='phi-3-mini-128k-instruct',
                match=ClauseEquals(equals='phi-3-mini-128k-instruct'),
                name='Phi-3 Mini 128K Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-3.5-mini-128k-instruct',
                match=ClauseEquals(equals='phi-3.5-mini-128k-instruct'),
                name='Phi-3.5 Mini 128K Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-4-multimodal-instruct',
                match=ClauseEquals(equals='phi-4-multimodal-instruct'),
                name='Phi 4 Multimodal Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='phi-4-reasoning-plus',
                match=ClauseEquals(equals='phi-4-reasoning-plus'),
                name='Phi 4 Reasoning Plus',
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.35')),
            ),
            ModelInfo(
                id='phi-4-reasoning-plus:free',
                match=ClauseEquals(equals='phi-4-reasoning-plus:free'),
                name='Phi 4 Reasoning Plus (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='phi-4-reasoning:free',
                match=ClauseEquals(equals='phi-4-reasoning:free'),
                name='Phi 4 Reasoning (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='pixtral-12b',
                match=ClauseEquals(equals='pixtral-12b'),
                name='Pixtral 12B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='pixtral-large-2411',
                match=ClauseEquals(equals='pixtral-large-2411'),
                name='Pixtral Large 2411',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='poolside/laguna-m.1:free',
                match=ClauseEquals(equals='poolside/laguna-m.1:free'),
                name='Laguna M.1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='poolside/laguna-xs.2:free',
                match=ClauseEquals(equals='poolside/laguna-xs.2:free'),
                name='Laguna XS.2 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='prime-intellect/intellect-3',
                match=ClauseEquals(equals='prime-intellect/intellect-3'),
                name='INTELLECT-3',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='pygmalionai/mythalion-13b',
                match=ClauseEquals(equals='pygmalionai/mythalion-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.5625'), output_mtok=Decimal('1.125')),
            ),
            ModelInfo(
                id='qwen-2-72b-instruct',
                match=ClauseEquals(equals='qwen-2-72b-instruct'),
                name='Qwen 2 72B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='qwen-2.5-72b-instruct:free',
                match=ClauseEquals(equals='qwen-2.5-72b-instruct:free'),
                name='Qwen2.5 72B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen-2.5-coder-32b-instruct:free',
                match=ClauseEquals(equals='qwen-2.5-coder-32b-instruct:free'),
                name='Qwen2.5 Coder 32B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen-2.5-vl-7b-instruct',
                match=ClauseEquals(equals='qwen-2.5-vl-7b-instruct'),
                name='Qwen2.5-VL 7B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen-max',
                match=ClauseEquals(equals='qwen-max'),
                name='Qwen-Max',
                prices=ModelPrice(
                    input_mtok=Decimal('1.6'), cache_read_mtok=Decimal('0.64'), output_mtok=Decimal('6.4')
                ),
            ),
            ModelInfo(
                id='qwen-turbo',
                match=ClauseEquals(equals='qwen-turbo'),
                name='Qwen-Turbo',
                prices=ModelPrice(
                    input_mtok=Decimal('0.05'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('0.2')
                ),
            ),
            ModelInfo(
                id='qwen-vl-max',
                match=ClauseEquals(equals='qwen-vl-max'),
                name='Qwen VL Max',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('3.2')),
            ),
            ModelInfo(
                id='qwen-vl-plus',
                match=ClauseEquals(equals='qwen-vl-plus'),
                name='Qwen VL Plus',
                prices=ModelPrice(input_mtok=Decimal('0.21'), output_mtok=Decimal('0.63')),
            ),
            ModelInfo(
                id='qwen/qwen-2-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2-72b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-72b-instruct'),
                name='Qwen2.5 72B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.12'), output_mtok=Decimal('0.39')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-72b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen-2.5-72b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-7b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-7b-instruct'),
                name='Qwen2.5 7B Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.04'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-7b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen-2.5-7b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-coder-32b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-coder-32b-instruct'),
                name='Qwen2.5 Coder 32B Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-coder-32b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen-2.5-coder-32b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-vl-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-vl-72b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-vl-7b-instruct',
                match=ClauseEquals(equals='qwen/qwen-2.5-vl-7b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen/qwen-2.5-vl-7b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen-2.5-vl-7b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen-max',
                match=ClauseEquals(equals='qwen/qwen-max'),
                prices=ModelPrice(input_mtok=Decimal('1.6'), output_mtok=Decimal('6.4')),
            ),
            ModelInfo(
                id='qwen/qwen-plus',
                match=ClauseEquals(equals='qwen/qwen-plus'),
                name='Qwen-Plus',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.16'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='qwen/qwen-plus-2025-07-28',
                match=ClauseEquals(equals='qwen/qwen-plus-2025-07-28'),
                name='Qwen Plus 0728',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.26'), output_mtok=Decimal('0.78')),
            ),
            ModelInfo(
                id='qwen/qwen-plus-2025-07-28:thinking',
                match=ClauseEquals(equals='qwen/qwen-plus-2025-07-28:thinking'),
                name='Qwen Plus 0728 (thinking)',
                prices=ModelPrice(
                    input_mtok=Decimal('0.26'), cache_write_mtok=Decimal('0.325'), output_mtok=Decimal('0.78')
                ),
            ),
            ModelInfo(
                id='qwen/qwen-turbo',
                match=ClauseEquals(equals='qwen/qwen-turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen/qwen-vl-max',
                match=ClauseEquals(equals='qwen/qwen-vl-max'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('3.2')),
            ),
            ModelInfo(
                id='qwen/qwen-vl-plus',
                match=ClauseEquals(equals='qwen/qwen-vl-plus'),
                prices=ModelPrice(input_mtok=Decimal('0.21'), output_mtok=Decimal('0.63')),
            ),
            ModelInfo(
                id='qwen/qwen2.5-coder-7b-instruct',
                match=ClauseEquals(equals='qwen/qwen2.5-coder-7b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen/qwen2.5-vl-32b-instruct',
                match=ClauseEquals(equals='qwen/qwen2.5-vl-32b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='qwen/qwen2.5-vl-32b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen2.5-vl-32b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen2.5-vl-3b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen2.5-vl-3b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen2.5-vl-72b-instruct',
                match=ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='qwen/qwen2.5-vl-72b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen2.5-vl-72b-instruct:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen3-14b',
                match=ClauseEquals(equals='qwen/qwen3-14b'),
                name='Qwen3 14B',
                prices=ModelPrice(input_mtok=Decimal('0.06'), output_mtok=Decimal('0.24')),
            ),
            ModelInfo(
                id='qwen/qwen3-235b-a22b',
                match=ClauseEquals(equals='qwen/qwen3-235b-a22b'),
                name='Qwen3 235B A22B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.6')),
            ),
            ModelInfo(
                id='qwen/qwen3-235b-a22b-2507',
                match=ClauseEquals(equals='qwen/qwen3-235b-a22b-2507'),
                name='Qwen3 235B A22B Instruct 2507',
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='qwen/qwen3-235b-a22b-thinking-2507',
                match=ClauseEquals(equals='qwen/qwen3-235b-a22b-thinking-2507'),
                name='Qwen3 235B A22B Thinking 2507',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='qwen/qwen3-30b-a3b',
                match=ClauseEquals(equals='qwen/qwen3-30b-a3b'),
                name='Qwen3 30B A3B',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.29')),
            ),
            ModelInfo(
                id='qwen/qwen3-30b-a3b-instruct-2507',
                match=ClauseEquals(equals='qwen/qwen3-30b-a3b-instruct-2507'),
                name='Qwen3 30B A3B Instruct 2507',
                prices=ModelPrice(input_mtok=Decimal('0.04815'), output_mtok=Decimal('0.19305')),
            ),
            ModelInfo(
                id='qwen/qwen3-30b-a3b-thinking-2507',
                match=ClauseEquals(equals='qwen/qwen3-30b-a3b-thinking-2507'),
                name='Qwen3 30B A3B Thinking 2507',
                context_window=81920,
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.4')),
            ),
            ModelInfo(
                id='qwen/qwen3-32b',
                match=ClauseEquals(equals='qwen/qwen3-32b'),
                name='Qwen3 32B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='qwen/qwen3-8b',
                match=ClauseEquals(equals='qwen/qwen3-8b'),
                name='Qwen3 8B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.035'), output_mtok=Decimal('0.138')),
            ),
            ModelInfo(
                id='qwen/qwen3-coder',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder'),
                        ClauseEquals(equals='qwen/qwen3-coder-480b-a35b-07-25'),
                    ]
                ),
                name='Qwen3 Coder 480B A35B',
                prices=ModelPrice(input_mtok=Decimal('0.22'), output_mtok=Decimal('1.8')),
            ),
            ModelInfo(
                id='qwen/qwen3-coder-30b-a3b-instruct',
                match=ClauseEquals(equals='qwen/qwen3-coder-30b-a3b-instruct'),
                name='Qwen3 Coder 30B A3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.27')),
            ),
            ModelInfo(
                id='qwen/qwen3-coder-flash',
                match=ClauseEquals(equals='qwen/qwen3-coder-flash'),
                name='Qwen3 Coder Flash',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.195'),
                    cache_write_mtok=Decimal('0.24375'),
                    cache_read_mtok=Decimal('0.039'),
                    output_mtok=Decimal('0.975'),
                ),
            ),
            ModelInfo(
                id='qwen/qwen3-coder-next',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-coder-next'),
                        ClauseEquals(equals='qwen/qwen3-coder-next-2025-02-03'),
                    ]
                ),
                name='Qwen3 Coder Next',
                prices=ModelPrice(
                    input_mtok=Decimal('0.11'), cache_read_mtok=Decimal('0.07'), output_mtok=Decimal('0.8')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3-coder-plus',
                match=ClauseEquals(equals='qwen/qwen3-coder-plus'),
                name='Qwen3 Coder Plus',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.65'),
                    cache_write_mtok=Decimal('0.8125'),
                    cache_read_mtok=Decimal('0.13'),
                    output_mtok=Decimal('3.25'),
                ),
            ),
            ModelInfo(
                id='qwen/qwen3-coder:free',
                match=ClauseEquals(equals='qwen/qwen3-coder:free'),
                name='Qwen3 Coder 480B A35B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen3-max',
                match=ClauseEquals(equals='qwen/qwen3-max'),
                name='Qwen 3 Max',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('1.2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='qwen/qwen3-max-thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-max-thinking'),
                        ClauseEquals(equals='qwen/qwen3-max-thinking-20260123'),
                    ]
                ),
                name='Qwen3 Max Thinking',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.78'), output_mtok=Decimal('3.9')),
            ),
            ModelInfo(
                id='qwen/qwen3-next-80b-a3b-instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct-2509'),
                    ]
                ),
                name='Qwen3 Next 80B A3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('1.1')),
            ),
            ModelInfo(
                id='qwen/qwen3-next-80b-a3b-instruct:free',
                match=ClauseEquals(equals='qwen/qwen3-next-80b-a3b-instruct:free'),
                name='Qwen3 Next 80B A3B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen/qwen3-next-80b-a3b-thinking',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking'),
                        ClauseEquals(equals='qwen/qwen3-next-80b-a3b-thinking-2509'),
                    ]
                ),
                name='Qwen3 Next 80B A3B Thinking',
                prices=ModelPrice(input_mtok=Decimal('0.0975'), output_mtok=Decimal('0.78')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-235b-a22b-instruct',
                match=ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-instruct'),
                name='Qwen3 VL 235B A22B Instruct',
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.11'), output_mtok=Decimal('0.88')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-235b-a22b-thinking',
                match=ClauseEquals(equals='qwen/qwen3-vl-235b-a22b-thinking'),
                name='Qwen3 VL 235B A22B Thinking',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.26'), output_mtok=Decimal('2.6')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-30b-a3b-instruct',
                match=ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-instruct'),
                name='Qwen3 VL 30B A3B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('0.52')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-30b-a3b-thinking',
                match=ClauseEquals(equals='qwen/qwen3-vl-30b-a3b-thinking'),
                name='Qwen3 VL 30B A3B Thinking',
                prices=ModelPrice(input_mtok=Decimal('0.13'), output_mtok=Decimal('1.56')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-32b-instruct',
                match=ClauseEquals(equals='qwen/qwen3-vl-32b-instruct'),
                name='Qwen3 VL 32B Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.104'), output_mtok=Decimal('0.416')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-8b-instruct',
                match=ClauseEquals(equals='qwen/qwen3-vl-8b-instruct'),
                name='Qwen3 VL 8B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.08'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='qwen/qwen3-vl-8b-thinking',
                match=ClauseEquals(equals='qwen/qwen3-vl-8b-thinking'),
                name='Qwen3 VL 8B Thinking',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.117'), output_mtok=Decimal('1.365')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-122b-a10b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-122b-a10b'),
                        ClauseEquals(equals='qwen/qwen3.5-122b-a10b-20260224'),
                    ]
                ),
                name='Qwen3.5-122B-A10B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.26'), output_mtok=Decimal('2.08')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-27b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.5-27b'), ClauseEquals(equals='qwen/qwen3.5-27b-20260224')]
                ),
                name='Qwen3.5-27B',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.195'), output_mtok=Decimal('1.56')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-35b-a3b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-35b-a3b'),
                        ClauseEquals(equals='qwen/qwen3.5-35b-a3b-20260224'),
                    ]
                ),
                name='Qwen3.5-35B-A3B',
                prices=ModelPrice(
                    input_mtok=Decimal('0.14'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('1')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.5-397b-a17b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b'),
                        ClauseEquals(equals='qwen/qwen3.5-397b-a17b-20260216'),
                    ]
                ),
                name='Qwen3.5 397B A17B',
                prices=ModelPrice(input_mtok=Decimal('0.39'), output_mtok=Decimal('2.34')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-9b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.5-9b'), ClauseEquals(equals='qwen/qwen3.5-9b-20260310')]
                ),
                name='Qwen3.5-9B',
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.15')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-flash-02-23',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-flash-02-23'),
                        ClauseEquals(equals='qwen/qwen3.5-flash-20260224'),
                    ]
                ),
                name='Qwen3.5-Flash',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.065'), output_mtok=Decimal('0.26')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-plus-02-15',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.5-plus-02-15'),
                        ClauseEquals(equals='qwen/qwen3.5-plus-20260216'),
                    ]
                ),
                name='Qwen3.5 plus-02-15',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('0.4'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='qwen/qwen3.5-plus-20260420',
                match=ClauseEquals(equals='qwen/qwen3.5-plus-20260420'),
                name='Qwen3.5 Plus 2026-04-20',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_write_mtok=Decimal('0.375'), output_mtok=Decimal('1.8')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.6-27b',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.6-27b'), ClauseEquals(equals='qwen/qwen3.6-27b-20260422')]
                ),
                name='Qwen3.6 27B',
                prices=ModelPrice(input_mtok=Decimal('0.289'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='qwen/qwen3.6-35b-a3b',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.6-35b-a3b'),
                        ClauseEquals(equals='qwen/qwen3.6-35b-a3b-20260415'),
                    ]
                ),
                name='Qwen3.6 35B A3B',
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='qwen/qwen3.6-flash',
                match=ClauseEquals(equals='qwen/qwen3.6-flash'),
                name='Qwen3.6 Flash',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1875'), cache_write_mtok=Decimal('0.234375'), output_mtok=Decimal('1.125')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.6-max-preview',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='qwen/qwen3.6-max-preview'),
                        ClauseEquals(equals='qwen/qwen3.6-max-preview-20260420'),
                    ]
                ),
                name='Qwen3.6 Max Preview',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('1.04'), cache_write_mtok=Decimal('1.3'), output_mtok=Decimal('6.24')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.6-plus',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.6-plus'), ClauseEquals(equals='qwen/qwen3.6-plus-04-02')]
                ),
                name='Qwen3.6 Plus',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.325'), cache_write_mtok=Decimal('0.40625'), output_mtok=Decimal('1.95')
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.7-max',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.7-max'), ClauseEquals(equals='qwen/qwen3.7-max-20260520')]
                ),
                name='Qwen3.7 Max',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'),
                    cache_write_mtok=Decimal('1.5625'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('3.75'),
                ),
            ),
            ModelInfo(
                id='qwen/qwen3.7-plus',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='qwen/qwen3.7-plus'), ClauseEquals(equals='qwen/qwen3.7-plus-20260602')]
                ),
                name='Qwen3.7 Plus',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'),
                    cache_write_mtok=Decimal('0.5'),
                    cache_read_mtok=Decimal('0.08'),
                    output_mtok=Decimal('1.6'),
                ),
            ),
            ModelInfo(
                id='qwen/qwq-32b',
                match=ClauseEquals(equals='qwen/qwq-32b'),
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen/qwq-32b-preview',
                match=ClauseEquals(equals='qwen/qwq-32b-preview'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwen/qwq-32b-preview:free',
                match=ClauseEquals(equals='qwen/qwq-32b-preview:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(id='qwen/qwq-32b:free', match=ClauseEquals(equals='qwen/qwq-32b:free'), prices=ModelPrice()),
            ModelInfo(
                id='qwen2.5-vl-32b-instruct',
                match=ClauseEquals(equals='qwen2.5-vl-32b-instruct'),
                name='Qwen2.5 VL 32B Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='qwen2.5-vl-32b-instruct:free',
                match=ClauseEquals(equals='qwen2.5-vl-32b-instruct:free'),
                name='Qwen2.5 VL 32B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen2.5-vl-72b-instruct:free',
                match=ClauseEquals(equals='qwen2.5-vl-72b-instruct:free'),
                name='Qwen2.5 VL 72B Instruct (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen3-14b:free',
                match=ClauseEquals(equals='qwen3-14b:free'),
                name='Qwen3 14B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen3-235b-a22b:free',
                match=ClauseEquals(equals='qwen3-235b-a22b:free'),
                name='Qwen3 235B A22B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen3-30b-a3b:free',
                match=ClauseEquals(equals='qwen3-30b-a3b:free'),
                name='Qwen3 30B A3B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen3-32b:free',
                match=ClauseEquals(equals='qwen3-32b:free'),
                name='Qwen3 32B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwen3-8b:free',
                match=ClauseEquals(equals='qwen3-8b:free'),
                name='Qwen3 8B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwerky-72b:free',
                match=ClauseEquals(equals='qwerky-72b:free'),
                name='Qwerky 72B (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwq-32b',
                match=ClauseEquals(equals='qwq-32b'),
                name='QwQ 32B',
                prices=ModelPrice(input_mtok=Decimal('0.15'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwq-32b-arliai-rpr-v1:free',
                match=ClauseEquals(equals='qwq-32b-arliai-rpr-v1:free'),
                name='QwQ 32B RpR v1 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='qwq-32b-preview',
                match=ClauseEquals(equals='qwq-32b-preview'),
                name='QwQ 32B Preview',
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='qwq-32b:free', match=ClauseEquals(equals='qwq-32b:free'), name='QwQ 32B (free)', prices=ModelPrice()
            ),
            ModelInfo(
                id='r1-1776',
                match=ClauseEquals(equals='r1-1776'),
                name='R1 1776',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='raifle/sorcererlm-8x22b',
                match=ClauseEquals(equals='raifle/sorcererlm-8x22b'),
                prices=ModelPrice(input_mtok=Decimal('4.5'), output_mtok=Decimal('4.5')),
            ),
            ModelInfo(
                id='reka-flash-3:free',
                match=ClauseEquals(equals='reka-flash-3:free'),
                name='Flash 3 (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='rekaai/reka-edge',
                match=ClauseEquals(equals='rekaai/reka-edge'),
                name='Reka Edge',
                context_window=16384,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='rekaai/reka-flash-3',
                match=ClauseEquals(equals='rekaai/reka-flash-3'),
                name='Reka Flash 3',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='rekaai/reka-flash-3:free',
                match=ClauseEquals(equals='rekaai/reka-flash-3:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='relace/relace-apply-3',
                match=ClauseEquals(equals='relace/relace-apply-3'),
                name='Relace Apply 3',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('0.85'), output_mtok=Decimal('1.25')),
            ),
            ModelInfo(
                id='relace/relace-search',
                match=ClauseEquals(equals='relace/relace-search'),
                name='Relace Search',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='sao10k/fimbulvetr-11b-v2',
                match=ClauseEquals(equals='sao10k/fimbulvetr-11b-v2'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='sao10k/l3-euryale-70b',
                match=ClauseEquals(equals='sao10k/l3-euryale-70b'),
                prices=ModelPrice(input_mtok=Decimal('1.48'), output_mtok=Decimal('1.48')),
            ),
            ModelInfo(
                id='sao10k/l3-lunaris-8b',
                match=ClauseEquals(equals='sao10k/l3-lunaris-8b'),
                name='Llama 3 8B Lunaris',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.02'), output_mtok=Decimal('0.05')),
            ),
            ModelInfo(
                id='sao10k/l3.1-70b-hanami-x1',
                match=ClauseEquals(equals='sao10k/l3.1-70b-hanami-x1'),
                name='Llama 3.1 70B Hanami x1',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='sao10k/l3.1-euryale-70b',
                match=ClauseEquals(equals='sao10k/l3.1-euryale-70b'),
                name='Llama 3.1 Euryale 70B v2.2',
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='sao10k/l3.3-euryale-70b',
                match=ClauseEquals(equals='sao10k/l3.3-euryale-70b'),
                name='Llama 3.3 Euryale 70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='sarvam-m:free',
                match=ClauseEquals(equals='sarvam-m:free'),
                name='Sarvam-M (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='scb10x/llama3.1-typhoon2-70b-instruct',
                match=ClauseEquals(equals='scb10x/llama3.1-typhoon2-70b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='scb10x/llama3.1-typhoon2-8b-instruct',
                match=ClauseEquals(equals='scb10x/llama3.1-typhoon2-8b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='shisa-ai/shisa-v2-llama3.3-70b:free',
                match=ClauseEquals(equals='shisa-ai/shisa-v2-llama3.3-70b:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='shisa-v2-llama3.3-70b:free',
                match=ClauseEquals(equals='shisa-v2-llama3.3-70b:free'),
                name='Shisa V2 Llama 3.3 70B  (free)',
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='sonar-reasoning',
                match=ClauseEquals(equals='sonar-reasoning'),
                name='Sonar Reasoning',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('5')),
            ),
            ModelInfo(
                id='sophosympatheia/midnight-rose-70b',
                match=ClauseEquals(equals='sophosympatheia/midnight-rose-70b'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='sophosympatheia/rogue-rose-103b-v0.2:free',
                match=ClauseEquals(equals='sophosympatheia/rogue-rose-103b-v0.2:free'),
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='sorcererlm-8x22b',
                match=ClauseEquals(equals='sorcererlm-8x22b'),
                name='SorcererLM 8x22B',
                prices=ModelPrice(input_mtok=Decimal('4.5'), output_mtok=Decimal('4.5')),
            ),
            ModelInfo(
                id='spotlight',
                match=ClauseEquals(equals='spotlight'),
                name='Spotlight',
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='steelskull/l3.3-electra-r1-70b',
                match=ClauseEquals(equals='steelskull/l3.3-electra-r1-70b'),
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.95')),
            ),
            ModelInfo(
                id='stepfun/step-3.5-flash',
                match=ClauseEquals(equals='stepfun/step-3.5-flash'),
                name='Step 3.5 Flash',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.09'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='stepfun/step-3.7-flash',
                match=ClauseEquals(equals='stepfun/step-3.7-flash'),
                name='Step 3.7 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('1.15')
                ),
            ),
            ModelInfo(
                id='switchpoint/router',
                match=ClauseEquals(equals='switchpoint/router'),
                name='Switchpoint Router',
                prices=ModelPrice(input_mtok=Decimal('0.85'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='tencent/hunyuan-a13b-instruct',
                match=ClauseEquals(equals='tencent/hunyuan-a13b-instruct'),
                name='Hunyuan A13B Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.57')),
            ),
            ModelInfo(
                id='tencent/hy3-preview',
                match=ClauseEquals(equals='tencent/hy3-preview'),
                name='Hy3 preview',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.063'), cache_read_mtok=Decimal('0.021'), output_mtok=Decimal('0.21')
                ),
            ),
            ModelInfo(
                id='thedrummer/anubis-pro-105b-v1',
                match=ClauseEquals(equals='thedrummer/anubis-pro-105b-v1'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='thedrummer/cydonia-24b-v4.1',
                match=ClauseEquals(equals='thedrummer/cydonia-24b-v4.1'),
                name='Cydonia 24B V4.1',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='thedrummer/rocinante-12b',
                match=ClauseEquals(equals='thedrummer/rocinante-12b'),
                name='Rocinante 12B',
                prices=ModelPrice(input_mtok=Decimal('0.25'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='thedrummer/skyfall-36b-v2',
                match=ClauseEquals(equals='thedrummer/skyfall-36b-v2'),
                name='Skyfall 36B V2',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='thedrummer/unslopnemo-12b',
                match=ClauseEquals(equals='thedrummer/unslopnemo-12b'),
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='thudm/glm-4-32b:free', match=ClauseEquals(equals='thudm/glm-4-32b:free'), prices=ModelPrice()
            ),
            ModelInfo(
                id='thudm/glm-z1-32b:free', match=ClauseEquals(equals='thudm/glm-z1-32b:free'), prices=ModelPrice()
            ),
            ModelInfo(
                id='toppy-m-7b',
                match=ClauseEquals(equals='toppy-m-7b'),
                name='Toppy M 7B',
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='undi95/remm-slerp-l2-13b',
                match=ClauseEquals(equals='undi95/remm-slerp-l2-13b'),
                name='ReMM SLERP 13B',
                context_window=6144,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='undi95/toppy-m-7b',
                match=ClauseEquals(equals='undi95/toppy-m-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.07')),
            ),
            ModelInfo(
                id='upstage/solar-pro-3',
                match=ClauseEquals(equals='upstage/solar-pro-3'),
                name='Solar Pro 3',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.15'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.6')
                ),
            ),
            ModelInfo(
                id='valkyrie-49b-v1',
                match=ClauseEquals(equals='valkyrie-49b-v1'),
                name='Valkyrie 49B V1',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='virtuoso-medium-v2',
                match=ClauseEquals(equals='virtuoso-medium-v2'),
                name='Virtuoso Medium V2',
                prices=ModelPrice(input_mtok=Decimal('0.5'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='writer/palmyra-x5',
                match=ClauseEquals(equals='writer/palmyra-x5'),
                name='Palmyra X5',
                context_window=1040000,
                prices=ModelPrice(input_mtok=Decimal('0.6'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='x-ai/grok-2-1212',
                match=ClauseEquals(equals='x-ai/grok-2-1212'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='x-ai/grok-2-vision-1212',
                match=ClauseEquals(equals='x-ai/grok-2-vision-1212'),
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='x-ai/grok-3-beta',
                match=ClauseEquals(equals='x-ai/grok-3-beta'),
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='x-ai/grok-3-mini-beta',
                match=ClauseEquals(equals='x-ai/grok-3-mini-beta'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.5')),
            ),
            ModelInfo(
                id='x-ai/grok-4-fast',
                match=ClauseEquals(equals='x-ai/grok-4-fast'),
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=128000, price=Decimal('0.4'))]),
                    cache_read_mtok=Decimal('0.05'),
                    output_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=128000, price=Decimal('1'))]),
                ),
            ),
            ModelInfo(
                id='x-ai/grok-4.1-fast:free',
                match=ClauseEquals(equals='x-ai/grok-4.1-fast:free'),
                context_window=2000000,
                prices=ModelPrice(),
            ),
            ModelInfo(
                id='x-ai/grok-4.20',
                match=ClauseEquals(equals='x-ai/grok-4.20'),
                name='Grok 4.20',
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='x-ai/grok-4.20-multi-agent',
                match=ClauseEquals(equals='x-ai/grok-4.20-multi-agent'),
                name='Grok 4.20 Multi-Agent',
                context_window=2000000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='x-ai/grok-4.3',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='x-ai/grok-4.3'), ClauseRegex(regex='^x-ai/grok-4\\.3-\\d{8}$')]
                ),
                name='Grok 4.3',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('2.5')
                ),
            ),
            ModelInfo(
                id='x-ai/grok-beta',
                match=ClauseEquals(equals='x-ai/grok-beta'),
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='x-ai/grok-build-0.1',
                match=ClauseEquals(equals='x-ai/grok-build-0.1'),
                name='Grok Build 0.1',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('1'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('2')),
            ),
            ModelInfo(
                id='x-ai/grok-code-fast-1',
                match=ClauseEquals(equals='x-ai/grok-code-fast-1'),
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('1.5')
                ),
            ),
            ModelInfo(
                id='x-ai/grok-vision-beta',
                match=ClauseEquals(equals='x-ai/grok-vision-beta'),
                prices=ModelPrice(input_mtok=Decimal('5'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='xiaomi/mimo-v2-flash',
                match=ClauseEquals(equals='xiaomi/mimo-v2-flash'),
                name='MiMo-V2-Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.1'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.3')
                ),
            ),
            ModelInfo(
                id='xiaomi/mimo-v2.5',
                match=ClauseEquals(equals='xiaomi/mimo-v2.5'),
                name='MiMo-V2.5',
                prices=ModelPrice(
                    input_mtok=Decimal('0.14'), cache_read_mtok=Decimal('0.0028'), output_mtok=Decimal('0.28')
                ),
            ),
            ModelInfo(
                id='xiaomi/mimo-v2.5-pro',
                match=ClauseEquals(equals='xiaomi/mimo-v2.5-pro'),
                name='MiMo-V2.5-Pro',
                prices=ModelPrice(
                    input_mtok=Decimal('0.435'), cache_read_mtok=Decimal('0.0036'), output_mtok=Decimal('0.87')
                ),
            ),
            ModelInfo(
                id='xwin-lm/xwin-lm-70b',
                match=ClauseEquals(equals='xwin-lm/xwin-lm-70b'),
                prices=ModelPrice(input_mtok=Decimal('3.75'), output_mtok=Decimal('3.75')),
            ),
            ModelInfo(
                id='yi-large',
                match=ClauseEquals(equals='yi-large'),
                name='Yi Large',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('3')),
            ),
            ModelInfo(
                id='z-ai/glm-4.5',
                match=ClauseEquals(equals='z-ai/glm-4.5'),
                name='GLM 4.5',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.11'), output_mtok=Decimal('2.2')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.5-air',
                match=ClauseEquals(equals='z-ai/glm-4.5-air'),
                name='GLM 4.5 Air',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.125'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('0.85')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.5v',
                match=ClauseEquals(equals='z-ai/glm-4.5v'),
                name='GLM 4.5V',
                context_window=65536,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.11'), output_mtok=Decimal('1.8')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.6',
                match=ClauseEquals(equals='z-ai/glm-4.6'),
                name='GLM 4.6',
                prices=ModelPrice(
                    input_mtok=Decimal('0.43'), cache_read_mtok=Decimal('0.08'), output_mtok=Decimal('1.74')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.6v',
                match=ClauseEquals(equals='z-ai/glm-4.6v'),
                name='GLM 4.6V',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.9')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.7',
                match=ClauseEquals(equals='z-ai/glm-4.7'),
                name='GLM 4.7',
                prices=ModelPrice(
                    input_mtok=Decimal('0.4'), cache_read_mtok=Decimal('0.08'), output_mtok=Decimal('1.75')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-4.7-flash',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='z-ai/glm-4.7-flash'), ClauseEquals(equals='z-ai/glm-4.7-flash-20260119')]
                ),
                name='GLM 4.7 Flash',
                prices=ModelPrice(
                    input_mtok=Decimal('0.06'), cache_read_mtok=Decimal('0.01'), output_mtok=Decimal('0.4')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5',
                match=ClauseOr(or_=[ClauseEquals(equals='z-ai/glm-5'), ClauseEquals(equals='z-ai/glm-5-20260211')]),
                name='GLM 5',
                prices=ModelPrice(
                    input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.12'), output_mtok=Decimal('1.92')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5-turbo',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='z-ai/glm-5-turbo'), ClauseEquals(equals='z-ai/glm-5-turbo-20260315')]
                ),
                name='GLM 5 Turbo',
                context_window=202752,
                prices=ModelPrice(input_mtok=Decimal('1.2'), cache_read_mtok=Decimal('0.24'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='z-ai/glm-5.1',
                match=ClauseOr(or_=[ClauseEquals(equals='z-ai/glm-5.1'), ClauseEquals(equals='z-ai/glm-5.1-20260406')]),
                name='GLM 5.1',
                prices=ModelPrice(
                    input_mtok=Decimal('0.98'), cache_read_mtok=Decimal('0.182'), output_mtok=Decimal('3.08')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5.2',
                match=ClauseOr(or_=[ClauseEquals(equals='z-ai/glm-5.2'), ClauseEquals(equals='z-ai/glm-5.2-20260616')]),
                name='GLM 5.2',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5.3',
                match=ClauseOr(or_=[ClauseEquals(equals='z-ai/glm-5.3'), ClauseEquals(equals='z-ai/glm-5.3-20260816')]),
                name='GLM 5.3',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='z-ai/glm-5.3-flash',
                match=ClauseEquals(equals='z-ai/glm-5.3-flash'),
                name='GLM 5.3 Flash',
                context_window=1310720,
                price_comments="OpenRouter's model page and models API show a 50% promotion through September 9, 2026 at 16:00 UTC. List prices are $0.15 input, $0.03 cached input, and $0.50 output per million tokens.",
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.25')
                ),
            ),
            ModelInfo(
                id='~anthropic/claude-fable-latest',
                match=ClauseEquals(equals='~anthropic/claude-fable-latest'),
                name='Claude Fable Latest',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('10'),
                    cache_write_mtok=Decimal('12.5'),
                    cache_read_mtok=Decimal('1'),
                    output_mtok=Decimal('50'),
                ),
            ),
            ModelInfo(
                id='~anthropic/claude-haiku-latest',
                match=ClauseEquals(equals='~anthropic/claude-haiku-latest'),
                name='Anthropic Claude Haiku Latest',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('1'),
                    cache_write_mtok=Decimal('1.25'),
                    cache_read_mtok=Decimal('0.1'),
                    output_mtok=Decimal('5'),
                ),
            ),
            ModelInfo(
                id='~anthropic/claude-opus-latest',
                match=ClauseEquals(equals='~anthropic/claude-opus-latest'),
                name='Claude Opus Latest',
                context_window=1000000,
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(
                            input_mtok=Decimal('5'),
                            cache_write_mtok=Decimal('6.25'),
                            cache_read_mtok=Decimal('0.5'),
                            output_mtok=Decimal('25'),
                        )
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 9, 22)),
                        prices=ModelPrice(
                            input_mtok=Decimal('4'),
                            cache_write_mtok=Decimal('5'),
                            cache_read_mtok=Decimal('0.2'),
                            output_mtok=Decimal('20'),
                        ),
                    ),
                ],
            ),
            ModelInfo(
                id='~anthropic/claude-sonnet-latest',
                match=ClauseEquals(equals='~anthropic/claude-sonnet-latest'),
                name='Anthropic Claude Sonnet Latest',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('3'),
                    cache_write_mtok=Decimal('3.75'),
                    cache_read_mtok=Decimal('0.3'),
                    output_mtok=Decimal('15'),
                ),
            ),
            ModelInfo(
                id='~google/gemini-flash-latest',
                match=ClauseEquals(equals='~google/gemini-flash-latest'),
                name='Google Gemini Flash Latest',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.5'),
                    cache_write_mtok=Decimal('0.08333333333333334'),
                    cache_read_mtok=Decimal('0.15'),
                    output_mtok=Decimal('9'),
                ),
            ),
            ModelInfo(
                id='~google/gemini-pro-latest',
                match=ClauseEquals(equals='~google/gemini-pro-latest'),
                name='Google Gemini Pro Latest',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('0.375'),
                    cache_read_mtok=Decimal('0.2'),
                    output_mtok=Decimal('12'),
                ),
            ),
            ModelInfo(
                id='~moonshotai/kimi-latest',
                match=ClauseEquals(equals='~moonshotai/kimi-latest'),
                name='MoonshotAI Kimi Latest',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.68'), cache_read_mtok=Decimal('0.34'), output_mtok=Decimal('3.41')
                ),
            ),
            ModelInfo(
                id='~openai/gpt-latest',
                match=ClauseEquals(equals='~openai/gpt-latest'),
                name='OpenAI GPT Latest',
                context_window=1050000,
                prices=ModelPrice(input_mtok=Decimal('5'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('30')),
            ),
            ModelInfo(
                id='~openai/gpt-mini-latest',
                match=ClauseEquals(equals='~openai/gpt-mini-latest'),
                name='OpenAI GPT Mini Latest',
                context_window=400000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.75'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('4.5')
                ),
            ),
        ],
    ),
    Provider(
        id='ovhcloud',
        name='OVHcloud AI Endpoints',
        api_pattern='https://oai\\.endpoints\\.kepler\\.ai\\.cloud\\.ovh\\.net',
        pricing_urls=['https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models'],
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='DeepSeek-R1-Distill-Llama-70B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='DeepSeek-R1-Distill-Llama-70B'),
                        ClauseEquals(equals='deepseek-r1-distill-llama-70b'),
                    ]
                ),
                name='DeepSeek-R1-Distill-Llama-70B',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.74'), output_mtok=Decimal('0.74')),
            ),
            ModelInfo(
                id='Llama-3.1-8B-Instruct',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Llama-3.1-8B-Instruct'), ClauseEquals(equals='llama-3.1-8b-instruct')]
                ),
                name='Llama-3.1-8B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.11')),
            ),
            ModelInfo(
                id='Meta-Llama-3_3-70B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Meta-Llama-3_3-70B-Instruct'),
                        ClauseEquals(equals='meta-llama-3_3-70b-instruct'),
                    ]
                ),
                name='Meta-Llama-3_3-70B-Instruct',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.74'), output_mtok=Decimal('0.74')),
            ),
            ModelInfo(
                id='Mistral-7B-Instruct-v0.3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Mistral-7B-Instruct-v0.3'),
                        ClauseEquals(equals='mistral-7b-instruct-v0.3'),
                    ]
                ),
                name='Mistral-7B-Instruct-v0.3',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.11'), output_mtok=Decimal('0.11')),
            ),
            ModelInfo(
                id='Mistral-Nemo-Instruct-2407',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Mistral-Nemo-Instruct-2407'),
                        ClauseEquals(equals='mistral-nemo-instruct-2407'),
                    ]
                ),
                name='Mistral-Nemo-Instruct-2407',
                context_window=65536,
                prices=ModelPrice(input_mtok=Decimal('0.14'), output_mtok=Decimal('0.14')),
            ),
            ModelInfo(
                id='Mistral-Small-3.2-24B-Instruct-2506',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Mistral-Small-3.2-24B-Instruct-2506'),
                        ClauseEquals(equals='mistral-small-3.2-24b-instruct-2506'),
                    ]
                ),
                name='Mistral-Small-3.2-24B-Instruct-2506',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.31')),
            ),
            ModelInfo(
                id='Mixtral-8x7B-Instruct-v0.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Mixtral-8x7B-Instruct-v0.1'),
                        ClauseEquals(equals='mixtral-8x7b-instruct-v0.1'),
                    ]
                ),
                name='Mixtral-8x7B-Instruct-v0.1',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.7'), output_mtok=Decimal('0.7')),
            ),
            ModelInfo(
                id='Qwen2.5-VL-72B-Instruct',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen2.5-VL-72B-Instruct'), ClauseEquals(equals='qwen2.5-vl-72b-instruct')]
                ),
                name='Qwen2.5-VL-72B-Instruct',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('1.01'), output_mtok=Decimal('1.01')),
            ),
            ModelInfo(
                id='Qwen3-32B',
                match=ClauseOr(or_=[ClauseEquals(equals='Qwen3-32B'), ClauseEquals(equals='qwen3-32b')]),
                name='Qwen3-32B',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.25')),
            ),
            ModelInfo(
                id='Qwen3-Coder-30B-A3B-Instruct',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='Qwen3-Coder-30B-A3B-Instruct'),
                        ClauseEquals(equals='qwen3-coder-30b-a3b-instruct'),
                    ]
                ),
                name='Qwen3-Coder-30B-A3B-Instruct',
                context_window=262144,
                prices=ModelPrice(input_mtok=Decimal('0.07'), output_mtok=Decimal('0.26')),
            ),
            ModelInfo(
                id='bge-base-en-v1.5',
                match=ClauseEquals(equals='bge-base-en-v1.5'),
                name='bge-base-en-v1.5',
                context_window=512,
                prices=ModelPrice(input_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='bge-m3',
                match=ClauseEquals(equals='bge-m3'),
                name='bge-m3',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='bge-multilingual-gemma2',
                match=ClauseEquals(equals='bge-multilingual-gemma2'),
                name='bge-multilingual-gemma2',
                context_window=8192,
                prices=ModelPrice(input_mtok=Decimal('0.01')),
            ),
            ModelInfo(
                id='gpt-oss-120b',
                match=ClauseEquals(equals='gpt-oss-120b'),
                name='gpt-oss-120b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.09'), output_mtok=Decimal('0.47')),
            ),
            ModelInfo(
                id='gpt-oss-20b',
                match=ClauseEquals(equals='gpt-oss-20b'),
                name='gpt-oss-20b',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.05'), output_mtok=Decimal('0.18')),
            ),
        ],
    ),
    Provider(
        id='perplexity',
        name='Perplexity',
        api_pattern='https://api\\.perplexity\\.ai',
        pricing_urls=['https://docs.perplexity.ai/docs/getting-started/pricing'],
        price_comments='Prices per request vary based on usage, this is not represented here, instead we just take the highest price shown for `requests_kcount`.',
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='reasoning_tokens', dest='output_tokens', required=False),
                    UsageExtractorMapping(path='reasoning_tokens', dest='output_reasoning_tokens', required=False),
                    UsageExtractorMapping(path='citation_tokens', dest='output_tokens', required=False),
                    UsageExtractorMapping(path='citation_tokens', dest='output_citation_tokens', required=False),
                    UsageExtractorMapping(path='num_search_queries', dest='web_searches', required=False),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='llama-3.1-sonar-large-128k-online',
                match=ClauseEquals(equals='llama-3.1-sonar-large-128k-online'),
                name='Llama 3.1 Sonar 70B Online',
                description="Llama 3.1 Sonar is Perplexity's latest model family. It surpasses their earlier Sonar models in cost-efficiency, speed, and performance.",
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1')),
            ),
            ModelInfo(
                id='llama-3.1-sonar-small-128k-online',
                match=ClauseEquals(equals='llama-3.1-sonar-small-128k-online'),
                name='Llama 3.1 Sonar 8B Online',
                description="Llama 3.1 Sonar is Perplexity's latest model family. It surpasses their earlier Sonar models in cost-efficiency, speed, and performance.",
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='r1-1776',
                match=ClauseEquals(equals='r1-1776'),
                name='R1 1776',
                description='R1 1776 is a version of DeepSeek-R1 that has been post-trained to remove censorship constraints related to topics restricted by the Chinese government. The model retains its original reasoning capabilities while providing direct responses to a wider range of queries. R1 1776 is an offline chat model that does not use the perplexity search subsystem.',
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8')),
            ),
            ModelInfo(
                id='sonar',
                match=ClauseEquals(equals='sonar'),
                name='Sonar',
                description='Sonar is lightweight, affordable, fast, and simple to use — now featuring citations and the ability to customize sources. It is designed for companies seeking to integrate lightweight question-and-answer features optimized for speed.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('1'), requests_kcount=Decimal('12')),
            ),
            ModelInfo(
                id='sonar-deep-research',
                match=ClauseEquals(equals='sonar-deep-research'),
                name='Sonar Deep Research',
                description='Sonar Deep Research is a research-focused model designed for multi-step retrieval, synthesis, and reasoning across complex topics. It autonomously searches, reads, and evaluates sources, refining its approach as it gathers information. This enables comprehensive report generation across domains like finance, technology, health, and current events.',
                context_window=128000,
                price_comments='Perplexity lists reasoning tokens separately at $3 per million tokens and citation tokens at $2 per million tokens. Search queries cost $5 per thousand.',
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    output_mtok=Decimal('8'),
                    output_reasoning_mtok=Decimal('3'),
                    output_citation_mtok=Decimal('2'),
                    web_searches_kcount=Decimal('5'),
                ),
            ),
            ModelInfo(
                id='sonar-pro',
                match=ClauseEquals(equals='sonar-pro'),
                name='Sonar Pro',
                description='Note: Sonar Pro pricing includes Perplexity search pricing. See details here',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15'), requests_kcount=Decimal('14')),
            ),
            ModelInfo(
                id='sonar-pro-search',
                match=ClauseEquals(equals='sonar-pro-search'),
                name='Sonar Pro Search',
                description="Sonar Pro Search is Perplexity's advanced agentic search system for deeper reasoning and analysis.",
                price_comments='Imported from OpenRouter pricing; verify against Perplexity pricing when native API pricing is published.',
                prices=ModelPrice(input_mtok=Decimal('3'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='sonar-reasoning',
                match=ClauseEquals(equals='sonar-reasoning'),
                name='Sonar Reasoning',
                description='Sonar Reasoning is a reasoning model provided by Perplexity based on DeepSeek R1.',
                prices=ModelPrice(input_mtok=Decimal('1'), output_mtok=Decimal('5'), requests_kcount=Decimal('12')),
            ),
            ModelInfo(
                id='sonar-reasoning-pro',
                match=ClauseEquals(equals='sonar-reasoning-pro'),
                name='Sonar Reasoning Pro',
                description='Sonar Pro pricing includes Perplexity search pricing.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('8'), requests_kcount=Decimal('14')),
            ),
        ],
    ),
    Provider(
        id='quicksilverpro',
        name='QuickSilver Pro',
        api_pattern='https://api\\.quicksilverpro\\.io',
        pricing_urls=['https://quicksilverpro.io/#pricing', 'https://quicksilverpro.io/pricing.json'],
        description='OpenAI-compatible inference gateway serving frontier and open models via one endpoint.',
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_tokens_details', 'cache_write_tokens'], dest='cache_write_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='responses',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='claude-fable-5',
                match=ClauseEquals(equals='claude-fable-5'),
                name='Claude Fable 5',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('8'), output_mtok=Decimal('40')),
            ),
            ModelInfo(
                id='claude-haiku-4-5',
                match=ClauseEquals(equals='claude-haiku-4-5'),
                name='Claude Haiku 4.5',
                context_window=200000,
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='claude-opus-4-6',
                match=ClauseEquals(equals='claude-opus-4-6'),
                name='Claude Opus 4.6',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='claude-opus-4-8',
                match=ClauseEquals(equals='claude-opus-4-8'),
                name='Claude Opus 4.8',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='claude-opus-5',
                match=ClauseEquals(equals='claude-opus-5'),
                name='Claude Opus 5',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('4'), output_mtok=Decimal('20')),
            ),
            ModelInfo(
                id='claude-sonnet-4-6',
                match=ClauseEquals(equals='claude-sonnet-4-6'),
                name='Claude Sonnet 4.6',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('2.4'), output_mtok=Decimal('12')),
            ),
            ModelInfo(
                id='claude-sonnet-5',
                match=ClauseEquals(equals='claude-sonnet-5'),
                name='Claude Sonnet 5',
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='deepseek-v4-flash',
                match=ClauseEquals(equals='deepseek-v4-flash'),
                name='DeepSeek V4 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.112'), cache_read_mtok=Decimal('0.0144'), output_mtok=Decimal('0.224')
                ),
            ),
            ModelInfo(
                id='deepseek-v4-pro',
                match=ClauseEquals(equals='deepseek-v4-pro'),
                name='DeepSeek V4 Pro',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.435'), cache_read_mtok=Decimal('0.003625'), output_mtok=Decimal('0.87')
                ),
            ),
            ModelInfo(
                id='gemini-3-flash-preview',
                match=ClauseEquals(equals='gemini-3-flash-preview'),
                name='Gemini 3 Flash Preview',
                context_window=1048576,
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.425'), output_mtok=Decimal('2.55')),
            ),
            ModelInfo(
                id='gemini-3-pro-image',
                match=ClauseEquals(equals='gemini-3-pro-image'),
                name='Gemini 3 Pro Image',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.7'), output_mtok=Decimal('10.2'), output_image_mtok=Decimal('102')
                ),
            ),
            ModelInfo(
                id='gemini-3.1-flash-lite',
                match=ClauseEquals(equals='gemini-3.1-flash-lite'),
                name='Gemini 3.1 Flash Lite',
                context_window=1048576,
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.2125'), output_mtok=Decimal('1.275')),
            ),
            ModelInfo(
                id='gemini-3.1-pro-preview',
                match=ClauseEquals(equals='gemini-3.1-pro-preview'),
                name='Gemini 3.1 Pro Preview',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('1.7'), output_mtok=Decimal('10.2')),
            ),
            ModelInfo(
                id='gemini-3.5-flash',
                match=ClauseEquals(equals='gemini-3.5-flash'),
                name='Gemini 3.5 Flash',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('1.275'), output_mtok=Decimal('7.65')),
            ),
            ModelInfo(
                id='gemini-3.5-flash-lite',
                match=ClauseEquals(equals='gemini-3.5-flash-lite'),
                name='Gemini 3.5 Flash-Lite',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('0.255'), output_mtok=Decimal('2.125')),
            ),
            ModelInfo(
                id='gemini-3.6-flash',
                match=ClauseEquals(equals='gemini-3.6-flash'),
                name='Gemini 3.6 Flash',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('1.275'), output_mtok=Decimal('6.375')),
            ),
            ModelInfo(
                id='gemini-3.7-flash',
                match=ClauseEquals(equals='gemini-3.7-flash'),
                name='Gemini 3.7 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.6375'), cache_read_mtok=Decimal('0.06375'), output_mtok=Decimal('3.1875')
                ),
            ),
            ModelInfo(
                id='glm-5.2',
                match=ClauseEquals(equals='glm-5.2'),
                name='GLM 5.2',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.12'), cache_read_mtok=Decimal('0.208'), output_mtok=Decimal('3.52')
                ),
            ),
            ModelInfo(
                id='glm-5.3',
                match=ClauseEquals(equals='glm-5.3'),
                name='GLM 5.3',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.12'), cache_read_mtok=Decimal('0.208'), output_mtok=Decimal('3.52')
                ),
            ),
            ModelInfo(
                id='glm-5.3-flash',
                match=ClauseEquals(equals='glm-5.3-flash'),
                name='GLM 5.3 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.06'), cache_read_mtok=Decimal('0.012'), output_mtok=Decimal('0.2')
                ),
            ),
            ModelInfo(
                id='gpt-5.6-luna',
                match=ClauseEquals(equals='gpt-5.6-luna'),
                name='GPT-5.6 Luna',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.08'),
                    cache_write_mtok=Decimal('0.1'),
                    cache_read_mtok=Decimal('0.008'),
                    output_mtok=Decimal('0.48'),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-sol',
                match=ClauseEquals(equals='gpt-5.6-sol'),
                name='GPT-5.6 Sol',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('4'),
                    cache_write_mtok=Decimal('5'),
                    cache_read_mtok=Decimal('0.4'),
                    output_mtok=Decimal('24'),
                ),
            ),
            ModelInfo(
                id='gpt-5.6-terra',
                match=ClauseEquals(equals='gpt-5.6-terra'),
                name='GPT-5.6 Terra',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.8'),
                    cache_write_mtok=Decimal('1'),
                    cache_read_mtok=Decimal('0.08'),
                    output_mtok=Decimal('4.8'),
                ),
            ),
            ModelInfo(
                id='gpt-oss-120b',
                match=ClauseEquals(equals='gpt-oss-120b'),
                name='GPT-OSS 120B',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.12'), cache_read_mtok=Decimal('0.06'), output_mtok=Decimal('0.48')
                ),
            ),
            ModelInfo(
                id='grok-4.5',
                match=ClauseEquals(equals='grok-4.5'),
                name='Grok 4.5',
                context_window=500000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.6'), cache_read_mtok=Decimal('0.4'), output_mtok=Decimal('4.8')
                ),
            ),
            ModelInfo(
                id='grok-4.6',
                match=ClauseEquals(equals='grok-4.6'),
                name='Grok 4.6',
                context_window=500000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.5'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='hy3',
                match=ClauseEquals(equals='hy3'),
                name='Hy3',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.1056'), cache_read_mtok=Decimal('0.0264'), output_mtok=Decimal('0.4224')
                ),
            ),
            ModelInfo(
                id='kimi-k2.6',
                match=ClauseEquals(equals='kimi-k2.6'),
                name='Kimi K2.6',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.5472'), cache_read_mtok=Decimal('0.292'), output_mtok=Decimal('2.728')
                ),
            ),
            ModelInfo(
                id='kimi-k2.7-code',
                match=ClauseEquals(equals='kimi-k2.7-code'),
                name='Kimi K2.7 Code',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.584'), cache_read_mtok=Decimal('0.1278'), output_mtok=Decimal('2.8')
                ),
            ),
            ModelInfo(
                id='kimi-k3',
                match=ClauseEquals(equals='kimi-k3'),
                name='Kimi K3',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('2.4'), cache_read_mtok=Decimal('0.24'), output_mtok=Decimal('12')
                ),
            ),
            ModelInfo(
                id='mimo-v2.5',
                match=ClauseEquals(equals='mimo-v2.5'),
                name='MiMo-V2.5',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.112'), cache_read_mtok=Decimal('0.00224'), output_mtok=Decimal('0.224')
                ),
            ),
            ModelInfo(
                id='minimax-m3',
                match=ClauseEquals(equals='minimax-m3'),
                name='MiniMax M3',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.24'), cache_read_mtok=Decimal('0.048'), output_mtok=Decimal('0.96')
                ),
            ),
            ModelInfo(
                id='muse-glimmer-30b',
                match=ClauseEquals(equals='muse-glimmer-30b'),
                name='Muse Glimmer 30B',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.28'), cache_read_mtok=Decimal('0.032'), output_mtok=Decimal('1.2')
                ),
            ),
            ModelInfo(
                id='muse-spark-1.2',
                match=ClauseEquals(equals='muse-spark-1.2'),
                name='Muse Spark 1.2',
                context_window=1048576,
                prices=ModelPrice(input_mtok=Decimal('1'), cache_read_mtok=Decimal('0.12'), output_mtok=Decimal('3.4')),
            ),
            ModelInfo(
                id='nemotron-3.5-lightning',
                match=ClauseEquals(equals='nemotron-3.5-lightning'),
                name='Nemotron 3.5 Lightning',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.08'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('0.2')
                ),
            ),
            ModelInfo(
                id='qwen3.6-35b',
                match=ClauseEquals(equals='qwen3.6-35b'),
                name='Qwen3.6-35B-A3B',
                context_window=262144,
                prices=ModelPrice(
                    input_mtok=Decimal('0.112'), cache_read_mtok=Decimal('0.04'), output_mtok=Decimal('0.8')
                ),
            ),
            ModelInfo(
                id='qwen3.6-plus',
                match=ClauseEquals(equals='qwen3.6-plus'),
                name='Qwen3.6 Plus',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.26'), cache_write_mtok=Decimal('0.325'), output_mtok=Decimal('1.56')
                ),
            ),
            ModelInfo(
                id='qwen3.7-flash',
                match=ClauseEquals(equals='qwen3.7-flash'),
                name='Qwen3.7 Flash',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.024'), cache_read_mtok=Decimal('0.0048'), output_mtok=Decimal('0.104')
                ),
            ),
            ModelInfo(
                id='qwen3.7-max',
                match=ClauseEquals(equals='qwen3.7-max'),
                name='Qwen3.7 Max',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('1.25'),
                    cache_write_mtok=Decimal('1.5625'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('3.75'),
                ),
            ),
            ModelInfo(
                id='qwen3.7-plus',
                match=ClauseEquals(equals='qwen3.7-plus'),
                name='Qwen3.7 Plus',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('0.256'),
                    cache_write_mtok=Decimal('0.32'),
                    cache_read_mtok=Decimal('0.0512'),
                    output_mtok=Decimal('1.024'),
                ),
            ),
            ModelInfo(
                id='qwen3.8-27b',
                match=ClauseEquals(equals='qwen3.8-27b'),
                name='Qwen3.8 27B',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.34'),
                    cache_write_mtok=Decimal('0.425'),
                    cache_read_mtok=Decimal('0.068'),
                    output_mtok=Decimal('2.04'),
                ),
            ),
            ModelInfo(
                id='qwen3.8-max',
                match=ClauseEquals(equals='qwen3.8-max'),
                name='Qwen3.8 Max',
                context_window=1048576,
                prices=ModelPrice(
                    input_mtok=Decimal('2'),
                    cache_write_mtok=Decimal('2.5'),
                    cache_read_mtok=Decimal('0.25'),
                    output_mtok=Decimal('6'),
                ),
            ),
        ],
    ),
    Provider(
        id='together',
        name='Together AI',
        api_pattern='https://api\\.together\\.xyz',
        pricing_urls=['https://www.together.ai/pricing'],
        provider_match=ClauseOr(or_=[ClauseEquals(equals='together-ai'), ClauseEquals(equals='together_ai')]),
        models=[
            ModelInfo(
                id='Austism/chronos-hermes-13b',
                match=ClauseEquals(equals='Austism/chronos-hermes-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Gryphe/MythoMax-L2-13b',
                match=ClauseEquals(equals='Gryphe/MythoMax-L2-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Nexusflow/NexusRaven-V2-13B',
                match=ClauseEquals(equals='Nexusflow/NexusRaven-V2-13B'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Capybara-7B-V1p9',
                match=ClauseEquals(equals='NousResearch/Nous-Capybara-7B-V1p9'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO',
                match=ClauseEquals(equals='NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT',
                match=ClauseEquals(equals='NousResearch/Nous-Hermes-2-Mixtral-8x7B-SFT'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Hermes-2-Yi-34B',
                match=ClauseEquals(equals='NousResearch/Nous-Hermes-2-Yi-34B'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Hermes-Llama2-13b',
                match=ClauseEquals(equals='NousResearch/Nous-Hermes-Llama2-13b'),
                prices=ModelPrice(input_mtok=Decimal('0.225'), output_mtok=Decimal('0.225')),
            ),
            ModelInfo(
                id='NousResearch/Nous-Hermes-llama-2-7b',
                match=ClauseEquals(equals='NousResearch/Nous-Hermes-llama-2-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Open-Orca/Mistral-7B-OpenOrca',
                match=ClauseEquals(equals='Open-Orca/Mistral-7B-OpenOrca'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-0.5B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen/Qwen1.5-0.5B'), ClauseEquals(equals='Qwen/Qwen1.5-0.5B-Chat')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-1.8B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen/Qwen1.5-1.8B'), ClauseEquals(equals='Qwen/Qwen1.5-1.8B-Chat')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-14B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen/Qwen1.5-14B'), ClauseEquals(equals='Qwen/Qwen1.5-14B-Chat')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-4B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen/Qwen1.5-4B'), ClauseEquals(equals='Qwen/Qwen1.5-4B-Chat')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-72B',
                match=ClauseEquals(equals='Qwen/Qwen1.5-72B'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='Qwen/Qwen1.5-7B',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='Qwen/Qwen1.5-7B'), ClauseEquals(equals='Qwen/Qwen1.5-7B-Chat')]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='Undi95/ReMM-SLERP-L2-13B',
                match=ClauseEquals(equals='Undi95/ReMM-SLERP-L2-13B'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='Undi95/Toppy-M-7B',
                match=ClauseEquals(equals='Undi95/Toppy-M-7B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='WizardLM/WizardLM-13B-V1.2',
                match=ClauseEquals(equals='WizardLM/WizardLM-13B-V1.2'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='allenai/OLMo-7B',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='allenai/OLMo-7B'),
                        ClauseEquals(equals='allenai/OLMo-7B-Instruct'),
                        ClauseEquals(equals='allenai/OLMo-7B-Twin-2T'),
                    ]
                ),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='codellama/CodeLlama-13b-Instruct-hf',
                match=ClauseEquals(equals='codellama/CodeLlama-13b-Instruct-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.225'), output_mtok=Decimal('0.225')),
            ),
            ModelInfo(
                id='codellama/CodeLlama-34b-Instruct-hf',
                match=ClauseEquals(equals='codellama/CodeLlama-34b-Instruct-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.776'), output_mtok=Decimal('0.776')),
            ),
            ModelInfo(
                id='codellama/CodeLlama-70b-Instruct-hf',
                match=ClauseEquals(equals='codellama/CodeLlama-70b-Instruct-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='codellama/CodeLlama-7b-Instruct-hf',
                match=ClauseEquals(equals='codellama/CodeLlama-7b-Instruct-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='deepseek-ai/deepseek-coder-33b-instruct',
                match=ClauseEquals(equals='deepseek-ai/deepseek-coder-33b-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='garage-bAInd/Platypus2-70B-instruct',
                match=ClauseEquals(equals='garage-bAInd/Platypus2-70B-instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='google/gemma-2b',
                match=ClauseOr(or_=[ClauseEquals(equals='google/gemma-2b'), ClauseEquals(equals='google/gemma-2b-it')]),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='google/gemma-7b',
                match=ClauseOr(or_=[ClauseEquals(equals='google/gemma-7b'), ClauseEquals(equals='google/gemma-7b-it')]),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='lmsys/vicuna-13b-v1.5',
                match=ClauseEquals(equals='lmsys/vicuna-13b-v1.5'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='lmsys/vicuna-7b-v1.5',
                match=ClauseEquals(equals='lmsys/vicuna-7b-v1.5'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='meta-llama/Llama-2-13b-chat-hf',
                match=ClauseEquals(equals='meta-llama/Llama-2-13b-chat-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.225'), output_mtok=Decimal('0.225')),
            ),
            ModelInfo(
                id='meta-llama/Llama-2-70b-chat-hf',
                match=ClauseEquals(equals='meta-llama/Llama-2-70b-chat-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='meta-llama/Llama-2-7b-chat-hf',
                match=ClauseEquals(equals='meta-llama/Llama-2-7b-chat-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3-70b-chat-hf',
                match=ClauseEquals(equals='meta-llama/Llama-3-70b-chat-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3-8b-chat-hf',
                match=ClauseEquals(equals='meta-llama/Llama-3-8b-chat-hf'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='meta-llama/Llama-3.3-70B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Llama-3.3-70B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8',
                match=ClauseEquals(equals='meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'),
                prices=ModelPrice(input_mtok=Decimal('0.27'), output_mtok=Decimal('0.85')),
            ),
            ModelInfo(
                id='meta-llama/Llama-4-Scout-17B-16E-Instruct',
                match=ClauseEquals(equals='meta-llama/Llama-4-Scout-17B-16E-Instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.59')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-70B-Instruct-Lite',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3-70B-Instruct-Lite'),
                prices=ModelPrice(input_mtok=Decimal('0.54'), output_mtok=Decimal('0.54')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-70B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3-70B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-8B-Instruct-Lite',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3-8B-Instruct-Lite'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3-8B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3-8B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('3.5'), output_mtok=Decimal('3.5')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.18'), output_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='meta-llama/Meta-Llama-3.3-70B-Instruct-Turbo',
                match=ClauseEquals(equals='meta-llama/Meta-Llama-3.3-70B-Instruct-Turbo'),
                prices=ModelPrice(input_mtok=Decimal('0.88'), output_mtok=Decimal('0.88')),
            ),
            ModelInfo(
                id='microsoft/WizardLM-2-8x22B',
                match=ClauseEquals(equals='microsoft/WizardLM-2-8x22B'),
                prices=ModelPrice(input_mtok=Decimal('1.2'), output_mtok=Decimal('1.2')),
            ),
            ModelInfo(
                id='microsoft/phi-2',
                match=ClauseEquals(equals='microsoft/phi-2'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='mistralai/Mistral-7B-Instruct-v0.1',
                match=ClauseEquals(equals='mistralai/Mistral-7B-Instruct-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/Mistral-7B-Instruct-v0.2',
                match=ClauseEquals(equals='mistralai/Mistral-7B-Instruct-v0.2'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/Mistral-7B-v0.1',
                match=ClauseEquals(equals='mistralai/Mistral-7B-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='mistralai/Mixtral-8x22B-Instruct-v0.1',
                match=ClauseEquals(equals='mistralai/Mixtral-8x22B-Instruct-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('2.4'), output_mtok=Decimal('2.4')),
            ),
            ModelInfo(
                id='mistralai/Mixtral-8x7B-Instruct-v0.1',
                match=ClauseEquals(equals='mistralai/Mixtral-8x7B-Instruct-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='mistralai/Mixtral-8x7B-v0.1',
                match=ClauseEquals(equals='mistralai/Mixtral-8x7B-v0.1'),
                prices=ModelPrice(input_mtok=Decimal('0.9'), output_mtok=Decimal('0.9')),
            ),
            ModelInfo(
                id='openchat/openchat-3.5-1210',
                match=ClauseEquals(equals='openchat/openchat-3.5-1210'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='snorkelai/Snorkel-Mistral-PairRM-DPO',
                match=ClauseEquals(equals='snorkelai/Snorkel-Mistral-PairRM-DPO'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='teknium/OpenHermes-2-Mistral-7B',
                match=ClauseEquals(equals='teknium/OpenHermes-2-Mistral-7B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='teknium/OpenHermes-2p5-Mistral-7B',
                match=ClauseEquals(equals='teknium/OpenHermes-2p5-Mistral-7B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/GPT-JT-Moderation-6B',
                match=ClauseEquals(equals='togethercomputer/GPT-JT-Moderation-6B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/Llama-2-7B-32K-Instruct',
                match=ClauseEquals(equals='togethercomputer/Llama-2-7B-32K-Instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-7B-Base',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-7B-Base'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-7B-Chat',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-7B-Chat'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-7B-Instruct',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-7B-Instruct'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-Base-3B-v1',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-Base-3B-v1'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-Chat-3B-v1',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-Chat-3B-v1'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='togethercomputer/RedPajama-INCITE-Instruct-3B-v1',
                match=ClauseEquals(equals='togethercomputer/RedPajama-INCITE-Instruct-3B-v1'),
                prices=ModelPrice(input_mtok=Decimal('0.1'), output_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='togethercomputer/StripedHyena-Hessian-7B',
                match=ClauseEquals(equals='togethercomputer/StripedHyena-Hessian-7B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/StripedHyena-Nous-7B',
                match=ClauseEquals(equals='togethercomputer/StripedHyena-Nous-7B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='togethercomputer/alpaca-7b',
                match=ClauseEquals(equals='togethercomputer/alpaca-7b'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
            ModelInfo(
                id='upstage/SOLAR-10.7B-Instruct-v1.0',
                match=ClauseEquals(equals='upstage/SOLAR-10.7B-Instruct-v1.0'),
                prices=ModelPrice(input_mtok=Decimal('0.3'), output_mtok=Decimal('0.3')),
            ),
            ModelInfo(
                id='zero-one-ai/Yi-34B',
                match=ClauseEquals(equals='zero-one-ai/Yi-34B'),
                prices=ModelPrice(input_mtok=Decimal('0.8'), output_mtok=Decimal('0.8')),
            ),
            ModelInfo(
                id='zero-one-ai/Yi-6B',
                match=ClauseEquals(equals='zero-one-ai/Yi-6B'),
                prices=ModelPrice(input_mtok=Decimal('0.2'), output_mtok=Decimal('0.2')),
            ),
        ],
    ),
    Provider(
        id='typesafe',
        name='TypeSafe',
        api_pattern='https://api\\.typesafe\\.ai',
        pricing_urls=['https://docs.typesafe.ai/models'],
        price_comments='TypeSafe bills Jev per input token only; output tokens are free. `jev-latest` and `jev-preview` are aliases that move with releases and currently point at `jev-1.13.0`; a versioned id is billed the same.',
        model_match=ClauseStartsWith(starts_with='jev-'),
        provider_match=ClauseContains(contains='typesafe'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='jev-1.13.0',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='jev-1.13.0'),
                        ClauseEquals(equals='jev-latest'),
                        ClauseEquals(equals='jev-preview'),
                    ]
                ),
                name='Jev 1.13.0',
                prices=ModelPrice(input_mtok=Decimal('0.042')),
            )
        ],
    ),
    Provider(
        id='voyageai',
        name='Voyage AI',
        api_pattern='https://api\\.voyageai\\.com',
        pricing_urls=['https://docs.voyageai.com/docs/pricing'],
        price_comments='Voyage AI bills per input token only; embedding models produce vectors rather than completion tokens, so there is no output price. The Batch API offers a 33% discount. This file covers text embedding models only; rerankers and multimodal embedding models are not included.',
        model_match=ClauseStartsWith(starts_with='voyage-'),
        provider_match=ClauseContains(contains='voyage'),
        models=[
            ModelInfo(
                id='voyage-01',
                match=ClauseEquals(equals='voyage-01'),
                name='Voyage 01',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-02',
                match=ClauseEquals(equals='voyage-02'),
                name='Voyage 02',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-2',
                match=ClauseEquals(equals='voyage-2'),
                name='Voyage 2',
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-3',
                match=ClauseEquals(equals='voyage-3'),
                name='Voyage 3',
                description='General-purpose text embedding model optimized for retrieval quality and cost.',
                prices=ModelPrice(input_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='voyage-3-large',
                match=ClauseEquals(equals='voyage-3-large'),
                name='Voyage 3 Large',
                prices=ModelPrice(input_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='voyage-3-lite',
                match=ClauseEquals(equals='voyage-3-lite'),
                name='Voyage 3 Lite',
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='voyage-3.5',
                match=ClauseEquals(equals='voyage-3.5'),
                name='Voyage 3.5',
                description='General-purpose text embedding model optimized for retrieval quality and cost.',
                prices=ModelPrice(input_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='voyage-3.5-lite',
                match=ClauseEquals(equals='voyage-3.5-lite'),
                name='Voyage 3.5 Lite',
                description='Latency- and cost-optimized variant of voyage-3.5.',
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='voyage-4',
                match=ClauseEquals(equals='voyage-4'),
                name='Voyage 4',
                description='General-purpose text embedding model balancing retrieval quality and cost.',
                prices=ModelPrice(input_mtok=Decimal('0.06')),
            ),
            ModelInfo(
                id='voyage-4-large',
                match=ClauseEquals(equals='voyage-4-large'),
                name='Voyage 4 Large',
                description='Highest-quality general-purpose text embedding model in the Voyage 4 family.',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-4-lite',
                match=ClauseEquals(equals='voyage-4-lite'),
                name='Voyage 4 Lite',
                description='Latency- and cost-optimized text embedding model in the Voyage 4 family.',
                prices=ModelPrice(input_mtok=Decimal('0.02')),
            ),
            ModelInfo(
                id='voyage-code-2',
                match=ClauseEquals(equals='voyage-code-2'),
                name='Voyage Code 2',
                description='Embedding model optimized for code retrieval.',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-code-3',
                match=ClauseEquals(equals='voyage-code-3'),
                name='Voyage Code 3',
                description='Embedding model optimized for code retrieval.',
                prices=ModelPrice(input_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='voyage-context-3',
                match=ClauseEquals(equals='voyage-context-3'),
                name='Voyage Context 3',
                description='Contextualized chunk embedding model that encodes chunks together with full-document context.',
                prices=ModelPrice(input_mtok=Decimal('0.18')),
            ),
            ModelInfo(
                id='voyage-finance-2',
                match=ClauseEquals(equals='voyage-finance-2'),
                name='Voyage Finance 2',
                description='Embedding model optimized for finance-domain retrieval.',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-large-2',
                match=ClauseEquals(equals='voyage-large-2'),
                name='Voyage Large 2',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-large-2-instruct',
                match=ClauseEquals(equals='voyage-large-2-instruct'),
                name='Voyage Large 2 Instruct',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-law-2',
                match=ClauseEquals(equals='voyage-law-2'),
                name='Voyage Law 2',
                description='Embedding model optimized for legal-domain retrieval.',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
            ModelInfo(
                id='voyage-lite-01',
                match=ClauseEquals(equals='voyage-lite-01'),
                name='Voyage Lite 01',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-lite-01-instruct',
                match=ClauseEquals(equals='voyage-lite-01-instruct'),
                name='Voyage Lite 01 Instruct',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-lite-02-instruct',
                match=ClauseEquals(equals='voyage-lite-02-instruct'),
                name='Voyage Lite 02 Instruct',
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('0.1')),
            ),
            ModelInfo(
                id='voyage-multilingual-2',
                match=ClauseEquals(equals='voyage-multilingual-2'),
                name='Voyage Multilingual 2',
                prices=ModelPrice(input_mtok=Decimal('0.12')),
            ),
        ],
    ),
    Provider(
        id='x-ai',
        name='X AI',
        api_pattern='https://api\\.x\\.ai',
        pricing_urls=['https://docs.x.ai/docs/models'],
        model_match=ClauseContains(contains='grok'),
        provider_match=ClauseEquals(equals='xai'),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(path='cached_prompt_text_tokens', dest='cache_read_tokens', required=False),
                    UsageExtractorMapping(path='reasoning_tokens', dest='output_tokens', required=False),
                    UsageExtractorMapping(path='reasoning_tokens', dest='output_reasoning_tokens', required=False),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='default',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'], dest='output_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            ),
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='input_tokens', dest='input_tokens', required=False),
                    UsageExtractorMapping(
                        path=['input_token_details', 'text_tokens'], dest='input_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['input_token_details', 'audio_tokens'], dest='input_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(path='output_tokens', dest='output_tokens', required=False),
                    UsageExtractorMapping(
                        path=['output_token_details', 'text_tokens'], dest='output_text_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['output_token_details', 'audio_tokens'], dest='output_audio_tokens', required=False
                    ),
                    UsageExtractorMapping(path='billable_audio_seconds', dest='audio_seconds', required=True),
                    UsageExtractorMapping(path='input_text_messages', dest='input_text_messages', required=False),
                ],
                api_flavor='realtime',
                model_path='model',
            ),
        ],
        models=[
            ModelInfo(
                id='grok-2-1212',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-2-1212'),
                        ClauseEquals(equals='grok-2'),
                        ClauseEquals(equals='grok-2-latest'),
                    ]
                ),
                name='Grok 2 1212',
                description='(deprecated) Grok 2 1212 introduces significant enhancements to accuracy, instruction adherence, and multilingual support, making it a powerful and flexible choice for developers seeking a highly steerable, intelligent model.',
                context_window=32768,
                deprecated=True,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='grok-2-vision-1212',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-2-vision-1212'),
                        ClauseEquals(equals='grok-2-vision'),
                        ClauseEquals(equals='grok-2-vision-latest'),
                    ]
                ),
                name='Grok 2 Vision 1212',
                description='Our multimodal model that processes documents, diagrams, charts, screenshots, and photographs.',
                context_window=32768,
                prices=ModelPrice(input_mtok=Decimal('2'), output_mtok=Decimal('10')),
            ),
            ModelInfo(
                id='grok-3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-3'),
                        ClauseEquals(equals='grok-3-latest'),
                        ClauseEquals(equals='grok-3-beta'),
                    ]
                ),
                name='Grok 3',
                description='Flagship model that excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in finance, healthcare, law, and science.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.75'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='grok-3-fast',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-3-fast'),
                        ClauseEquals(equals='grok-3-fast-latest'),
                        ClauseEquals(equals='grok-3-fast-beta'),
                    ]
                ),
                name='Grok 3 Fast',
                description='Excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in finance, healthcare, law, and science.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('5'), cache_read_mtok=Decimal('1.25'), output_mtok=Decimal('25')),
            ),
            ModelInfo(
                id='grok-3-mini',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-3-mini'),
                        ClauseEquals(equals='grok-3-mini-beta'),
                        ClauseEquals(equals='grok-3-mini-latest'),
                    ]
                ),
                name='Grok 3 Mini',
                description='A lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require deep domain knowledge. The raw thinking traces are accessible.',
                context_window=131072,
                prices=ModelPrice(
                    input_mtok=Decimal('0.3'), cache_read_mtok=Decimal('0.075'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-3-mini-fast',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-3-mini-fast'),
                        ClauseEquals(equals='grok-3-mini-fast-beta'),
                        ClauseEquals(equals='grok-3-mini-fast-latest'),
                    ]
                ),
                name='Grok 3 Mini Fast',
                description='A lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require deep domain knowledge. The raw thinking traces are accessible.',
                context_window=131072,
                prices=ModelPrice(input_mtok=Decimal('0.6'), cache_read_mtok=Decimal('0.15'), output_mtok=Decimal('4')),
            ),
            ModelInfo(
                id='grok-4-0709',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4-0709'),
                        ClauseEquals(equals='grok-4'),
                        ClauseEquals(equals='grok-4-latest'),
                    ]
                ),
                name='Grok 4',
                description='A flagship model, offering unparalleled performance in natural language, math and reasoning - the perfect jack of all trades.',
                context_window=256000,
                prices=ModelPrice(input_mtok=Decimal('3'), cache_read_mtok=Decimal('0.75'), output_mtok=Decimal('15')),
            ),
            ModelInfo(
                id='grok-4-1-fast-non-reasoning',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4-1-fast-non-reasoning'),
                        ClauseEquals(equals='grok-4-1-fast-non-reasoning-latest'),
                    ]
                ),
                name='Grok 4.1 Fast Non-Reasoning',
                description='A frontier multimodal model optimized specifically for high-performance agentic tool calling.',
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-4-1-fast-reasoning',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4-1-fast'),
                        ClauseEquals(equals='grok-4-1-fast-reasoning'),
                        ClauseEquals(equals='grok-4-1-fast-reasoning-latest'),
                    ]
                ),
                name='Grok 4.1 Fast Reasoning',
                description='A frontier multimodal model optimized specifically for high-performance agentic tool calling.',
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-4-fast-non-reasoning',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4-fast-non-reasoning'),
                        ClauseEquals(equals='grok-4-fast-non-reasoning-latest'),
                    ]
                ),
                name='Grok 4 Fast Non-Reasoning',
                description='A frontier multimodal model optimized specifically for high-performance agentic tool calling.',
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-4-fast-reasoning',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4-fast'),
                        ClauseEquals(equals='grok-4-fast-reasoning'),
                        ClauseEquals(equals='grok-4-fast-reasoning-latest'),
                    ]
                ),
                name='Grok 4 Fast Reasoning',
                description='A frontier multimodal model optimized specifically for high-performance agentic tool calling.',
                context_window=2000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.05'), output_mtok=Decimal('0.5')
                ),
            ),
            ModelInfo(
                id='grok-4.20',
                match=ClauseEquals(equals='grok-4.20'),
                name='Grok 4.20',
                description='Grok 4.20 is a reasoning model from xAI with industry-leading speed and agentic tool calling capabilities. It combines low hallucination rates with strict prompt adherence.',
                context_window=1000000,
                price_comments='Prompts at or above 200k tokens are billed at the higher rate for every token in the request, not just the tokens past the threshold. xAI\'s boundary is inclusive -- its table columns read "< 200k prompt tokens" and ">= 200k prompt tokens" -- while a tier here fires on `tokens > start`, so the start is 199999 and a 200000-token prompt lands on the higher rate. Ref: https://docs.x.ai/docs/models',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1.25'), tiers=[Tier(start=199999, price=Decimal('2.5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=199999, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=199999, price=Decimal('5'))]),
                ),
            ),
            ModelInfo(
                id='grok-4.20-multi-agent',
                match=ClauseEquals(equals='grok-4.20-multi-agent'),
                name='Grok 4.20 Multi-Agent',
                description="Grok 4.20 Multi-Agent is a variant of xAI's Grok 4.20 designed for collaborative, agent-based workflows. Multiple agents operate in parallel to conduct deep research, coordinate tool use, and synthesize information.",
                context_window=1000000,
                prices=ModelPrice(input_mtok=Decimal('2'), cache_read_mtok=Decimal('0.2'), output_mtok=Decimal('6')),
            ),
            ModelInfo(
                id='grok-4.3',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4.3'),
                        ClauseRegex(regex='^grok-4\\.3-\\d{8}$'),
                        ClauseEquals(equals='x-ai/grok-4.3'),
                        ClauseRegex(regex='^x-ai/grok-4\\.3-\\d{8}$'),
                        ClauseEquals(equals='grok-4.3-latest'),
                    ]
                ),
                name='Grok 4.3',
                description='Most advanced flagship model, leading the industry in non-hallucination rate, agentic tool calling, and instruction following capabilities. Supports text and image inputs with text outputs, function calling, structured outputs, and reasoning.',
                context_window=1000000,
                price_comments='Prompts at or above 200k tokens are billed at the higher rate for every token in the request, not just the tokens past the threshold. xAI\'s boundary is inclusive -- its table columns read "< 200k prompt tokens" and ">= 200k prompt tokens" -- while a tier here fires on `tokens > start`, so the start is 199999 and a 200000-token prompt lands on the higher rate. Ref: https://docs.x.ai/docs/models',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1.25'), tiers=[Tier(start=199999, price=Decimal('2.5'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=199999, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('2.5'), tiers=[Tier(start=199999, price=Decimal('5'))]),
                ),
            ),
            ModelInfo(
                id='grok-4.5',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4.5'),
                        ClauseRegex(regex='^grok-4\\.5-\\d{8}$'),
                        ClauseEquals(equals='x-ai/grok-4.5'),
                        ClauseRegex(regex='^x-ai/grok-4\\.5-\\d{8}$'),
                        ClauseEquals(equals='grok-4.5-latest'),
                        ClauseEquals(equals='grok-latest'),
                    ]
                ),
                name='Grok 4.5',
                description="xAI's most intelligent and fastest flagship model, well-suited for general-purpose use including coding and chat. Supports text and image inputs with text outputs, function calling, structured outputs, and reasoning.",
                context_window=500000,
                price_comments='Prompts at or above 200k tokens are billed at the higher rate for every token in the request, not just the tokens past the threshold. xAI\'s boundary is inclusive -- its table columns read "< 200k prompt tokens" and ">= 200k prompt tokens" -- while a tier here fires on `tokens > start`, so the start is 199999 and a 200000-token prompt lands on the higher rate. The base cache-read price is 0.30, not 0.50 - 0.50 is Grok 4.6\'s. Ref: https://docs.x.ai/docs/models/grok-4.5',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=199999, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.3'), tiers=[Tier(start=199999, price=Decimal('0.6'))]),
                    output_mtok=TieredPrices(base=Decimal('6'), tiers=[Tier(start=199999, price=Decimal('12'))]),
                ),
            ),
            ModelInfo(
                id='grok-4.6',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-4.6'),
                        ClauseRegex(regex='^grok-4\\.6-\\d{8}$'),
                        ClauseEquals(equals='x-ai/grok-4.6'),
                        ClauseRegex(regex='^x-ai/grok-4\\.6-\\d{8}$'),
                        ClauseEquals(equals='grok-4.6-latest'),
                    ]
                ),
                name='Grok 4.6',
                description="xAI's latest flagship model, released 2026-08-12. Supports text and image inputs with text outputs, function calling, structured outputs, and reasoning, over a 500k-token context window.",
                context_window=500000,
                price_comments='Prompts at or above 200k tokens are billed at the higher rate for every token in the request, not just the tokens past the threshold. xAI\'s boundary is inclusive -- its table columns read "< 200k prompt tokens" and ">= 200k prompt tokens" -- while a tier here fires on `tokens > start`, so the start is 199999 and a 200000-token prompt lands on the higher rate. Ref: https://docs.x.ai/docs/models/grok-4.6',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=199999, price=Decimal('4'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.5'), tiers=[Tier(start=199999, price=Decimal('1'))]),
                    output_mtok=TieredPrices(base=Decimal('6'), tiers=[Tier(start=199999, price=Decimal('12'))]),
                ),
            ),
            ModelInfo(
                id='grok-build-0.1',
                match=ClauseEquals(equals='grok-build-0.1'),
                name='Grok Build 0.1',
                description="Grok Build 0.1 is xAI's fast coding model trained specifically for agentic software engineering workflows. It supports text and image inputs with text output, and is optimized for interactive coding.",
                context_window=256000,
                price_comments='Prompts at or above 200k tokens are billed at the higher rate for every token in the request, not just the tokens past the threshold. xAI\'s boundary is inclusive -- its table columns read "< 200k prompt tokens" and ">= 200k prompt tokens" -- while a tier here fires on `tokens > start`, so the start is 199999 and a 200000-token prompt lands on the higher rate. Ref: https://docs.x.ai/docs/models',
                prices=ModelPrice(
                    input_mtok=TieredPrices(base=Decimal('1'), tiers=[Tier(start=199999, price=Decimal('2'))]),
                    cache_read_mtok=TieredPrices(base=Decimal('0.2'), tiers=[Tier(start=199999, price=Decimal('0.4'))]),
                    output_mtok=TieredPrices(base=Decimal('2'), tiers=[Tier(start=199999, price=Decimal('4'))]),
                ),
            ),
            ModelInfo(
                id='grok-code-fast-1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='grok-code-fast'),
                        ClauseEquals(equals='grok-code-fast-1'),
                        ClauseEquals(equals='grok-code-fast-1-0825'),
                    ]
                ),
                name='Grok Code Fast 1',
                description='A speedy and economical reasoning model that excels at agentic coding.',
                context_window=256000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.2'), cache_read_mtok=Decimal('0.02'), output_mtok=Decimal('1.5')
                ),
            ),
            ModelInfo(
                id='grok-voice-latest',
                match=ClauseEquals(equals='grok-voice-latest'),
                name='Grok Voice',
                price_comments='See https://docs.x.ai/developers/release-notes and https://docs.x.ai/developers/pricing#voice-pricing.',
                prices=[
                    ConditionalPrice(
                        prices=ModelPrice(audio_hours=Decimal('3'), input_text_messages_kcount=Decimal('4'))
                    ),
                    ConditionalPrice(
                        constraint=StartDateConstraint(start_date=datetime.date(2026, 8, 5)),
                        prices=ModelPrice(audio_hours=Decimal('4.8'), input_text_messages_kcount=Decimal('4')),
                    ),
                ],
            ),
            ModelInfo(
                id='grok-voice-think-fast-1.0',
                match=ClauseEquals(equals='grok-voice-think-fast-1.0'),
                name='Grok Voice Think Fast 1.0',
                price_comments='See https://docs.x.ai/developers/pricing#voice-pricing.',
                deprecated=True,
                prices=ModelPrice(audio_hours=Decimal('3'), input_text_messages_kcount=Decimal('4')),
            ),
            ModelInfo(
                id='grok-voice-think-fast-2.0',
                match=ClauseEquals(equals='grok-voice-think-fast-2.0'),
                name='Grok Voice Think Fast 2.0',
                price_comments='See https://docs.x.ai/developers/pricing#voice-pricing.',
                prices=ModelPrice(audio_hours=Decimal('4.8'), input_text_messages_kcount=Decimal('4')),
            ),
        ],
    ),
    Provider(
        id='zai',
        name='Z.AI',
        api_pattern='https://api\\.z\\.ai',
        pricing_urls=['https://docs.z.ai/guides/overview/pricing'],
        price_comments='USD prices from the Z.AI pricing page. The API pattern covers both the standard and Coding Plan endpoints, with Coding Plan usage valued at the published API rates.',
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='GLM-5.2',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.2'), ClauseEquals(equals='glm-5.2')]),
                name='GLM-5.2',
                description='Z.AI flagship model with a 1,000,000 token context window, context caching, structured output, and function calling.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='GLM-5.3',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.3'), ClauseEquals(equals='glm-5.3')]),
                name='GLM-5.3',
                description='Z.AI flagship model with a 1,000,000 token context window, context caching, structured output, and function calling. Reasoning is always enabled, with low, high and max effort levels.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.4'), cache_read_mtok=Decimal('0.26'), output_mtok=Decimal('4.4')
                ),
            ),
            ModelInfo(
                id='GLM-5.3-Flash',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.3-Flash'), ClauseEquals(equals='glm-5.3-flash')]),
                name='GLM-5.3-Flash',
                description='Z.AI native multimodal model with a 1,000,000 token context window, context caching, function calling, and always-on reasoning.',
                context_window=1000000,
                price_comments='Standard API rates reflect the 50% launch promotion ending at 24:00 on September 9, 2026 (UTC+8): list prices are $0.15 input, $0.03 cached input, and $0.50 output per million tokens.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.075'), cache_read_mtok=Decimal('0.015'), output_mtok=Decimal('0.25')
                ),
            ),
        ],
    ),
    Provider(
        id='zhipuai',
        name='Zhipu AI',
        api_pattern='https://open\\.bigmodel\\.cn',
        pricing_urls=['https://open.bigmodel.cn/pricing', 'https://docs.bigmodel.cn/cn/guide/start/model-overview'],
        price_comments='Prices sourced from Zhipu AI open platform pricing (CNY, open.bigmodel.cn/pricing), converted to USD at 1 USD = 7.25 CNY (May/June 2026). Zhipu AI does not publish USD prices; CNY is the only billing currency. Flagship models (GLM-4.5-Air, GLM-4.7, GLM-5 series) have tiered pricing by input/output length; prices shown are for the cheapest tier ([0, 32k) input / [0, 0.2k) output where applicable). GLM-4 standard inference models (GLM-4-Air, GLM-4-Plus, etc.) bill input and output tokens at the same per-token rate per their pricing page. Cache write is temporarily free for flagship models (limited-time promotion, not included).',
        model_match=ClauseOr(or_=[ClauseStartsWith(starts_with='GLM-'), ClauseStartsWith(starts_with='glm-')]),
        extractors=[
            UsageExtractor(
                root='usage',
                mappings=[
                    UsageExtractorMapping(path='prompt_tokens', dest='input_tokens', required=True),
                    UsageExtractorMapping(
                        path=['prompt_tokens_details', 'cached_tokens'], dest='cache_read_tokens', required=False
                    ),
                    UsageExtractorMapping(
                        path=['completion_tokens_details', 'reasoning_tokens'],
                        dest='output_reasoning_tokens',
                        required=False,
                    ),
                    UsageExtractorMapping(path='completion_tokens', dest='output_tokens', required=True),
                ],
                api_flavor='chat',
                model_path='model',
            )
        ],
        models=[
            ModelInfo(
                id='GLM-4-Air',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4-Air'), ClauseEquals(equals='glm-4-air')]),
                name='GLM-4-Air',
                description='High-performance GLM-4 model with context caching. 128,000 token context window. Input and output billed at the same per-token rate.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.069'), cache_read_mtok=Decimal('0.034'), output_mtok=Decimal('0.069')
                ),
            ),
            ModelInfo(
                id='GLM-4-AirX',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4-AirX'), ClauseEquals(equals='glm-4-airx')]),
                name='GLM-4-AirX',
                description='Fastest GLM-4 model. 8,000 token context window. Does not support context caching. Input and output billed at the same per-token rate.',
                context_window=8000,
                prices=ModelPrice(input_mtok=Decimal('1.379'), output_mtok=Decimal('1.379')),
            ),
            ModelInfo(
                id='GLM-4-Assistant',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4-Assistant'), ClauseEquals(equals='glm-4-assistant')]),
                name='GLM-4-Assistant',
                description='GLM-4 agent/assistant model. 128,000 token context window. Does not support context caching. Input and output billed at the same per-token rate.',
                context_window=128000,
                prices=ModelPrice(input_mtok=Decimal('0.69'), output_mtok=Decimal('0.69')),
            ),
            ModelInfo(
                id='GLM-4-FlashX-250414',
                match=ClauseOr(
                    or_=[ClauseEquals(equals='GLM-4-FlashX-250414'), ClauseEquals(equals='glm-4-flashx-250414')]
                ),
                name='GLM-4-FlashX-250414',
                description='Fast and cheap GLM-4 model with context caching. 128,000 token context window. Input and output billed at the same per-token rate.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.014'), cache_read_mtok=Decimal('0.007'), output_mtok=Decimal('0.014')
                ),
            ),
            ModelInfo(
                id='GLM-4-Long',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4-Long'), ClauseEquals(equals='glm-4-long')]),
                name='GLM-4-Long',
                description='GLM-4 model optimized for long inputs with context caching. 1,000,000 token context window. Input and output billed at the same per-token rate.',
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.138'), cache_read_mtok=Decimal('0.069'), output_mtok=Decimal('0.138')
                ),
            ),
            ModelInfo(
                id='GLM-4-Plus',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4-Plus'), ClauseEquals(equals='glm-4-plus')]),
                name='GLM-4-Plus',
                description='Flagship GLM-4 model with context caching. 128,000 token context window. Input and output billed at the same per-token rate.',
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.69'), cache_read_mtok=Decimal('0.345'), output_mtok=Decimal('0.69')
                ),
            ),
            ModelInfo(
                id='GLM-4.5-Air',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4.5-Air'), ClauseEquals(equals='glm-4.5-air')]),
                name='GLM-4.5-Air',
                description="Zhipu AI's GLM-4.5-Air flagship model with context caching. 128,000 token context window. Tiered pricing; prices shown for [0, 32k) input / [0, 0.2k) output tier.",
                context_window=128000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.11'), cache_read_mtok=Decimal('0.022'), output_mtok=Decimal('0.276')
                ),
            ),
            ModelInfo(
                id='GLM-4.7',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4.7'), ClauseEquals(equals='glm-4.7')]),
                name='GLM-4.7',
                description="Zhipu AI's GLM-4.7 flagship model with context caching. 200,000 token context window. Tiered pricing; prices shown for [0, 32k) input / [0, 0.2k) output tier.",
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.276'), cache_read_mtok=Decimal('0.055'), output_mtok=Decimal('1.103')
                ),
            ),
            ModelInfo(
                id='GLM-4.7-FlashX',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-4.7-FlashX'), ClauseEquals(equals='glm-4.7-flashx')]),
                name='GLM-4.7-FlashX',
                description='Fast and affordable GLM-4.7 model with context caching. 200,000 token context window.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.069'), cache_read_mtok=Decimal('0.014'), output_mtok=Decimal('0.414')
                ),
            ),
            ModelInfo(
                id='GLM-5',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5'), ClauseEquals(equals='glm-5')]),
                name='GLM-5',
                description='Zhipu AI GLM-5 model with context caching. 200,000 token context window. Tiered pricing; prices shown for [0, 32k) input tier.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.552'), cache_read_mtok=Decimal('0.138'), output_mtok=Decimal('2.483')
                ),
            ),
            ModelInfo(
                id='GLM-5-Turbo',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5-Turbo'), ClauseEquals(equals='glm-5-turbo')]),
                name='GLM-5-Turbo',
                description='Zhipu AI GLM-5 Turbo model with context caching. 200,000 token context window. Tiered pricing; prices shown for [0, 32k) input tier.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.69'), cache_read_mtok=Decimal('0.166'), output_mtok=Decimal('3.034')
                ),
            ),
            ModelInfo(
                id='GLM-5.1',
                match=ClauseOr(
                    or_=[
                        ClauseEquals(equals='GLM-5.1'),
                        ClauseEquals(equals='glm-5.1'),
                        ClauseEquals(equals='GLM-5.1-20260406'),
                        ClauseEquals(equals='glm-5.1-20260406'),
                    ]
                ),
                name='GLM-5.1',
                description='Zhipu AI flagship model supporting long-horizon tasks, structured output, function calling, and context caching. 200,000 token context window. Tiered pricing; prices shown for [0, 32k) input tier.',
                context_window=200000,
                prices=ModelPrice(
                    input_mtok=Decimal('0.828'), cache_read_mtok=Decimal('0.179'), output_mtok=Decimal('3.31')
                ),
            ),
            ModelInfo(
                id='GLM-5.2',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.2'), ClauseEquals(equals='glm-5.2')]),
                name='GLM-5.2',
                description="Zhipu AI's latest flagship model supporting 1,000,000 token context, long-horizon coding tasks, structured output, function calling, and context caching.",
                context_window=1000000,
                prices=ModelPrice(
                    input_mtok=Decimal('1.103'), cache_read_mtok=Decimal('0.276'), output_mtok=Decimal('3.862')
                ),
            ),
            ModelInfo(
                id='GLM-5.3',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.3'), ClauseEquals(equals='glm-5.3')]),
                name='GLM-5.3',
                description='Zhipu AI flagship model supporting 1,000,000 token context, long-horizon coding tasks, structured output, function calling, and context caching.',
                context_window=1000000,
                price_comments='Standard API rates are 8 CNY input, 2 CNY cached input, and 28 CNY output per million tokens, converted to USD at 1 USD = 7.25 CNY.',
                prices=ModelPrice(
                    input_mtok=Decimal('1.103'), cache_read_mtok=Decimal('0.276'), output_mtok=Decimal('3.862')
                ),
            ),
            ModelInfo(
                id='GLM-5.3-Flash',
                match=ClauseOr(or_=[ClauseEquals(equals='GLM-5.3-Flash'), ClauseEquals(equals='glm-5.3-flash')]),
                name='GLM-5.3-Flash',
                description="Zhipu AI's native multimodal GLM-5.3 model with a 1,000,000 token context window, function calling, always-on reasoning, and context caching.",
                context_window=1000000,
                price_comments='The standard API launch promotion is 0.4 CNY input, 0.115 CNY cached input, and 1.4 CNY output per million tokens, converted to USD at 1 USD = 7.25 CNY. The pricing page marks this as a two-week 50% discount; list prices are 0.8 CNY input, 0.23 CNY cached input, and 2.8 CNY output per million tokens.',
                prices=ModelPrice(
                    input_mtok=Decimal('0.055'), cache_read_mtok=Decimal('0.016'), output_mtok=Decimal('0.193')
                ),
            ),
        ],
    ),
]
