pr_01m47d24b0e6n91zwymwxg0vpx/services/integrations/migrations/0002_model_routes.sql
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Models per workspace: several providers, routed by kind of work | 1 | -- A workspace can connect several model providers and route each kind of |
| 2 | -- work to one of them, or to g1t's hosted models. | |
| 3 | ||
| 4 | -- The models a provider offered when last checked, as a JSON array. | |
| 5 | ALTER TABLE connections ADD COLUMN models TEXT; | |
| 6 | ||
| 7 | -- Where each kind of work's model requests go. A kind of work without a | |
| 8 | -- row follows `default`; with no `default`, g1t's hosted models. | |
| 9 | CREATE TABLE model_routes ( | |
| 10 | workspace TEXT NOT NULL, | |
| 11 | -- default, implement, review, plan or update. | |
| 12 | task TEXT NOT NULL, | |
| 13 | -- The workspace's own model connection, or null for g1t's hosted models. | |
| 14 | connection_id TEXT, | |
| 15 | -- The model at that connection; its default model when null. | |
| 16 | model TEXT, | |
| 17 | PRIMARY KEY (workspace, task) | |
| 18 | ); | |
| 19 | ||
| 20 | -- The model a run's requests are sent to, when its route names one. | |
| 21 | ALTER TABLE model_sessions ADD COLUMN model TEXT; |