Skip to content

fix(config): audio card supports follow MODEL_SUPPORTS on every boot - #21

Open
pengpeng wants to merge 1 commit into
mainfrom
fix/audio-supports-from-env
Open

pengpeng wants to merge 1 commit into
mainfrom
fix/audio-supports-from-env

Conversation

@pengpeng

Copy link
Copy Markdown
Member

Problem

An audio application's model card (model-spec.json) lives on the shared cache and survives an uninstall. On boot, ReconcileModelSpecFile loads that card and disk wins, so a reinstall, or a chart that adds a capability to MODEL_SUPPORTS, keeps the first install's supports.

The engine mounts its routes from the env, so it serves the new capability, but Router only routes what the card declares. The card can't be fixed at runtime either: runtimecfg.ApplySpec refuses audio supports edits ("audio supports are fixed at startup by MODEL_SUPPORTS and the engine spec"). The only way out was deleting the file by hand.

Observed with an audio app reinstalled with MODEL_SUPPORTS=supports_stt,supports_diar over a card from an earlier supports_stt install. /v1/models listed stt and diar, but /api/model-spec and Router showed stt only.

Change

  • ReconcileModelSpecFile replaces an audio card's supports with MODEL_SUPPORTS and writes the card back when they differ (overlayAudioSupportsFromEnv).
  • Applies to EngineAudio only. Every other engine keeps disk-wins, since their supports are editable through Router.
  • An audio deployment without MODEL_SUPPORTS keeps its card.
  • CHANGELOG entry under Unreleased / Fixed.

Tests

  • TestReconcileModelSpecFile_AudioSupportsFollowTheEnv: the env's supports reach memory and disk, and the disk's name is kept.
  • TestReconcileModelSpecFile_AudioSupportsOverlayIsAudioOnly: a chat card, and an audio card with no env, keep their disk supports.
  • make verify passes, including golangci-lint at the CI pin.

Made with Cursor

The card sits on the shared cache and outlives the application, so a
reinstall or a chart that added a capability kept the first install's
supports. Router routed only those while the engine, which mounts its
routes from the env, served more, and runtimecfg refuses audio supports
edits, so nothing could correct the card short of deleting it.

Co-authored-by: Cursor <cursoragent@cursor.com>
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