Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Rust ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrusttask-routingtauri
.icon {
display: inline-block;
width: 18px;
height: 18px;
flex: 0 0 auto;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: calc(36px * var(--hr-text-scale));
padding: 0 14px;
border: 1px solid var(--border-strong);
border-radius: 9px;
background: var(--bg-soft);
color: var(--text-soft);
font-size:calc(14px * var(--hr-text-scale));
font-weight: 620;
white-space: nowrap;
cursor: default;
transition: 150ms var(--ease);
}
.btn:hover:not(:disabled) {
border-color: color-mix(in srgb, var(--border-strong) 45%, var(--accent));
background: var(--bg-hover);
color: var(--text);
transform: translateY(-1px);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.46; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary {
border-color: transparent;
background: linear-gradient(145deg, var(--accent), #6b68dc);
color: white;
box-shadow: 0 8px 24px rgba(103, 116, 238, 0.22);
}
.btn-primary:hover:not(:disabled) {
border-color: transparent;
background: linear-gradient(145deg, var(--accent-bright), #7a76e9);
color: white;
}
.btn-quiet {
border-color: transparent;
background: transparent;
}
.btn-danger {
border-color: color-mix(in srgb, var(--red) 34%, transparent);
background: var(--red-soft);
color: var(--red);
}
.btn-lg {
min-height: calc(44px * var(--hr-text-scale));
padding: 0 19px;
border-radius: 11px;
font-size:calc(15px * var(--hr-text-scale));
}
.icon-btn {
display: inline-grid;
place-items: center;
width: 34px;
height: 34px;
padding: 0;
border: 1px solid transparent;
border-radius: 9px;
background: transparent;
color: var(--text-muted);
cursor: default;
transition: 150ms var(--ease);
}
.icon-btn:hover {
border-color: var(--border);
background: var(--bg-hover);
color: var(--text);
}
.icon-btn .icon { width: 17px; height: 17px; }
.surface {
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--panel);
}
.surface-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
min-height: calc(52px * var(--hr-text-scale));
padding: 0 17px;
border-bottom: 1px solid var(--divider);
}
.surface-title {
font-size:calc(15px * var(--hr-text-scale));
font-weight: 680;
}
.surface-body { padding: 17px; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.badge {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: calc(24px * var(--hr-text-scale));
padding: 2px 8px;
border: 1px solid var(--border);
border-radius: 99px;
background: var(--bg-soft);
color: var(--text-muted);
font-size:calc(12px * var(--hr-text-scale));
font-weight: 620;
white-space: nowrap;
}
.badge::before {
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
content: "";
}
.badge.no-dot::before { display: none; }
.badge.good { border-color: color-mix(in srgb, var(--green) 24%, transparent); background: var(--green-soft); color: var(--green); }
.badge.warn { border-color: color-mix(in srgb, var(--yellow) 24%, transparent); background: var(--yellow-soft); color: var(--yellow); }
.badge.bad { border-color: color-mix(in srgb, var(--red) 24%, transparent); background: var(--red-soft); color: var(--red); }
.badge.info { border-color: color-mix(in srgb, var(--accent) 24%, transparent); background: var(--accent-soft); color: var(--accent-bright); }
.badge.cyan { border-color: color-mix(in srgb, var(--cyan) 24%, transparent); background: var(--cyan-soft); color: var(--cyan); }
.badge.purple { border-color: color-mix(in srgb, var(--purple) 24%, transparent); background: var(--purple-soft); color: var(--purple); }
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text-muted);
}
.status-dot.good { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot.warn { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.field {
display: grid;
gap: 7px;
}
.field + .field { margin-top: 15px; }
.field-label {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
color: var(--text-soft);
font-size:calc(13px * var(--hr-text-scale));
font-weight: 620;
}
.field-help {
color: var(--text-muted);
font-size:calc(12px * var(--hr-text-scale));
font-weight: 450;
}
.input,
.select,
.textarea {
width: 100%;
border: 1px solid var(--border-strong);
border-radius: 9px;
outline: none;
background: var(--bg-soft);
color: var(--text);
transition: 150ms var(--ease);
}
.input,
.select {
min-height: calc(38px * var(--hr-text-scale));
height: auto;
padding: 0 11px;
}
.textarea {
min-height: calc(84px * var(--hr-text-scale));
padding: 10px 11px;
resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder,
.textarea::placeholder { color: var(--text-faint); }
.search-box {
position: relative;
display: flex;
align-items: center;
}
.search-box .icon {
position: absolute;
left: 11px;
width: 16px;
color: var(--text-muted);
pointer-events: none;
}
.search-box .input { padding-left: 34px; }
.segmented {
display: inline-flex;
gap: 2px;
padding: 3px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--bg-soft);
}
.segment {
min-height: calc(30px * var(--hr-text-scale));
padding: 0 11px;
border: 0;
border-radius: 7px;
background: transparent;
color: var(--text-muted);
font-size:calc(13px * var(--hr-text-scale));
font-weight: 600;
white-space: nowrap;
}
.segment:hover { color: var(--text-soft); }
.segment.active { background: var(--panel-high); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.switch-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
min-height: 54px;
}
.switch-copy strong { display: block; font-size:calc(14px * var(--hr-text-scale)); font-weight: 650; }
.switch-copy span { display: block; margin-top: 3px; color: var(--text-muted); font-size:calc(12px * var(--hr-text-scale)); }
.switch {
position: relative;
width: 40px;
height: 23px;
flex: 0 0 auto;
padding: 0;
border: 0;
border-radius: 99px;
background: var(--bg-active);
transition: 180ms var(--ease);
}
.switch::after {
position: absolute;
top: 3px;
left: 3px;
width: 17px;
height: 17px;
border-radius: 50%;
background: white;
box-shadow: 0 2px 5px rgba(0,0,0,.25);
content: "";
transition: 180ms var(--ease);
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(17px); }
.radio-card-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
}
.radio-card {
position: relative;
min-height: 112px;
padding: 15px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--bg-soft);
text-align: left;
cursor: default;
transition: 160ms var(--ease);
}
.radio-card:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.radio-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.radio-card strong { display: block; margin: 10px 0 5px; font-size:calc(14px * var(--hr-text-scale)); }
.radio-card span { display: block; color: var(--text-muted); font-size:calc(12px * var(--hr-text-scale)); line-height: 1.45; }
.divider { height: 1px; background: var(--divider); }
.empty-state {
display: grid;
place-items: center;
min-height: 270px;
padding: 28px;
text-align: center;
}
.empty-state .empty-icon {
display: grid;
place-items: center;
width: 52px;
height: 52px;
margin: 0 auto 14px;
border-radius: 16px;
background: var(--accent-soft);
color: var(--accent-bright);
}
.empty-state h3 { margin: 0 0 7px; font-size:calc(17px * var(--hr-text-scale)); }
.empty-state p { max-width: 420px; margin: 0 auto 18px; color: var(--text-muted); font-size:calc(13px * var(--hr-text-scale)); line-height: 1.6; }
.modal-backdrop,
.sheet-backdrop {
position: fixed;
z-index: 100;
inset: 0;
display: grid;
place-items: center;
padding: 24px;
background: rgba(3, 5, 9, 0.58);
backdrop-filter: blur(8px);
animation: fade-in 160ms var(--ease);
}
.modal {
display: flex;
flex-direction: column;
width: min(620px, calc(100vw - 44px));
max-height: min(820px, calc(100vh - 44px));
overflow: hidden;
border: 1px solid var(--border-strong);
border-radius: 18px;
background: var(--panel-high);
box-shadow: var(--shadow-lg);
animation: modal-in 200ms var(--ease);
}
.modal.wide { width: min(860px, calc(100vw - 44px)); }
.modal.xwide { width: min(1080px, calc(100vw - 44px)); }
.modal-head {
flex-shrink: 0;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
min-height: 66px;
padding: 17px 18px 14px 22px;
border-bottom: 1px solid var(--divider);
}
.modal-head h2 { margin: 0; font-size:calc(19px * var(--hr-text-scale)); letter-spacing: -0.02em; }
.modal-head p { margin: 5px 0 0; color: var(--text-muted); font-size:calc(13px * var(--hr-text-scale)); }
.modal-body { min-height: 0; overflow: auto; padding: 20px 22px; }
.modal-foot {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 9px;
min-height: 66px;
padding: 13px 18px;
border-top: 1px solid var(--divider);
background: color-mix(in srgb, var(--panel-high) 90%, var(--bg-soft));
}
.drawer {
position: fixed;
z-index: 101;
top: var(--titlebar-height);
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
width: min(440px, 88vw);
border-left: 1px solid var(--border-strong);
background: var(--panel-high);
box-shadow: -20px 0 60px rgba(0,0,0,.28);
animation: drawer-in 220ms var(--ease);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px; border-bottom: 1px solid var(--divider); }
.drawer-head h2 { margin: 0; font-size:calc(19px * var(--hr-text-scale)); }
.drawer-head p { margin: 5px 0 0; color: var(--text-muted); font-size:calc(12px * var(--hr-text-scale)); }
.drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.drawer-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--divider); }
.callout {
display: flex;
align-items: flex-start;
gap: 11px;
padding: 12px 13px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--bg-soft);
color: var(--text-soft);
font-size:calc(13px * var(--hr-text-scale));
line-height: 1.5;
}
.callout .icon { width: 17px; margin-top: 1px; color: var(--accent-bright); }
.callout.warn { border-color: color-mix(in srgb, var(--yellow) 22%, transparent); background: var(--yellow-soft); }
.callout.warn .icon { color: var(--yellow); }
.callout.bad { border-color: color-mix(in srgb, var(--red) 22%, transparent); background: var(--red-soft); }
.callout.bad .icon { color: var(--red); }
.main > div.startup-recovery:not([hidden]) { height: auto; min-height: auto; flex: 0 0 auto; }
.main > div.native-connection-recovery:not([hidden]) { height: auto; min-height: auto; flex: 0 0 auto; flex-wrap: wrap; }
.native-connection-recovery > div { flex: 1 1 20rem; min-width: 0; overflow-wrap: anywhere; }
.native-connection-recovery > button { flex: 0 0 auto; max-width: 100%; white-space: normal; }
.startup-recovery .recovery-location { margin-block: 8px; }
.startup-recovery .recovery-location code { white-space: normal; overflow-wrap: anywhere; user-select: text; }
.toast-stack {
position: fixed;
z-index: 200;
right: 18px;
top: 68px;
display: grid;
gap: 8px;
}
.toast {
display: flex;
align-items: center;
gap: 9px;
min-width: 260px;
max-width: 420px;
padding: 11px 13px;
border: 1px solid var(--border-strong);
border-radius: 11px;
background: var(--panel-high);
box-shadow: var(--shadow-md);
color: var(--text-soft);
font-size:calc(13px * var(--hr-text-scale));
animation: toast-in 220ms var(--ease);
}
.check-row {
display: flex;
align-items: flex-start;
gap: 11px;
width: 100%;
padding: 12px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--bg-soft);
}
.check-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row strong { display: block; font-size:calc(14px * var(--hr-text-scale)); }
.check-row span { display: block; margin-top: 3px; color: var(--text-muted); font-size:calc(12px * var(--hr-text-scale)); line-height: 1.45; }
.diff-list { display: grid; gap: 8px; }
.diff-row { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; padding: 11px 12px; border-radius: 9px; background: var(--bg-soft); }
.diff-row > span:first-child { color: var(--text-muted); font-size:calc(12px * var(--hr-text-scale)); }
.diff-row code { overflow: hidden; color: var(--text-soft); font: calc(12px * var(--hr-text-scale))/1.45 var(--font-mono); text-overflow: ellipsis; }
.disclosure { min-width:0; }
.disclosure.native-details { border-top: 1px solid var(--divider); }
.disclosure > summary { display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:calc(46px * var(--hr-text-scale));padding:10px 8px;color:var(--text-soft);font-size:calc(13px * var(--hr-text-scale));font-weight:620;list-style:none;cursor:pointer;border-radius:9px;transition:background 150ms var(--ease),color 150ms var(--ease); }
.disclosure > summary::-webkit-details-marker { display:none; }
.disclosure > summary:hover { background:var(--bg-hover);color:var(--text); }
.disclosure-action { display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;color:var(--text-muted);font-size:calc(11px * var(--hr-text-scale));font-weight:560; }
.disclosure-action .icon { width:15px;height:15px;transition:transform 160ms var(--ease); }
.disclosure[open] .disclosure-action .icon { transform:rotate(180deg); }
.disclosure-body { min-width:0; }
.disclosure.native-details > .disclosure-body { padding:0 8px 13px; }
.editor-footer .disclosure-body { display:flex;flex-wrap:wrap;gap:8px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes drawer-in { from { transform: translateX(26px); opacity: .7; } }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
@media (max-width: 820px) {
.radio-card-grid { grid-template-columns: 1fr; }
.modal-backdrop { padding: 12px; }
.modal { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
}