fix: correct invalid tier "free" and teams-mcp id with version (#29)
- Replace tier "free" with "fast" (valid tiers: frontier/smart/balanced/fast/local) - Remove version suffix from teams-mcp integration id field - Update sync-pricing.py to not generate invalid tier values
This commit is contained in:
8 files changed
+41
-32
No files matched your search
@@ -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
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+18
-3
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user