Show a Valem model
render_modelShow the user a Valem model as an interactive card they can edit in the chat: a form whose computed fields update on every change, checked by a deterministic engine. Use it when the user asks for a calculator, quote, budget, planner, pricing or any model with inputs and computed results. Write a complete ModelSpec (call valem_spec_guide first): a schema, derivations for every computed field, a viewDefinition that binds the inputs and shows the results, and tests with given/expect cases. Valem validates the spec and runs its tests; if anything fails the result lists the errors and no card is shown, so fix them and call again. To change a model, call again with the whole revised spec and the current inputs from the card. Quote numbers from the result, never compute them yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The complete ModelSpec (id, version, schema, derivations, constraints, viewDefinition, tests). | |
| inputs | No | Optional starting values keyed by canonical path, e.g. {"$.rooms": 4}. Omit to use the spec's defaults. |