Skip to main content

ThorAPI Client Upgrades

ValorIDE consumes generated ThorAPI clients from the ValkyrAI codebase. When the OpenAPI contract changes, regenerate and sync the client before updating consuming UI or runtime code.

Upgrade Loop

  1. Regenerate the ThorAPI client in ValkyrAI.
  2. Sync the generated client into ValorIDE.
  3. Review generated services, models, and runtime constants.
  4. Update consuming imports and call signatures.
  5. Build ValorIDE and resolve TypeScript errors before merging.
npm run sync:thorapi

If the generated client lives outside the default sibling checkout, pass an explicit source:

VALKYRAI_THORAPI_SOURCE=/path/to/ValkyrAI/web/typescript/valkyr_labs_com/src/thorapi npm run sync:thorapi

Common Breakages

SymptomLikely CauseFix
Missing generated hook or mutationEndpoint renamed or removedUse the exported hook from the regenerated service
Function now requires argumentsRequest signature changedPass the generated request-parameter object
Model property no longer existsOpenAPI schema changedUpdate UI and state code to the new model shape
Missing runtime constantGenerated runtime exports changedUse the new exported constant or update wrapper code
Missing cache helper importLocal integration code driftedUpdate import paths or replace the helper

Validation

After each sync:

yarn build

Then manually verify the ValorIDE workflows that depend on ThorAPI:

  • authentication and principal loading
  • application generation
  • MCP marketplace actions
  • credit and balance surfaces
  • workspace or task operations that call ValkyrAI APIs

Related guides: