feat(provider): add AGIone provider preset#1123
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61267cda80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| apiKeyUrl: 'https://aistudio.google.com/app/apikey', | ||
| }, | ||
| { id: 'openrouter', name: 'OpenRouter', icon: '🌐', placeholder: 'sk-or-v1-...', model: 'Multi-Model', requiresApiKey: true, showModelId: true, modelIdPlaceholder: 'openai/gpt-5.5', defaultModelId: 'openai/gpt-5.5', docsUrl: 'https://openrouter.ai/models' }, | ||
| { id: 'agione', name: 'AGIone', icon: '🧩', placeholder: 'ak-...', model: 'Multi-Model', requiresApiKey: true, defaultBaseUrl: 'https://agione.pro/hyperone/xapi/api/v1', showModelId: true, modelIdPlaceholder: 'qwen/qwen3.5-plus/cec84', defaultModelId: 'qwen/qwen3.5-plus/cec84', apiKeyUrl: 'https://agione.pro', docsUrl: 'https://agione.pro' }, |
There was a problem hiding this comment.
Add E2E coverage for AGIone provider UI
AGENTS.md's UI change validation rule requires user-visible UI changes to include or update an Electron E2E spec; this line makes AGIone appear in the Add Provider dialog, but the commit only adds unit coverage in tests/unit/providers.test.ts. Please add a Playwright/Electron E2E that covers selecting/adding the AGIone provider so the new visible flow is validated.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43bc0ae515
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (request.action === 'list') return respond(request.id, []); | ||
|
|
||
| if (request.action === 'validateKey') { | ||
| expect(body.providerId).toBe('agione'); |
There was a problem hiding this comment.
Move assertions out of Electron main evaluate
When the renderer validates the key, this handler runs inside the Electron main process created by electronApp.evaluate, not in the Playwright test worker, so the imported Playwright expect symbol is not available there. The first validation request will hit this line, throw ReferenceError: expect is not defined, reject the host:invoke IPC call, and the new E2E will fail instead of adding AGIone; capture the request data in main and assert it back in the test process, or return explicit validation errors from the mock.
Useful? React with 👍 / 👎.
| envVar: 'AGIONE_API_KEY', | ||
| supportedAuthModes: ['api_key'], | ||
| defaultAuthMode: 'api_key', | ||
| supportsMultipleAccounts: true, |
There was a problem hiding this comment.
Keep AGIone single-account until runtime keys are unique
With this flag, the real add-provider dialog will allow multiple AGIone accounts and buildProviderAccountId will create agione-<uuid> ids, but the runtime mapping still collapses every registered non-custom/non-ollama provider back to the single OpenClaw key agione and ProviderService.listAccounts() keeps only one account per runtime key while deleting the rest. Adding a second AGIone account therefore overwrites/prunes the first account (and can clear the default if the first was default); either mark AGIone single-account here or add AGIone to the multi-instance runtime-key mapping.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9714cbdeb8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, | ||
| }, | ||
| { | ||
| id: 'agione', |
There was a problem hiding this comment.
Add harness coverage for the AGIone provider scenario
AGENTS.md requires new user-visible OpenClaw scenarios to add or update the relevant harness task/scenario/rule specs, and this preset introduces a new provider flow that writes runtime provider config. This commit adds the provider and tests but no harness/specs change, so future AI-coding validation will not cover the AGIone provider/runtime behavior; please add the corresponding harness spec coverage for this scenario.
Useful? React with 👍 / 👎.
Summary
Adds AGIone as a built-in OpenAI-compatible provider preset.
The preset uses AGIone's Chat Completions-compatible endpoint:
Default model:
Related Issue(s)
None.
Type of Change
Validation
Checklist
Disclosure
Submitted by the AGIone team.