You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ai): align Gemma 4 model IDs with platform-specific formats
Add GemmaModel.to_backend_id() for per-platform model ID conversion (Google AI Studio, LM Studio, Ollama, OpenRouter). Update model fallback chain to skip cloud-unavailable 12B variant. Fix ruff RET504/RET505 lint errors. Update all AGENTS.md/CLAUDE.md/GEMINI.md docs with corrected model tables, env vars, and function names.
Copy file name to clipboardExpand all lines: CLAUDE.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ _utils/ → (no internal deps, used by all layers)
64
64
### Key Modules
65
65
66
66
-**`core/orchestrator.py`** — `DataOrchestrator` is the central coordinator. Uses `CoreCtx` (db, schema, mapper, relation, shared_pool) and `ExtCtx` (registry, plugins, mediator, enrichment, metrics) dataclasses. `fill_table()` is the main entry point; `fill()` is its alias.
67
-
-**`core/mapper.py`** — `ColumnMapper` with 9-level strategy chain (autoincrement PK → user config → exact match → default check → pattern match → nullable → type fallback). 74 exact rules, 26 regex patterns.
67
+
-**`core/mapper.py`** — `ColumnMapper` with 9-level strategy chain (autoincrement PK → user config → exact match → default check → pattern match → nullable → type fallback). 74 exact rules, 27 regex patterns.
-**`core/relation.py`** — `RelationResolver` + `SharedPool` for cross-table FK integrity. Implicit associations via name matching, explicit via `ColumnAssociation` config.
70
70
-**`core/column_dag.py`** — Topological sort for `derive_from` column dependencies.
@@ -74,7 +74,8 @@ _utils/ → (no internal deps, used by all layers)
74
74
-**`database/`** — `DatabaseAdapter` protocol with two implementations: `SQLiteUtilsAdapter` (default, requires `sqlite-utils`) and `RawSQLiteAdapter` (fallback). `_compat.py` controls `HAS_SQLITE_UTILS` flag.
-**`cli/main.py`** — Click commands: `fill`, `preview`, `inspect`, `ai-suggest`, `config-generate`. CLI log level via `SQLSEED_LOG_LEVEL` env var (default `WARNING`). Cache dir via `SQLSEED_CACHE_DIR` env var.
77
+
-**`cli/main.py`** — Click commands: `fill`, `preview`, `inspect`, `init`, `replay`, `ai-suggest`. CLI log level via `SQLSEED_LOG_LEVEL` env var (default `WARNING`). Cache dir via `SQLSEED_CACHE_DIR` env var.
78
+
-**`_utils/paths.py`** — Platform-aware cache directory resolution (`get_cache_dir()`). Supports macOS/Linux/Windows, overridable via `SQLSEED_CACHE_DIR` env var.
78
79
79
80
### Public API (`src/sqlseed/__init__.py`)
80
81
@@ -154,7 +155,7 @@ Run `pytest tests/test_doc_sync.py` to verify doc sync after changes.
154
155
155
156
## Testing
156
157
157
-
- Fixtures in `tests/conftest.py`: `tmp_db` (users + orders tables), `tmp_db_with_data`, `unique_test_db`, `create_project_info_db()` (project_info table with unique indexes), `raw_adapter`, `raw_adapter_with_data`
158
+
- Fixtures in `tests/conftest.py`: `tmp_db` (users + orders tables), `tmp_db_with_data`, `unique_test_db`, `create_project_info_db()` (project_info table with unique indexes), `raw_adapter`, `raw_adapter_with_data`. Helper: `make_column_info()` factory for `ColumnInfo` objects.
158
159
- Use real SQLite via `tmp_path` fixture, never mock the database layer
159
160
- CLI tests: use `click.testing.CliRunner`, never subprocess
160
161
- AI plugin tests: `pytest.importorskip("sqlseed_ai")`
@@ -206,6 +207,6 @@ When preparing a new version release:
-**`src/sqlseed/_utils/`**: Internal utilities including SQL safety (`sql_safe.py`), shared schema helpers (`schema_helpers.py`), performance metrics collection (`metrics.py`), progress bar wrapper (`progress.py`, based on `rich`), and logging wrapper (`logger.py`, based on `structlog`).
26
+
-**`src/sqlseed/_utils/`**: Internal utilities including SQL safety (`sql_safe.py`), shared schema helpers (`schema_helpers.py`), performance metrics collection (`metrics.py`), progress bar wrapper (`progress.py`, based on `rich`), logging wrapper (`logger.py`, based on `structlog`), and platform-aware cache directory path utilities (`paths.py`).
-**`plugins/mcp-server-sqlseed/`**: MCP server based on FastMCP providing one Resource (`sqlseed://schema/{db_path}/{table_name}`) and three core Tools (`sqlseed_inspect_schema`, `sqlseed_generate_yaml`, `sqlseed_execute_fill`) for seamless AI assistant integration (driven by `server.py` and `config.py`).
28
+
-**`plugins/mcp-server-sqlseed/`**: MCP server based on FastMCP providing one Resource (`sqlseed://schema/{db_path}/{table_name}`) and six core Tools (`sqlseed_inspect_schema`, `sqlseed_generate_yaml`, `sqlseed_execute_fill`, `sqlseed_gemma4_analyze`, `sqlseed_gemma4_agent_fill`, `sqlseed_list_gemma_models`) for seamless AI assistant integration (driven by `server.py` and `config.py`).
29
29
-**`examples/`**: Contains tutorial Jupyter notebooks (`notebooks/`) covering quickstart, column mapping, generators, DB association, expression/DAGs, AI configuration, MCP server, and testing patterns. Also includes demo DB builder script (`build_demo_db.py`).
30
30
-**`docs/`**: Project documentation including architecture diagrams (`architecture.md`).
Copy file name to clipboardExpand all lines: plugins/sqlseed-ai/AGENTS.md
+33-12Lines changed: 33 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## OVERVIEW
4
4
5
-
LLM-powered schema analysis and template generation. Separate package with own pyproject.toml.
5
+
LLM-powered schema analysis and template generation. Separate package with own pyproject.toml. Supports 4 backends (Google AI Studio, LM Studio, Ollama, OpenAI-compatible) and 5 Gemma 4 model variants.
6
6
7
7
## STRUCTURE
8
8
@@ -11,24 +11,26 @@ sqlseed-ai/
11
11
├── pyproject.toml # Separate package: sqlseed>=0.1.0, openai>=1.0
0 commit comments