Repository navigation
feat(platform): give automations a model the organization serves - #4761
Merged
Merged
Conversation
The validator's model check walked an llm step's serving through a shim built inline in dispatch-store, under a private budget helper. walkLlmServingForOrganization and withinBudget now live in their own modules, so a second asker (the model a shipped pack is given) asks the same question under the same budget. No behaviour change.
Every shipped pack's llm steps name anthropic/claude-haiku-4-5, so an organization whose providers do not serve it got packs whose model steps failed on their first live run. Seeding now gives such a step the model the chat's Auto picks for its band (haiku is draft) among the models the organization serves directly and lets every member use, and the first version says so: "Model anthropic/claude-haiku-4-5 isn't served here; using gpt-5-mini." - A model is replaced only when the run's own serving walk says nobody serves it; an unreadable catalog, a slow walk or any failure keeps it. - Only literal llm models; agent steps and templated models are left. - An organization's existing packs are never changed (PROVN-R8). - Pure picker in lib/automations/model-defaults.ts (an optional band for templates later); getAccessibleModelsForMembers for the members' audience; listOrganizationChatModels for the composer walk with no person.
A "Change model" action in the editor's header (for authors, when an llm step names a model) opens one dialog: the model to replace (each with its count of steps), the model to use instead from the ones the organization's providers serve, and the steps that change. Applying it is a draft edit like any other, so Save and Discard keep it reviewable. The llm Model field's option list moves into useLlmModelOptions, which the dialog shares. Agent steps and templated models are left alone.
The built-in packages page says what Tale does when no provider serves a package's model, and that Change model swaps one in every step; the editor page describes the Change model action beside the Model picker. en/de/fr.
AUTO-F134: an organization created with only a provider that does not serve Haiku gets packs on a served model, and version 1 says which. AUTO-F135: the Change model dialog lists the steps, swaps the model as a draft, and Discard brings it back.
Provider credentials only exist once an admin connects one, so a new organization's packs are always added before any provider: the seeding case cannot be set up by hand. The behaviour is unit-owned (listed in the reference map); the Change model dialog keeps its box, now AUTO-F134. The built-in packages page says a new organization's packages are that case.
A shot of the Use another model in all steps dialog on the Gmail inbox triage (its two language model steps on Claude Haiku, Claude Sonnet 4.6 picked), framed beside the Model picker in the editor docs, en/de/fr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every shipped automation pack names
anthropic/claude-haiku-4-5in itsllmsteps. An organization whose providers don't serve it got packs whose model steps failed on their first live run. This adds two remedies.1. Packs are given a model the organization serves
When provisioning adds a pack, each
llmstep whose model no direct provider of the organization serves gets the model the chat's Auto picks for that model's band. Haiku isdraft. The pick comes from the models the organization serves directly (an API key or the deployment's environment, as a run serves anllmstep) and lets every member use. Version 1's message says what happened, e.g. "Shipped default pack. Model anthropic/claude-haiku-4-5 isn't served here; using gpt-5-mini."walkLlmServing, now shared aswalkLlmServingForOrganization) says nobody serves it.Where it applies: provider credentials only exist once an admin connects one. A new organization's packs are therefore always added before any provider, and keep Haiku. The replacement applies to packs a later release adds, and to templates (the gallery slice will call the same pure picker,
lib/automations/model-defaults.ts). For new organizations, the existingLLM_MODEL_UNAVAILABLEwarning plus the new Change model action is the fix. The docs say so.2. Change model in the editor
A Change model action in the editor header, shown to authors when an
llmstep names a model, opens one dialog:Applying it is a draft edit like any other, so Save and Discard keep it reviewable. The llm Model field's option list moved into
useLlmModelOptions, which the dialog shares.Diverges from the design (p9-design §7)
draft | standard | frontier, not light/standard/deep.modelBandfield yet: nothing ships one. The pure picker takes an optional band, so templates can add the field where they need it.modelonly: llm nodes have nomodelProviderfield; the run resolves the provider itself.getAccessibleModelsForMembers, andlistOrganizationChatModelsfor the composer walk without a person.Verified
resolveModelReplacementskeptanthropic/claude-haiku-4-5andanthropic/claude-sonnet-4.6, which the catalog serves (Haiku is listed asclaude-haiku-4.5);gpt-4.1-miniwithanthropic/claude-haiku-4.5, in the provider's spelling;