mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-12-05 10:34:31 +01:00
`neurosploit provider add` has taken a full profile for a while — base URL, wire format, proxy, session header, user agent, rate limits, context window and per-million-token prices. The console never caught up: Settings offered a key box against a fixed provider list, so registering a gateway meant dropping to a terminal, which is the opposite of the point. Every field the CLI accepts is now in Settings. Reads go straight to .neurosploit/custom_providers.json — the registry the harness itself reads — and writes go through `neurosploit provider`, so the CLI keeps owning validation, the built-in-name collision check and the merge-don't-replace semantics. Reimplementing those in JavaScript is how the two drift apart. A registered provider is now listed by /api/providers and serves its model list, so it is selectable everywhere a model is chosen rather than only working if you happen to type `name:model`. That was the actual ask: register once, use everywhere. Four more knobs the launcher has always accepted and only the wizard could set, one run at a time: the fallback model chain (which also enables voting on a disputed finding), the reasoning budget, the token ceiling and temperature. They are defaults now, and they only pre-fill — a default that overwrites what the operator already typed is worse than no default. Two things found while wiring it. Verifying a key calls the operator's own gateway, and runCli had no timeout, so a host that never answers would hang the HTTP request; runCli takes an optional bound and the key check uses 30s, with a rejected key leaving the provider registered rather than losing it. And CLI errors reached the UI with the binary's `[auto] …` banner glued to the front, burying the one line that says what went wrong. Verified against the running console: registered a provider with proxy, rate limit, context and prices; confirmed it appears in /api/providers and its models endpoint; confirmed `provider show` reports the same record; confirmed editing one field leaves base URL, models, proxy, prices and context intact; confirmed the rejections — shadowing a built-in, a path-traversal name, a cross-origin POST and a negative rate — all hold. Co-authored-by: Joas A Santos <34966120+CyberSecurityUP@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>