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
- Regenerate the ThorAPI client in ValkyrAI.
- Sync the generated client into ValorIDE.
- Review generated services, models, and runtime constants.
- Update consuming imports and call signatures.
- 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
| Symptom | Likely Cause | Fix |
|---|---|---|
| Missing generated hook or mutation | Endpoint renamed or removed | Use the exported hook from the regenerated service |
| Function now requires arguments | Request signature changed | Pass the generated request-parameter object |
| Model property no longer exists | OpenAPI schema changed | Update UI and state code to the new model shape |
| Missing runtime constant | Generated runtime exports changed | Use the new exported constant or update wrapper code |
| Missing cache helper import | Local integration code drifted | Update 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: