"""Shared optimizer configuration for model distributions."""

from aiservice.llm_models import ANTHROPIC_MODEL, LLM, OPENAI_MODEL

MAX_OPTIMIZER_CALLS = 6
MAX_OPTIMIZER_LP_CALLS = 7


def get_model_distribution(total_calls: int, max_calls: int) -> list[tuple[LLM, int]]:
    final_total_calls = min(total_calls, max_calls)
    # claude_calls should always be less than gpt_calls as it's more expensive
    claude_calls = (final_total_calls - 1) // 2
    gpt_calls = final_total_calls - claude_calls

    return [(OPENAI_MODEL, gpt_calls), (ANTHROPIC_MODEL, claude_calls)]
