Skip to content

deepinfra: Add script & sync latest DeepInfra models#1358

Open
GodTamIt wants to merge 6 commits intoanomalyco:devfrom
GodTamIt:update-deepinfra
Open

deepinfra: Add script & sync latest DeepInfra models#1358
GodTamIt wants to merge 6 commits intoanomalyco:devfrom
GodTamIt:update-deepinfra

Conversation

@GodTamIt
Copy link
Copy Markdown

@GodTamIt GodTamIt commented Apr 6, 2026

DeepInfra Model Sync Changes

Summary

This change adds a new script to keep DeepInfra models in sync. It then uses the script to update the current corpus of models from DeepInfra updated.

Note: The script uses an allowlist approach for providers - only explicitly approved providers are included. This is intentional as most models from DeepInfra should not be tracked in the database.


Changes Overview

DeepInfra Sync Script

Added: packages/core/script/generate-deepinfra.ts

Script Features

Data Fetching:

  • Connects to https://api.deepinfra.com/v1/openai/models endpoint
  • Fetches model metadata including pricing, context limits, and capabilities

Smart Filtering:

  • Provider allowlist - only includes approved providers (strict by design)
  • Regex filters skip embedding models, FLUX models, and image-specific models

CLI Flags:

  • --dry-run: Preview changes without writing files
  • --new-only: Only create new models, skip updates
  • --no-delete: Keep orphaned files instead of deleting

Sync DeepInfra Models

New Models Added

Qwen (Alibaba):

  • Qwen3-14B, Qwen3-32B
  • Qwen3-235B-A22B-Instruct-2507 (with MoE architecture)
  • Qwen3-235B-A22B-Thinking-2507 (reasoning variant)
  • Qwen3-30B-A3B (MoE variant)
  • Qwen3-Max and Qwen3-Max-Thinking
  • Qwen3-Next-80B-A3B-Instruct
  • Qwen3-VL-235B-A22B-Instruct (vision-language)
  • Qwen3-VL-30B-A3B-Instruct
  • Qwen3.5 series: 0.8B, 2B, 4B, 9B, 27B, 35B-A3B, 122B-A10B, 397B-A17B

DeepSeek:

  • DeepSeek-OCR - OCR-specialized model
  • DeepSeek-R1-0528-Turbo - Optimized reasoning
  • DeepSeek-R1-Distill-Llama-70B - Distilled variant

Anthropic:

  • claude-4-sonnet - New Sonnet model supported

Meta Llama:

  • Llama-3.2-11B-Vision-Instruct - Vision-capable model
  • Llama-Guard-4-12B - Safety model

OpenAI:

  • gpt-oss-120b-Turbo - Optimized variant

NVIDIA:

  • Llama-3.3-Nemotron-Super-49B-v1.5
  • NVIDIA-Nemotron-3-Super-120B-A12B
  • NVIDIA-Nemotron-Nano-12B-v2-VL (vision-language)
  • NVIDIA-Nemotron-Nano-9B-v2
  • Nemotron-3-Nano-30B-A3B

Moonshot AI:

  • Kimi-K2.5-Turbo - Optimized variant

StepFun:

  • Step-3.5-Flash

Models Updated (22)

Capability & Pricing Updates:

  • MiniMax-M2.1 and MiniMax-M2.5 - Updated capabilities
  • Qwen3-Coder-480B-A35B-Instruct and -Turbo - Fixed pricing fields
  • claude-3-7-sonnet-latest - Updated metadata
  • claude-4-opus - Updated capabilities
  • DeepSeek-R1-0528 - Revised pricing structure
  • DeepSeek-V3.2 - Updated context limits
  • Llama-3.3-70B-Instruct-Turbo - Capability adjustments
  • Llama-4-Maverick-17B-128E-Instruct-FP8 - Metadata updates
  • Llama-4-Scout-17B-16E-Instruct - Capability refinements
  • Kimi-K2-Instruct-0905, Kimi-K2-Thinking, Kimi-K2.5 - Updated pricing
  • gpt-oss-120b and gpt-oss-20b - Pricing adjustments

Zhipu AI (zai-org) GLM Series:

  • GLM-4.6, GLM-4.6V, GLM-4.7, GLM-4.7-Flash, GLM-5 - Comprehensive updates to pricing, context limits, and capabilities

Models Removed (2)

Obsolete Models:

  • MiniMaxAI/MiniMax-M2 - No longer available via API
  • zai-org/GLM-4.5 - Discontinued

How to Use

Running the Sync

# Preview changes without writing files
bun run packages/core/script/generate-deepinfra.ts --dry-run

# Sync only new models (preserve existing manual edits)
bun run packages/core/script/generate-deepinfra.ts --new-only

# Full sync (add new, update existing, remove obsolete)
bun run packages/core/script/generate-deepinfra.ts

Validation

After running the sync, validate the generated configurations:

bun validate

Impact

This change significantly expands the DeepInfra provider coverage, adding:

  • New models from major providers (Anthropic, Meta, Qwen, DeepSeek)
  • Updated pricing reflecting current DeepInfra rates
  • Consistent TOML formatting across all model files

Fixes #1043

@GodTamIt
Copy link
Copy Markdown
Author

GodTamIt commented Apr 7, 2026

I filtered out a lot of unnecessary or older models in the change so it doesn't overwhelm the menus in OpenCode, per some discussion in Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to add deep infra - Qwen/Qwen3-VL-235B-A22B-Instruct model

1 participant