diff --git a/.github/workflows/sync-pricing.yml b/.github/workflows/sync-pricing.yml index 94c3cf5..3994d97 100644 --- a/.github/workflows/sync-pricing.yml +++ b/.github/workflows/sync-pricing.yml @@ -8,7 +8,6 @@ on: permissions: contents: write - pull-requests: write jobs: sync-pricing: @@ -23,20 +22,15 @@ jobs: - name: Sync pricing from OpenRouter API run: python scripts/sync-pricing.py --create-missing - - name: Check for changes - id: changes + - name: Commit and push if changed run: | - git diff --quiet && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT" - - - name: Create PR if prices changed - if: steps.changes.outputs.changed == 'true' - uses: peter-evans/create-pull-request@v7 - with: - commit-message: "chore: sync model pricing from OpenRouter API" - title: "chore: sync model pricing from OpenRouter API" - body: | - Automated pricing sync from [OpenRouter API](https://openrouter.ai/api/v1/models). - - Run by `sync-pricing.yml` cron job. - branch: chore/auto-sync-pricing - delete-branch: true + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + if git diff --cached --quiet; then + echo "No pricing changes detected" + else + git commit -m "chore: sync model pricing from OpenRouter API" + git push + echo "Pricing updated and pushed to main" + fi diff --git a/integrations/teams-mcp.toml b/integrations/teams-mcp.toml index 91ee9aa..2e0a498 100644 --- a/integrations/teams-mcp.toml +++ b/integrations/teams-mcp.toml @@ -1,4 +1,4 @@ -id = "teams-mcp@0.3.3" +id = "teams-mcp" name = "Microsoft Teams" description = "Access Microsoft Teams channels, chats, and messages through the MCP server" category = "communication" diff --git a/providers/arcee-ai.toml b/providers/arcee-ai.toml index 6677058..023df06 100644 --- a/providers/arcee-ai.toml +++ b/providers/arcee-ai.toml @@ -40,7 +40,7 @@ supports_streaming = true [[models]] id = "trinity-large-preview:free" display_name = "Arcee AI: Trinity Large Preview (free)" -tier = "free" +tier = "fast" context_window = 131000 max_output_tokens = 16384 input_cost_per_m = 0.0 @@ -60,7 +60,7 @@ supports_streaming = true [[models]] id = "trinity-mini:free" display_name = "Arcee AI: Trinity Mini (free)" -tier = "free" +tier = "fast" context_window = 131072 max_output_tokens = 16384 input_cost_per_m = 0.0 diff --git a/providers/liquid.toml b/providers/liquid.toml index 822eccc..3e820c3 100644 --- a/providers/liquid.toml +++ b/providers/liquid.toml @@ -30,7 +30,7 @@ supports_streaming = true [[models]] id = "lfm-2.5-1.2b-instruct:free" display_name = "LiquidAI: LFM2.5-1.2B-Instruct (free)" -tier = "free" +tier = "fast" context_window = 32768 max_output_tokens = 8192 input_cost_per_m = 0.0 @@ -40,7 +40,7 @@ supports_streaming = true [[models]] id = "lfm-2.5-1.2b-thinking:free" display_name = "LiquidAI: LFM2.5-1.2B-Thinking (free)" -tier = "free" +tier = "fast" context_window = 32768 max_output_tokens = 8192 input_cost_per_m = 0.0 diff --git a/providers/meta-llama.toml b/providers/meta-llama.toml index 1802fe2..6255537 100644 --- a/providers/meta-llama.toml +++ b/providers/meta-llama.toml @@ -80,7 +80,7 @@ supports_streaming = true [[models]] id = "llama-3.2-3b-instruct:free" display_name = "Meta: Llama 3.2 3B Instruct (free)" -tier = "free" +tier = "fast" context_window = 131072 max_output_tokens = 16384 input_cost_per_m = 0.0 @@ -100,7 +100,7 @@ supports_streaming = true [[models]] id = "llama-3.3-70b-instruct:free" display_name = "Meta: Llama 3.3 70B Instruct (free)" -tier = "free" +tier = "fast" context_window = 65536 max_output_tokens = 16384 input_cost_per_m = 0.0 diff --git a/providers/nousresearch.toml b/providers/nousresearch.toml index 71b82b1..6f785da 100644 --- a/providers/nousresearch.toml +++ b/providers/nousresearch.toml @@ -30,7 +30,7 @@ supports_streaming = true [[models]] id = "hermes-3-llama-3.1-405b:free" display_name = "Nous: Hermes 3 405B Instruct (free)" -tier = "free" +tier = "fast" context_window = 131072 max_output_tokens = 16384 input_cost_per_m = 0.0 diff --git a/providers/nvidia.toml b/providers/nvidia.toml index e22c959..af61017 100644 --- a/providers/nvidia.toml +++ b/providers/nvidia.toml @@ -50,7 +50,7 @@ supports_streaming = true [[models]] id = "nemotron-3-nano-30b-a3b:free" display_name = "NVIDIA: Nemotron 3 Nano 30B A3B (free)" -tier = "free" +tier = "fast" context_window = 256000 max_output_tokens = 16384 input_cost_per_m = 0.0 @@ -70,7 +70,7 @@ supports_streaming = true [[models]] id = "nemotron-3-super-120b-a12b:free" display_name = "NVIDIA: Nemotron 3 Super (free)" -tier = "free" +tier = "fast" context_window = 262144 max_output_tokens = 262144 input_cost_per_m = 0.0 @@ -90,7 +90,7 @@ supports_streaming = true [[models]] id = "nemotron-nano-12b-v2-vl:free" display_name = "NVIDIA: Nemotron Nano 12B 2 VL (free)" -tier = "free" +tier = "fast" context_window = 128000 max_output_tokens = 128000 input_cost_per_m = 0.0 @@ -110,7 +110,7 @@ supports_streaming = true [[models]] id = "nemotron-nano-9b-v2:free" display_name = "NVIDIA: Nemotron Nano 9B V2 (free)" -tier = "free" +tier = "fast" context_window = 128000 max_output_tokens = 16384 input_cost_per_m = 0.0 diff --git a/scripts/sync-pricing.py b/scripts/sync-pricing.py index f70b89c..4da3e27 100644 --- a/scripts/sync-pricing.py +++ b/scripts/sync-pricing.py @@ -76,12 +76,27 @@ def update_toml_prices(toml_path, models_by_id, dry_run=False): field = cost_match.group(1) old_val = float(cost_match.group(2)) + # Find best matching OpenRouter model — prefer exact match over substring new_val = None + best_match = None + best_specificity = 0 for or_id, (inp, outp) in models_by_id.items(): or_model = or_id.split("/")[-1] if "/" in or_id else or_id - if current_model_id == or_model or current_model_id in or_id: - new_val = inp if field == "input_cost_per_m" else outp + if current_model_id == or_model: + # Exact match on model name (highest priority) + best_match = (inp, outp) + best_specificity = 3 break + elif or_model == current_model_id + ":free" and best_specificity < 1: + # Free variant — only use if no paid version found + best_match = (inp, outp) + best_specificity = 1 + elif current_model_id in or_id and ":free" not in or_id and best_specificity < 2: + # Substring match on paid model + best_match = (inp, outp) + best_specificity = 2 + if best_match: + new_val = best_match[0] if field == "input_cost_per_m" else best_match[1] if new_val is not None and abs(new_val - old_val) > 0.001: new_lines.append(f"{field} = {new_val}") @@ -134,7 +149,7 @@ def generate_provider_toml(provider_id, models, dry_run=False): # Infer tier from pricing if inp == 0 and outp == 0: - tier = "free" + tier = "fast" elif inp < 0.5: tier = "fast" elif inp < 3.0: