Skip to content

Add automatic Charm Hyper model sync - #3381

Closed
JavaGT wants to merge 4 commits into
anomalyco:devfrom
JavaGT:add-charm-hyper-models
Closed

Add automatic Charm Hyper model sync#3381
JavaGT wants to merge 4 commits into
anomalyco:devfrom
JavaGT:add-charm-hyper-models

Conversation

@JavaGT

@JavaGT JavaGT commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • add a registered Charm Hyper sync adapter
  • derive reasoning effort levels, limits, modalities, pricing, and cache pricing from the live catalog
  • preserve canonical base-model metadata and skip unknown models safely

Verification

  • bun models:sync hyper --dry-run reports 20 unchanged
  • bun validate
  • git diff --check

@JavaGT

JavaGT commented Jul 22, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #3352, which already contains the Charm Hyper provider and sync adapter. Please review/fix the adapter issues identified by the automated review there, especially reasoning fallback when metadata is absent, discovery of newly listed models, provider auth env metadata, and cache pricing semantics.

@JavaGT JavaGT closed this Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] packages/core/src/sync/providers/hyper.ts:71 - Check: Provider reasoning must reflect whether the model reasons on this provider; missing controls use reasoning_options = [], not reasoning = false. Why: reasoning is set true only when the catalog reasoning object is non-null. That forces reasoning = false on models whose base metadata (and this PR’s earlier hand-authored reasoning_options = []) mark them as reasoning models—e.g. kimi-k2.5, kimi-k2.7-code, minimax-m2.7, glm-5, gemma-4-26b-a4b-it, and the Qwen3.6/3.7 entries—so the catalog claims they do not reason. Action: Treat a missing/null reasoning object as “no verified control” (inherit base reasoning, or keep reasoning = true with reasoning_options = []). Only set reasoning = false when Hyper explicitly documents a non-reasoning deployment.
  • [medium] [violation] packages/core/src/sync/providers/hyper.ts:72 - Check: Sync pricing should emit stable per-1M costs like other providers. Why: Raw API floats are written unchanged, producing values such as 0.20000010875000002 / 0.40000021750000003 / 0.039999586250000004 in providers/hyper/models/deepseek-v4-flash.toml (and similar noise on glm/kimi models). Action: Round prices before emit (same approach as OpenRouter/DeepInfra/etc.) and re-sync so TOMLs store clean decimals.
  • [medium] [violation] packages/core/src/sync/providers/hyper.ts:113 - Check: resolveBaseModel must map Hyper IDs to existing models/ paths for creates, not only updates. Why: minimax-m2.7 resolves to minimax/minimax-m2.7, but metadata is minimax/MiniMax-M2.7. Without an existing TOML base_model, sync skips the model, so a clean or post-delete sync cannot recreate it. Action: Add a BASE_MODEL_ALIASES entry (or case-aware lookup) for minimax-m2.7minimax/MiniMax-M2.7, and verify cold sync still creates the file.
  • [medium] [possible mistake] packages/core/src/sync/providers/hyper.ts:75 - Check: pricing.cache_hitcache_read and pricing.cache_createcache_write must match Hyper’s field meanings. Why: After sync, many models only get a ~50% of input price on cache_write with cache_read = 0 (e.g. gpt-oss-120b, kimi-k2.5, llama-3.3-70b-instruct, minimax-m2.7), while earlier hand-authored data put those amounts on cache_read. That pattern looks like cache-hit discounts, not typical cache-write premiums (compare Qwen3.6 entries where both sides look normal). Action: Confirm Hyper’s cache_hit/cache_create semantics against docs or a sample payload; fix the mapping (or post-process) so read/write prices are not swapped, then re-sync.

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.

1 participant