Skip to content

feat: add api-asset-client crate and use for all model download URLs#4067

Draft
yujonglee wants to merge 2 commits intomainfrom
feat/api-asset-client
Draft

feat: add api-asset-client crate and use for all model download URLs#4067
yujonglee wants to merge 2 commits intomainfrom
feat/api-asset-client

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Feb 18, 2026

Summary

  • Adds a new api-asset-client crate that fetches model asset metadata (URL, checksum, size) from https://api.hyprnote.com/v1/assets/models
  • Uses a cached OnceCell to avoid repeated network calls; exposes a resolve_model convenience function via a global default client
  • Updates local-stt plugin to resolve model download URLs from the API, falling back to the hardcoded tar_url/model_url if the API call fails
  • Updates local-llm plugin to resolve model download URLs from the API, with the same fallback pattern
  • Updates am crate's download method to resolve URLs from the API instead of using hardcoded S3 URLs directly
  • Adds strum::Display derive to local-llm::SupportedModel to enable to_string() for asset ID resolution

Review & Testing Checklist for Human

  • Verify that the asset IDs produced by to_string() on each model enum (AmModel, WhisperModel, SupportedModel) match the IDs returned by https://api.hyprnote.com/v1/assets/models. Especially SupportedModel variants (Llama3p2_3bQ4, Gemma3_4bQ4, HyprLLM) which use default strum Display without custom serialization
  • Test model downloads for each plugin (local-stt, local-llm, am) when the API endpoint is available
  • Test model downloads when the API is unreachable to confirm fallback to hardcoded URLs works
  • Confirm that am::download being called from local-stt::ext doesn't double-resolve (currently local-stt does its own resolution and doesn't call am::download, so this should be fine)

Notes

Requested by: @yujonglee
Link to Devin run

Introduces a new `api-asset-client` crate to resolve model asset URLs from the Hyprnote API, falling back to hardcoded URLs when the API is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 848acf1
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6995aa17c1d5e70009b52f4b

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 848acf1
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6995aa17b281d6000883f628

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the title feat: add api-asset-client crate and use for model download URLs feat: add api-asset-client crate and use for all model download URLs Feb 18, 2026
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

Comments