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