Skip to content

010: Dynamic models II — smart generation, LLM enrichment, discover endpoint#27

Merged
acmeguy merged 1 commit intomainfrom
010-dynamic-models-ii
Mar 21, 2026
Merged

010: Dynamic models II — smart generation, LLM enrichment, discover endpoint#27
acmeguy merged 1 commit intomainfrom
010-dynamic-models-ii

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented Mar 21, 2026

Summary

  • Smart model generation: Table profiling with partition detection, field processors, YAML/JS output, and model diff/merge with AI metric preservation
  • LLM enrichment: AI-powered metric descriptions, measure suggestions, and schema validation against Cube.js compiler
  • Filter builder: Column-level value filtering during profiling, plus a new /column-values endpoint for distinct value retrieval
  • Discover endpoint (GET /api/v1/discover): Returns all datasources and cubes available to a WorkOS-authenticated user, with JIT auto-provisioning (user → team → membership from JWT partition claim)
  • Hasura actions: GraphQL action definitions for the smart generation flow
  • Integration tests: StepCI workflow for smart_gen flow

New endpoints

Method Path Auth Purpose
GET /api/v1/discover WorkOS JWT List datasources + cubes for authenticated user
POST /api/v1/column-values Hasura/WorkOS Retrieve distinct values for a column
POST /api/v1/smart-generate Hasura/WorkOS Smart model generation with profiling

Test plan

  • 13 unit tests for discover endpoint (extractCubes, buildDiscoverResponse)
  • Verify discover endpoint with live WorkOS token against dev stack
  • Run StepCI smart_gen_flow integration test
  • Test smart-generate end-to-end with ClickHouse datasource
  • Verify LLM enricher with OpenAI API key configured

🤖 Generated with Claude Code

…olumn values, and discover endpoint

- Smart model generation with table profiling, partition detection, and YAML/JS output
- LLM enricher for AI-powered metric descriptions and measure suggestions
- LLM validator for schema validation against Cube.js compiler
- Filter builder for column-level value filtering during profiling
- Column values endpoint for distinct value retrieval
- Discover endpoint (GET /api/v1/discover) — returns all datasources and cubes
  available to a WorkOS-authenticated user with JIT provisioning
- Model diff/merge with AI metric preservation
- Hasura action definitions for smart generation flow
- StepCI integration test for smart_gen workflow
- Specs and design docs for 010-dynamic-models-ii

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit b98f122 into main Mar 21, 2026
3 checks passed
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.

2 participants