Skip to content

Add multi-model provider support and an agents page - #70

Merged
rdehuyss merged 13 commits into
mainfrom
feature/multi-model-providers-agents
Sep 9, 2026
Merged

rdehuyss merged 13 commits into
mainfrom
feature/multi-model-providers-agents

Conversation

@arefbehboudi

@arefbehboudi arefbehboudi commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator
  • Named LLM providers under agent.llm.providers (LlmProviderProperties) with a per-provider ChatModelFactory SPI (OpenAI, Anthropic incl. Claude Code OAuth, Ollama, Google Gen AI) and a ChatClientRegistry that builds/caches a ChatClient per provider and rebuilds on configuration refresh.

  • Hot-reload of configuration without a full restart (ConfigurationRebinder + ConfigurationRefreshedEvent; ConfigurationManager now tracks changed keys and supports removeProperty).

  • Main agent ChatClient delegates to the default provider and rebuilds on refresh (MainChatClientProvider + DelegatingChatClient); subagent routing wired via the agent-utils TaskTool.

  • Agents page + REST API (/api/agents): create/edit/delete agents; structured config (provider type, model, API key) is saved to application.yaml under agent.llm.providers., and description + instructions to workspace/agents/.md.

  • ProviderConnectionTester + /api/providers REST; onboarding now saves the selected provider as providers.default.

  • Tests for registry fallback, connection tester, and the agent/provider controllers.

Closes #28

@arefbehboudi
arefbehboudi requested a review from rdehuyss July 2, 2026 17:20
- Named LLM providers under `agent.llm.providers` (LlmProviderProperties) with a
  per-provider ChatModelFactory SPI (OpenAI, Anthropic incl. Claude Code OAuth,
  Ollama, Google Gen AI) and a ChatClientRegistry that builds/caches a ChatClient
  per provider and rebuilds on configuration refresh.
- Hot-reload of configuration without a full restart (ConfigurationRebinder +
  ConfigurationRefreshedEvent; ConfigurationManager now tracks changed keys and
  supports removeProperty).
- Main agent ChatClient delegates to the default provider and rebuilds on refresh
  (MainChatClientProvider + DelegatingChatClient); subagent routing wired via the
  agent-utils TaskTool.
- Agents page + REST API (/api/agents): create/edit/delete agents; structured
  config (provider type, model, API key) is saved to application.yaml under
  agent.llm.providers.<name>, and description + instructions to
  workspace/agents/<name>.md.
- ProviderConnectionTester + /api/providers REST; onboarding now saves the selected
  provider as providers.default.
- Tests for registry fallback, connection tester, and the agent/provider controllers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arefbehboudi
arefbehboudi force-pushed the feature/multi-model-providers-agents branch from 66a4475 to dc6e9a6 Compare July 2, 2026 17:30
@arefbehboudi arefbehboudi self-assigned this Jul 2, 2026
arefbehboudi and others added 12 commits July 3, 2026 00:30
- Consolidate all workspace/agents/ access into SubagentStore and remove the
  duplicate SubagentReferenceScanner (single frontmatter parser).
- Route subagents by provider name only in MainChatClientProvider; drop the
  redundant provider-type builder keying and its LlmProviderProperties dependency.
- Trim ProviderController to a read-only GET (used for the agents-page model list);
  remove the unused ProviderForm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the /api/providers controller, DTO, and test, and simplify the
agents page to default the model field from the selected provider
instead of populating it from the configured provider list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the provider-change-only early return so any configuration
change triggers a full application restart.
Configuration changes trigger a full application restart, so the
delegating chat client and the configuration rebind/refresh machinery
are no longer needed. Remove DelegatingChatClient, ConfigurationRebinder
and ConfigurationRefreshedEvent, and build the main chat client and
provider registry once per context.
The agents page mapping was lost when SettingsController was removed;
serve the view from IndexController so the page renders again.
Onboarding writes the provider under agent.llm.providers.default, not
spring.ai.model.chat, so the index redirect never saw a configured
model. Gate on the default provider entry instead.
Onboarding stores the provider under agent.llm.providers.default, so the
session fallbacks that read spring.ai.model.chat never pre-selected the
configured provider. Read the default provider entry instead.
The credentials step read and displayed spring.ai.<id>.* keys, but
onboarding saves under agent.llm.providers.default. Read and show the
actual keys, and drop the now-unused createPropertyKey/saveProperty
helpers.
@rdehuyss
rdehuyss merged commit f63975b into main Sep 9, 2026
1 check passed
@rdehuyss
rdehuyss deleted the feature/multi-model-providers-agents branch September 9, 2026 09:39
JoseWalker added a commit to JoseWalker/JavaClaw that referenced this pull request Sep 23, 2026
…page

Brings in ClawRunr#70 (multi-model provider support, /settings/agents page,
SubagentController REST API) and the other recent upstream commits
before building a Vaadin settings view on top of that backend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
JoseWalker added a commit to JoseWalker/JavaClaw that referenced this pull request Sep 23, 2026
The settings page has no pinned regions like the chat view does, so
unlike .jc-app it needs overflow-y directly - without it, taller
content had nowhere to go once it exceeded the shell's fixed 100dvh,
which looked identical to the page being cut off.

Separately, ProviderSection only read the current agent.llm.providers.
default.* keys, so a reader configured before upstream ClawRunr#70 introduced
them saw an apparently-blank page - not just cosmetic, since it makes
"what do I already have configured" unanswerable, and would let a
worried reader overwrite a still-working setup with a blank save.
Added a read-only fallback to the pre-ClawRunr#70 keys (spring.ai.model.chat
and its per-provider chat.options.model / api-key), only consulted
when the current-format keys are blank. Saving still always writes the
current format only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: fallback agents and sub agents

2 participants