Studio: AI models settings, @embed and @decide in the schema editor, and the /v1 API
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend-api-design, full-stack
Línea de trabajo
Start with the schema editor entry point in src/features/instance/applications/components/SchemaEditorView/FieldRow.tsx and the settings save flow in src/hooks/useRollingConfigUpdate.tsx; read the linked Harper source files to understand the supported settings and directives. Map the work across model settings, schema editing, and the /v1 controls, noting the Harper version gates and Fabric managed entries. Done means the acceptance criteria pass, including hidden keys, saved settings, and usable API and schema controls; adding customer models depends on HM#279.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Harper can call AI models: embeddings (turning text into vectors), generative models (writing text) and, from 5.3, decisions (picking a value). Apps use them through models.embed(), models.generate() and models.decide(), through the @embed and @decide schema directives, and through an OpenAI-style /v1 API. On Fabric, Fabric sets up some models behind the scenes. Studio shows none of this. A customer can't see which models their instance has, can't add their own, can't add @embed or @decide in the schema editor, and can't turn on the /v1 API without the raw settings editor.
What core already provides (harper)
- The
modelssettings block (5.1+). Each entry has a name (apps usedefaultunless they pick another) and abackend:embeddingandgenerativeentries useollama,openai,anthropicorbedrockdecisionentries (5.3+) use thegenerativebackend, which decides with a generative entryapiKeycan be a${ENV_VAR}placeholder instead of the key itself- any entry can name a
fallback - from 5.3, Harper reloads
modelsfrom the settings file without a restart
@embed(source, model)(5.1+) on a vector field fills it from another field whenever a record is written, and indexes it for vector search.@decide(source, ...)(5.3+) on aString,BooleanorIntfield fills it from another field using a decision model. AStringfield needsvalues, and anIntfield needsminimumandmaximum. Optional arguments:model,confidence,decisionandinstructions. If the model can't decide, the write fails.- The
/v1API (5.2+):/v1/embeddings,/v1/chat/completionsand/v1/models.- Off by default. It's turned on with
modelsGateway.enabled. - It's served only while REST is running, which an app's own
rest: trueor a rootrestsection turns on. - All three need an admin user.
- Off by default. It's turned on with
- Source (v5.3.4): configValidator.ts, graphql.ts, v1/index.ts, bootstrap.ts.
On Fabric today
- Fabric writes model entries on new instances:
- On a GPU host: the host's embedding models (by default
embedding.default, plusembedding.multimodalwhen the host runs one), andgenerative.defaultwhen the host is set up for it. - On other instances:
embedding.default, routed to the nearest GPU host. That route doesn't work across hosts yet (HM#178).
- On a GPU host: the host's embedding models (by default
- Fabric replaces the whole
modelsblock, so a customer's own entries are wiped. That's fixed by HM#279, and adding models in Studio waits on it.
What to build
- An "AI models" section in instance settings, shown only on Harper 5.1+ and only to admin users.
- Show the instance's models: for each kind, list each entry's name, backend and model, and mark the ones Fabric manages. Never show an
apiKeyor token. - Add, edit and remove the customer's own models (Harper 5.3+, once HM#279 lands):
- pick a kind, a name and a backend, then the backend's fields
- accept a key or a
${ENV_VAR}placeholder inapiKey, and never show a saved key back - save to Harper's settings. No restart is needed, since Harper reloads
modelsfrom 5.3 - don't offer to edit or remove entries Fabric manages
- Schema editor: Studio's schema editor offers neither directive today (FieldRow.tsx). Offer only model names the instance has.
@embedon vector fields: source field and model.@decideonString,BooleanandIntfields, on Harper 5.3+: source field, model, and values or a range.
-
/v1API (Harper 5.2+):- Turn it on or off, and show its address on the instance's HTTPS address.
- Save with Studio's existing settings save and restart (useRollingConfigUpdate.tsx).
- If no app or root setting turns on REST, say that
/v1won't answer until one does.
- Show Harper's own error when it refuses a setting or a schema.
- Explain, next to the controls:
- which models Fabric provides on this instance, and that Fabric manages them
@decidefails the write when the model can't decide- the
/v1API needs an admin user
Acceptance criteria
- A customer can see which models their instance has, without seeing any key.
- Once HM#279 lands, a customer can add their own model on Harper 5.3+, and it's still there after Fabric's next pass.
- A customer can add
@embedand@decidefields in the schema editor, and records written afterwards get the derived values. - A customer can turn the
/v1API on and reach it at the address Studio shows.
Dependencies
- Adding the customer's own models waits on HM#279.
- Studio already reads and saves settings through Fabric's command channel, and that requires "update" permission on the cluster in Fabric.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5
- Forks
- 4
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 144
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/studio
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
HarperFast/studio#2070 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HarperFast/studio#2067 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
HarperFast/studio#2053 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
HarperFast/studio#2026 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
HarperFast/studio#2021 ·
Los mantenedores suelen responder en 2 días
Todos los issues de HarperFast/studio
Issues similares
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
S-Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
error in published node.d.cts: 'Blob$1' refers to a value, but is being used as a type here.AbiertoCLI Empathy needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
chromaui/chromatic-cli#1665 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
software-mansion/argent#1854 ·
Los mantenedores suelen responder en 1 día
-
FAQ Spacing IssueAbierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 65/100
nilbuild/developer-roadmap#10557 ·
Los mantenedores suelen responder en 1 día