Skip to content

feat: add hyper charm provider - #2983

Closed
oskarkocol wants to merge 35 commits into
anomalyco:devfrom
oskarkocol:feat/add-charm-models
Closed

feat: add hyper charm provider#2983
oskarkocol wants to merge 35 commits into
anomalyco:devfrom
oskarkocol:feat/add-charm-models

Conversation

@oskarkocol

@oskarkocol oskarkocol commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@rekram1-node before merging, make sure you add a repo secret HYPER_API_KEY. You can get it here: https://hyper.charm.land/. I had no issues making one - no credit card was needed.

Context

Our friends at charm land shipped a gateway.

I'm adding them as a provider.
And also closing: #2747
Their prices are accessible via API therefore adding automation:

curl -X GET https://hyper.charm.land/v1/models \
     -H "Authorization: Bearer sk-hyper-XYZ" \
     -H "Content-Type: application/json"

Tests

Local

bun test packages/core/test/sync.test.ts --filter "Hyper"

Good. Screemshot proof:
image

bun models:sync hyper --dry-run

Good also.
image

bun models:sync hyper

Good. Great.
image

Github Action test on a fork

Created a simple action just to test the functionality. This branch on my fork. https://github.com/oskarkocol/models.dev-contrib/tree/test%2Fhyper-sync-action

https://github.com/oskarkocol/models.dev-contrib/actions/runs/28957929117/job/85921707951

image

Looks good.

@oskarkocol oskarkocol changed the title feat: add charm provider feat: add hyper charm provider Jul 2, 2026
Comment thread providers/hyper/logo.svg

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logo from the Press kit: https://charm.land/presskit

@oskarkocol
oskarkocol marked this pull request as ready for review July 3, 2026 05:43
@rekram1-node

Copy link
Copy Markdown
Collaborator

can u add a sync automation for it too?

@oskarkocol
oskarkocol marked this pull request as draft July 3, 2026 12:30
oskarkocol and others added 10 commits July 3, 2026 20:47
Co-authored-by: Oskar <oskarkocol@users.noreply.github.com>
Bring branch up to date with anomalyco/models.dev (177 commits).
Resolved conflicts in sync index and tests, keeping hyper provider
alongside new upstream direct sync providers.
@oskarkocol
oskarkocol marked this pull request as ready for review July 8, 2026 16:18
@rekram1-node

Copy link
Copy Markdown
Collaborator
Screenshot 2026-07-09 at 3 08 59 PM

Bring in latest model catalog syncs and provider updates from anomalyco/models.dev.
Reconcile local upstream merge with fork's upstream sync commit.
Resolve conflicts in sync index and tests, keeping hyper provider
alongside wandb and updated OpenRouter test imports from dev.
@github-actions

Copy link
Copy Markdown
Contributor

I have confirmed the key findings. Here is my review.

Action items

  • [high] [violation] packages/core/src/sync/providers/hyper.ts (buildCost) - Check: Sync must preserve hand-authored cost fields the provider API is not authoritative for. Why: buildCost returns only input, output, cache_read, and reasoning, dropping cache_write (and input_audio, output_audio, tiers) from existing TOMLs whenever the API exposes input/output pricing. The sync run in this PR deleted cache_write from minimax-m2.7 (0.375), qwen3.6-flash (0.1), qwen3.6-max (0.2), and qwen3.6-plus (0.2) — the very values this PR introduced. sync.md requires preserving hand-authored fields the API does not expose, as Venice/OpenRouter do. Action: Preserve existing.cost.cache_write (plus input_audio, output_audio, tiers) in buildCost and restore the deleted cache_write values.
  • [medium] [possible mistake] providers/hyper/models/gemma-4-26b-a4b-it.toml and llama-4-maverick-17b-128e-instruct-fp8.toml - Check: Provider modalities must be consistent with attachment. Why: buildHyperModel never emits modalities, so these files now inherit input = ["text", "image"] from their base models while setting attachment = false. The hand-authored files deliberately overrode modalities to text-only; the sync removed that override, producing image input with attachments disabled. Action: Verify whether Hyper serves image input for these models; if not, emit a text-only modalities override (or otherwise reconcile attachment).
  • [medium] [violation] .github/workflows/pricing-updater.yml:35 (and the update job checkout) - Check: Third-party actions in new automation must be pinned to full commit SHAs. Why: actions/checkout@v4 is referenced by tag, not SHA, which contradicts sync.md ("Actions are pinned by commit SHA") and the PR's own test-hyper-sync.yml (which pins actions/checkout@34e1148…). Action: Pin both actions/checkout uses to a full commit SHA.
  • [medium] [possible mistake] packages/core/src/sync/providers/hyper.ts (reasoningOptions) and the synced toggle models - Check: type = "toggle" requires evidence of the exact request field and on/off values. Why: The sync defaults every reasoning model without effort levels to toggle (~14 models), but neither the PR body nor the TOMLs document the actual toggle request syntax. The audit-reasoning-options evidence standard requires the exact field; supports_reasoning alone proves reasoning exists, not a caller-controlled toggle. Action: Cite and document the exact toggle request field/values, or use reasoning_options = [] for models where no toggle control is verified.
  • [low] [possible mistake] providers/hyper/models/minimax-m2.7.toml ([cost]) - Check: Verify the cost_per_1m_in_cachedcache_read mapping. Why: cache_read changed from 0.06 to 0.375, which was the previous cache_write value, while cache_write was deleted — suggesting cost_per_1m_in_cached may represent the cache-write price rather than read. The sync also sources pricing from /v1/provider, an endpoint not cited in the PR body (which only cites /v1/models). Action: Confirm against the Hyper API which field is cache-read vs cache-write, correct the mapping if needed, and cite /v1/provider if it is the pricing source.
  • [low] [possible mistake] providers/hyper/models/qwen3.6-max.toml - Check: Provider-specific name overrides must survive sync. Why: The hand-authored name = "Qwen3.6-Max" was removed by the sync, so the model now displays as the base's "Qwen3.6 Max Preview" despite being filed under qwen3.6-max. buildHyperModel does not emit or preserve name. Action: Preserve the existing name override or confirm "Qwen3.6 Max Preview" is the intended display name.
  • [low] [possible mistake] .github/workflows/test-hyper-sync.yml - Check: Do not merge fork-only test workflows into upstream. Why: The workflow is guarded to run only on forks and its own header says "Do not merge into upstream PRs"; it is a test artifact for validating the sync on a fork. Action: Remove this workflow before merging.

