Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Open
arefbehboudi wants to merge 11 commits into
mainfrom
feature/multi-model-providers-agents
Open

Add multi-model provider support and an agents page#70
arefbehboudi wants to merge 11 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) <[email protected]>
@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 10 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) <[email protected]>
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) <[email protected]>
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.
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

1 participant