Repository navigation
0.7.0b4 — `semlayer discover`, and a model you can choose
Pre-releaseThe engine half of a week spent walking the VS Code extension end to end on a clean machine. Everything here is something that walk ran into.
semlayer discover
The first question a new user faces is "which warehouse?", and until now the only answer the CLI could give was a blank prompt. semlayer discover lists the connections visible from here — DuckDB files in the working directory, connections.toml profiles, dbt targets, environment variables — each with where it was found, whether it is usable, and what is missing when it is not. --json for agents and editors.
The logic is not new. session.discover() has backed the MCP tool discover_connections since the MCP server shipped; it had no CLI surface, so a person at a terminal and an agent over MCP were answering the same first question with different amounts of help.
The interesting row is the half-configured one. An account set in SNOWFLAKE_ACCOUNT with nothing else is reported as found-but-unusable, naming the variables still needed, rather than being silently omitted or offered as though it would work.
Choosing a model
semlayer infer --model <id> and semlayer maintain --model <id>, or SEMLAYER_MODEL=<id> in $SEMLAYER_HOME/.env — the same file the API key can live in, and the only channel an MCP server launched by a desktop client reliably sees. The model was a constant in the engine with no flag and no override.
The default does not move, deliberately: the published cost model (~$0.70 per 100 tables) and every committed cassette are measured on the cheap tier. A different model is a different cassette key, so naming one means live calls rather than replay — the cassette holds what one model said, and replaying it for another would report a run that never happened. The model that ran is recorded in generated_by.model.
drift --json is always JSON
When nothing had drifted — the commonest outcome, and the one a nightly job hits — it printed the sentence no drift detected whether or not --json was passed. Every agent and CI step consuming the flag had to special-case one line of prose, against a fallback shape written down nowhere. It now emits an empty changeset carrying all seven keys the non-empty one does.
A missing DuckDB file is an error message
semlayer infer duckdb:nope.duckdb raised a raw IOException from the driver. It now raises a SourceError naming the path it resolved, the working directory it resolved against, and what DuckDB said — because the usual cause is a relative path interpreted from somewhere other than where you thought, and the resolved path is the one fact that makes that obvious.
The VS Code extension is in this tree and is not released by this tag; it ships on an ext-v* tag.