picoclaw/fix_react2.js
google-labs-jules[bot] 5e2f7078d9 feat: implement multi-tier intelligent model routing
This expands the intelligent routing feature (which previously only supported
a binary light/heavy split) to support an arbitrary number of tiers, each with
its own model and threshold score.

- Update `RoutingConfig` to use a `Tiers` array.
- Handle backward compatibility for `light_model` and `threshold`.
- Update `Router.SelectModel` to iterate over sorted tiers and select
  the tier with the highest threshold that is <= the complexity score.
- Update `AgentInstance` initialization to resolve candidates for all
  routing tiers instead of just the light model.
- Update the frontend UI to display, add, edit, and remove routing tiers.

Co-authored-by: TanLuong <28281768+TanLuong@users.noreply.github.com>
2026-03-25 08:34:56 +00:00

7 lines
390 B
JavaScript

const fs = require('fs');
const content = fs.readFileSync('web/frontend/src/components/models/edit-model-sheet.tsx', 'utf8');
const fixed = content.replace(/placeholder='\{"X-My-Header": "value"\}'/, `placeholder='{"X-My-Header": "value"}'
/>
</Field>
<Field`);
fs.writeFileSync('web/frontend/src/components/models/edit-model-sheet.tsx', fixed);