@oskarkocol
oskarkocol marked this pull request as draft July 10, 2026 06:23
@oskarkocol

Copy link
Copy Markdown
Contributor Author
  • Fixed cost sync to keep API pricing and preserve fields Hyper doesn't expose
  • Text-only modalities when attachments are disabled; removed unverified toggle reasoning options.
  • Re-synced all 20 Hyper models; validation passes
  • Removed fork-only test workflow - that was a bad merge conflict resolve on my part

@oskarkocol
oskarkocol marked this pull request as ready for review July 10, 2026 07:00
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] packages/core/src/sync/providers/hyper.ts (buildCost, fromProviderFields) - Check: Whether Hyper's cost_per_1m_in_cached and cost_per_1m_out_cached API fields map to cache_read/cache_write correctly. Why: cost_per_1m_in_cached is mapped to cache_read and cost_per_1m_out_cached to cache_write, but the synced values are reversed from the standard 10%/125% (read/write) ratio documented in AGENTS.md. For qwen3.6-flash.toml, cache_read = 1.25 (125% of input 1) and cache_write = 0.1 (10%) — the expensive value landed in cache_read and the cheap value in cache_write. The same inversion appears in qwen3.6-max, qwen3.7-max, and qwen3.7-plus. Strongest evidence: the hand-authored minimax-m2.7.toml initially had the correct ratio (cache_read = 0.06 at 20%, cache_write = 0.375 at 125%), but after the first sync its cache_read became 0.375 — the old cache_write value — confirming cost_per_1m_in_cached carries the write price. Additionally, fromProviderFields (the swapped path) takes precedence over the correctly-mapped fromPricingObject path (input_cache_readcache_read, input_cache_writecache_write), so the inversion applies whenever the cost_per_1m_* fields are populated. Action: Verify the Hyper API's field semantics against provider documentation. If cost_per_1m_in_cached is the cache-write price, swap the mapping so it targets cache_write and cost_per_1m_out_cached targets cache_read, then re-sync.

  • [medium] [possible mistake] providers/hyper/provider.toml:8-9 - Check: Whether Hyper exposes a per-request reasoning toggle for models without effort levels, and whether the provider.toml comment contradicts the sync's reasoning_options output. Why: The comment states "models without effort support expose reasoning as a toggle only," but the sync returns reasoning_options = [] for 14 such models, with a code comment stating "Hyper advertises reasoning but documents no toggle or effort control for these models." If Hyper does expose a caller-facing reasoning toggle, those 14 models need [{ type = "toggle" }] reasoning_options; if not, the provider.toml comment is misleading because "toggle" in this repo's schema specifically means a caller-facing on/off control. Action: Verify whether Hyper's API accepts a per-request reasoning toggle parameter for models where supports_reasoning_effort is false. If yes, update reasoningOptions() to emit { type: "toggle" } and re-sync; if no, reword the provider.toml comment to clarify that supports_reasoning is an advertisement flag, not a caller-facing control.

@oskarkocol

Copy link
Copy Markdown
Contributor Author

sure, let's clarify the comment

@oskarkocol

Copy link
Copy Markdown
Contributor Author

PR reviewer ded. Gotta rerun the action

@andreynering andreynering left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! 👋

Thank you both for the interest in listing Hyper on models.dev.

I would just like to let you know that we're planning some small changes to our /models endpoint for soon:

  • We plan to make costs available for public requests (so you won't need an API key for that anymore).
  • We'll probably rename some fields for clarity, in particular the costs because cache_in and cache_out are not so clear, and should be something like cache_creation and cache_hit instead.

So it's probably a good idea to hold this for a bit, and I'll let you know here once we do these changes.

By the way, good timing to let us know if you miss anything on the endpoint.

@oskarkocol

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up @andreynering.

I'm going to close this PR. We can revisit once Hyper's new /models endpoint ships and is stable. No sense in merging this if the pricing fields (cache_in/cache_out`) and auth requirements are changing in the near term

@oskarkocol oskarkocol closed this Jul 12, 2026
@oskarkocol
oskarkocol deleted the feat/add-charm-models branch July 12, 2026 15:20
@andreynering

Copy link
Copy Markdown

IMO it’s worth keeping it open as a draft, but it’s your choice.

@oskarkocol

Copy link
Copy Markdown
Contributor Author

Prefer closing than letting it go stale. Drop a comment here when the new endpoint is live and we can easily spin up a fresh one!

@andreynering

andreynering commented Jul 15, 2026

Copy link
Copy Markdown

@oskarkocol Updated endpoint is live: https://hyper.charm.land/v1/models

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.

4 participants