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
{{ message }}
Repository navigation
Commit 71105a5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(gateway): add Auto Router that picks a model per prompt (#6532)
* feat(gateway): add Auto Router that picks the model for each prompt with Jev
Admins list AI Gateway models with a description of when to use each and
the thinking levels it may run at. Members pick Auto in the desktop; the
gateway asks Jev (TypeSafe System One) which route fits the latest prompt,
then forwards the request under the member's own Gateway alias, translating
OpenAI chat to Anthropic Messages, Gemini or Bedrock Converse as needed.
Behind the cloud-only autoRouter feature, off by default. The free starter
model is renamed from Auto to OpenWork Free.
* feat(desktop): show which model answered an Auto reply
The gateway also sends the routed model's display name. A v2 engine plugin
records each Auto routing decision (provider, model, name, thinking) on the
session's metadata from the gateway's response headers, and the reply footer
labels each Auto reply with the decision made while it ran.
The Auto Router proof now also drives the desktop: Auto is first in the
model picker, and the reply shows the model that answered.
* docs(auto-router): drop the removed classic engine
* fix(auto-router): reserve the Auto provider id, ship its types build, declare audit routes
- Client provider writes (workspace config patch, runtime provider patch,
OpenCode config text) can no longer define or replace openwork-auto, which
passes the organization-only provider policy by id.
- @openwork/types/den/auto-router gets a built entry so the packaged desktop
server does not import TypeScript from node_modules.
- Declare the Auto Router routes for audit coverage.
- Readable ink for the prompt length counter (UI guardrails).
* fix(auto-router): check decoded JSONC keys for the reserved provider id
case"free_not_enrolled": return{subtitle: "Not on for your organization yet",detail: "Your organization hasn’t turned on Auto yet. An admin can turn it on. Other models still work."};
68
-
case"free_not_offered": case"admin_disabled": return{subtitle: "Turned off by your organization",detail: "Your organization has turned off Auto. Other models still work."};
69
-
case"managed_models_disabled_for_dpa": return{subtitle: "Not available for your organization",detail: "Auto isn’t available under your organization’s data agreement. Other models still work."};
70
-
default: return{subtitle: "Not available for this account",detail: "Auto isn’t available for this account. Other models still work."};
67
+
case"free_not_enrolled": return{subtitle: "Not on for your organization yet",detail: "Your organization hasn’t turned on OpenWork Free yet. An admin can turn it on. Other models still work."};
68
+
case"free_not_offered": case"admin_disabled": return{subtitle: "Turned off by your organization",detail: "Your organization has turned off OpenWork Free. Other models still work."};
69
+
case"managed_models_disabled_for_dpa": return{subtitle: "Not available for your organization",detail: "OpenWork Free isn’t available under your organization’s data agreement. Other models still work."};
70
+
default: return{subtitle: "Not available for this account",detail: "OpenWork Free isn’t available for this account. Other models still work."};
detail: signedIn ? "This week’s free limit is used up. Pick another model to keep going." : "This week’s free limit is used up. Sign in for a larger free limit.",
142
142
action: signedIn ? null : "Sign in"};
143
143
}
144
-
case"update_required": return{subtitle: "Needs an OpenWork update",detail: minimumVersion?.trim() ? `Update to ${autoUpdateTarget(minimumVersion)} to keep using Auto. Your draft is kept.` : "Update OpenWork to keep using Auto. Your draft is kept.",action: "Update"};
145
-
case"unavailable": return{subtitle: "Temporarily unavailable",detail: "Auto is having trouble right now. Other models still work.",action: "Retry"};
146
-
case"sync": return{subtitle: "Finishing setup",detail: "Auto is almost ready. Reload the workspace if it doesn’t appear.",action: "Reload"};
147
-
case"ready": return{subtitle: "OpenWork picks the model",detail: "Free access ready",action: null};
144
+
case"update_required": return{subtitle: "Needs an OpenWork update",detail: minimumVersion?.trim() ? `Update to ${autoUpdateTarget(minimumVersion)} to keep using OpenWork Free. Your draft is kept.` : "Update OpenWork to keep using OpenWork Free. Your draft is kept.",action: "Update"};
145
+
case"unavailable": return{subtitle: "Temporarily unavailable",detail: "OpenWork Free is having trouble right now. Other models still work.",action: "Retry"};
146
+
case"sync": return{subtitle: "Finishing setup",detail: "OpenWork Free is almost ready. Reload the workspace if it doesn’t appear.",action: "Reload"};
147
+
case"ready": return{subtitle: "Free with a usage limit",detail: "Free access ready",action: null};
{copy.action==="Reload" ? <Buttonsize="sm"variant="outline"disabled={!reload||busy||activeWork||checkRestriction({restriction: "allowControlSettings"})}title={activeWork ? "Wait for this workspace’s active tasks to finish" : undefined}onClick={()=>{if(reload)voidrun(reload);}}>Reload</Button> : null}
117
-
</>}>{failed ? "Couldn’t refresh Auto. Try again, or choose another model." : state==="unavailable"&&!hasAlternatives ? "Auto is having trouble right now. Connect another provider to continue." : copy.detail}</PickerNotice>;
117
+
</>}>{failed ? "Couldn’t refresh OpenWork Free. Try again, or choose another model." : state==="unavailable"&&!hasAlternatives ? "OpenWork Free is having trouble right now. Connect another provider to continue." : copy.detail}</PickerNotice>;
0 commit comments