picoclaw/pkg
肆月 d2c0b69243
feat(web,api): provider selection and model form foundation (#2831)
* feat: improve model configuration workflows

Add model catalog browsing, provider registry with form validation,
model fetch/test dialogs, and enhanced model management UI.

- Add model catalog API and catalog-dialog component for browsing saved models
- Add provider-registry with auto-populated form fields per provider
- Add provider-combobox, fetch-models-dialog, test-model-dialog components
- Add model-validation for provider-aware model ID validation
- Add command and popover UI components
- Enhance edit-model-sheet with tool schema transform support
- Add anthropic to protocolMetaByName for correct default API base
- Apply NormalizeBaseURL to anthropic provider for consistent URL handling
- Add i18n keys for new model management features (en/zh)

* fix(web): prevent auto-fetch when API key is missing in fetch models dialog

When a provider requires an API key but none is set, the dialog now shows
the warning without triggering a doomed fetch attempt. Fetch is deferred
until the user provides a key.

* fix(web): add credential warning for catalog imports from remote providers

When importing models from a catalog entry whose provider requires an API
key, a yellow warning banner now informs users that credentials will need
to be configured after import.

* feat(web,api): test connection with real connectivity verification and unsaved form values

Add POST /api/models/test-inline endpoint that performs actual network
probes (GET /models) instead of just checking config. Frontend Test
Connection now uses current form values (not saved state) and is
available in both Add and Edit model flows.

* style(web): apply linter formatting across model config components

Normalize quote style, import ordering, and class name ordering as
reported by the project linter.

* fix(web,api): fix edit test connection false negative and gate fetch for unsupported providers

- handleTestInlineModel now accepts optional model_index to fall back to stored credentials when api_key is empty, fixing false negatives when testing edited models
- Add supportsFetch to provider registry and FETCHABLE_PROVIDER_KEYS derived set
- Gate Fetch Models button to only show for OpenAI-compatible and Ollama providers
- Add backend guard in handleFetchModels to reject unsupported providers with clear error

* fix: address review feedback on model config workflow

- Send explicit {} for empty extra_body/custom_headers fields so the
  backend clears stored values instead of preserving them
- Merge backend provider_options with frontend PROVIDERS registry so
  the provider picker reflects backend-supported providers and policy
  fields (create_allowed, default_auth_method, auth_method_locked)
- Render provider combobox popover inside the sheet scroll container
  to fix wheel events scrolling the sheet instead of the provider list

* feat(web,api): add provider selection, model form foundation, and validation

Split from PR #2752 (part 1 of 3).

Backend:
- CRUD model endpoints (list/add/update/delete/set-default)
- Provider metadata with default API bases and model provider options
- Model ID validation and normalization
- Anthropic default API base normalization

Frontend:
- Provider registry with metadata, labels, icons, and aliases
- Provider combobox with backend option merging
- Model field validation with provider-aware checks
- Redesigned add/edit model sheets with provider selection
- Dynamic imports for fetch/catalog/test dialogs (coming in PR2/PR3)
- i18n support for model configuration UI
2026-05-11 16:57:37 +08:00
..
agent feat: agent self evolution (#2847) 2026-05-11 16:13:27 +08:00
audio feat(provider,web,asr): enhance model management with explicit provider metadata (#2701) 2026-05-06 16:06:49 +08:00
auth fix(auth): canonicalize Google Antigravity provider and enhance credential management (#2599) 2026-04-21 16:28:29 +08:00
bus fix(events): keep runtime observers non-blocking 2026-04-27 13:09:03 +08:00
channels feat(channels): add slack_webhook channel 2026-05-11 09:54:04 +02:00
commands feat(agent): stop command 2026-05-04 08:41:29 +02:00
config feat(web,api): provider selection and model form foundation (#2831) 2026-05-11 16:57:37 +08:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
credential refactor config and security to simplified the structure (#2068) 2026-03-28 00:03:34 +08:00
cron refactor(cron): remove deliver and type params, unify agent execution path (#2147) 2026-03-29 22:52:34 +08:00
devices refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
events fix(events): keep runtime observers non-blocking 2026-04-27 13:09:03 +08:00
evolution feat: agent self evolution (#2847) 2026-05-11 16:13:27 +08:00
fileutil Merge pull request #1829 from perhapzz/test/add-fileutil-health-tests 2026-03-26 10:42:13 +01:00
gateway Merge pull request #2719 from loafoe/feat/slack-webhook-channel 2026-05-11 16:22:27 +08:00
health fix(host): modernize default host selection order 2026-04-14 14:03:23 +08:00
heartbeat refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
identity fix(identity): support negative integers in isNumeric for Telegram group IDs 2026-03-21 17:09:02 +07:00
isolation fix: treat PID=1 as stale in PID file singleton check, fix govet shadow, add .gitattributes (#2642) 2026-04-24 15:26:34 +08:00
logger unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
mcp fix(events): keep runtime observers non-blocking 2026-04-27 13:09:03 +08:00
media Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
memory fix(message): ignore transient assistant thoughts in message count and history truncation 2026-04-25 12:26:28 +08:00
migrate refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
netbind fix(web): address latest Copilot review points 2026-04-14 23:39:59 +08:00
pid fix: treat PID=1 as stale in PID file singleton check, fix govet shadow, add .gitattributes (#2642) 2026-04-24 15:26:34 +08:00
providers feat(web,api): provider selection and model form foundation (#2831) 2026-05-11 16:57:37 +08:00
routing feat(routing): add ordered dispatch rules 2026-04-01 22:13:04 +08:00
seahorse fix(seahorse): enforce target token thresholds for leaf summaries 2026-05-04 14:10:42 +02:00
session fix(reasoning): persist canonical history for DeepSeek and web chat 2026-04-24 21:45:41 +08:00
skills feat: agent self evolution (#2847) 2026-05-11 16:13:27 +08:00
state refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
tokenizer feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
tools fix(tools): exempt MCP discovery tools from agent allowlists 2026-05-08 09:18:14 +02:00
updater fix(updater): retry release fetches (#2511) 2026-04-14 10:44:21 +08:00
utils Merge pull request #2670 from david1gp/fix/tool-feedback-pretty-print 2026-05-04 21:47:32 +02:00
env.go Merge branch 'main' into version 2026-03-19 18:04:58 +08:00