Skip to content

fix: add any_configured() to ProvidersConfig to prevent onboarding 500#1177

Merged
lucaseduoli merged 1 commit into
langflow-ai:fix/configuration_watsonxfrom
themavik:fix/1163-providers-any-configured
Mar 19, 2026
Merged

fix: add any_configured() to ProvidersConfig to prevent onboarding 500#1177
lucaseduoli merged 1 commit into
langflow-ai:fix/configuration_watsonxfrom
themavik:fix/1163-providers-any-configured

Conversation

@themavik

@themavik themavik commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Onboarding fails with a 500 error when configuring watsonx.ai or ollama providers because ProvidersConfig is missing the any_configured() method that settings.py calls.

Problem

src/api/settings.py line 1088 calls:

current_config.providers.any_configured()

But ProvidersConfig in src/config/config_manager.py only has get_provider_config() — no any_configured() method exists. This raises AttributeError: 'ProvidersConfig' object has no attribute 'any_configured', which surfaces as a 500 error during the onboarding settings save.

Root cause

The any_configured() call was added to settings.py but the corresponding method was never implemented on the ProvidersConfig dataclass.

Fix

Add any_configured() to ProvidersConfig that returns True if any provider's configured flag is set. Each provider dataclass (OpenAIConfig, AnthropicConfig, WatsonXConfig, OllamaConfig) already has a configured: bool field.

Testing

  • Configuring watsonx.ai or ollama during onboarding no longer crashes with 500
  • any_configured() returns True when at least one provider is configured
  • any_configured() returns False when no providers are configured

Closes #1163

settings.py calls current_config.providers.any_configured() but
ProvidersConfig had no such method, causing an AttributeError that
surfaces as a 500 error during onboarding when configuring watsonx.ai
or ollama providers.

Closes #1163

Made-with: Cursor
@github-actions github-actions Bot added community backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 18, 2026
@lucaseduoli lucaseduoli changed the base branch from main to release-0.4.0 March 19, 2026 16:35

@lucaseduoli lucaseduoli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@lucaseduoli lucaseduoli changed the base branch from release-0.4.0 to fix/configuration_watsonx March 19, 2026 16:38
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@lucaseduoli

Copy link
Copy Markdown
Collaborator

Merging into #1201 so that the tests can run!

@lucaseduoli lucaseduoli merged commit 12c6a34 into langflow-ai:fix/configuration_watsonx Mar 19, 2026
17 of 19 checks passed
lucaseduoli added a commit that referenced this pull request Mar 19, 2026
#1177) (#1201)

settings.py calls current_config.providers.any_configured() but
ProvidersConfig had no such method, causing an AttributeError that
surfaces as a 500 error during onboarding when configuring watsonx.ai
or ollama providers.

Closes #1163

Made-with: Cursor

Co-authored-by: Mavik <[email protected]>
Co-authored-by: themavik <[email protected]>
lucaseduoli pushed a commit that referenced this pull request Mar 23, 2026
#1177)

settings.py calls current_config.providers.any_configured() but
ProvidersConfig had no such method, causing an AttributeError that
surfaces as a 500 error during onboarding when configuring watsonx.ai
or ollama providers.

Closes #1163

Made-with: Cursor

Co-authored-by: themavik <[email protected]>
lucaseduoli added a commit that referenced this pull request Mar 23, 2026
#1177) (#1226)

settings.py calls current_config.providers.any_configured() but
ProvidersConfig had no such method, causing an AttributeError that
surfaces as a 500 error during onboarding when configuring watsonx.ai
or ollama providers.

Closes #1163

Made-with: Cursor

Co-authored-by: Mavik <[email protected]>
Co-authored-by: themavik <[email protected]>
lucaseduoli added a commit that referenced this pull request Mar 24, 2026
#1177) (#1226)

settings.py calls current_config.providers.any_configured() but
ProvidersConfig had no such method, causing an AttributeError that
surfaces as a 500 error during onboarding when configuring watsonx.ai
or ollama providers.

Closes #1163

Made-with: Cursor

Co-authored-by: Mavik <[email protected]>
Co-authored-by: themavik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Onboarding fails with 500 error when configuring watsonx.ai and ollama provider

2 participants