Skip to content

Add default expert URLs#6949

Merged
hardillb merged 8 commits intomainfrom
default-ff-expect-urls
Apr 1, 2026
Merged

Add default expert URLs#6949
hardillb merged 8 commits intomainfrom
default-ff-expect-urls

Conversation

@hardillb
Copy link
Copy Markdown
Contributor

fixes #6895

Description

Adds default URLs for assistant and expert using the new unified hostname expert.flowfuse.com.

NOT TO BE MERGED BEFORE: https://github.com/FlowFuse/CloudProject/pull/1224

Related Issue(s)

#6895

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@hardillb hardillb requested a review from Steve-Mcl March 24, 2026 17:15
@hardillb hardillb self-assigned this Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.29%. Comparing base (c8c9ce5) to head (e01799c).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
forge/config/index.js 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6949      +/-   ##
==========================================
- Coverage   76.29%   76.29%   -0.01%     
==========================================
  Files         403      403              
  Lines       20296    20302       +6     
  Branches     4881     4885       +4     
==========================================
+ Hits        15485    15489       +4     
- Misses       4811     4813       +2     
Flag Coverage Δ
backend 76.29% <66.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hardillb
Copy link
Copy Markdown
Contributor Author

@Steve-Mcl I've had to remove 2 tests as there won't be a case of the URLs not being set anymore.

Hopefully this is just temporary until https://github.com/FlowFuse/engineering/issues/6 is fixed, when suitable new tests can be added.

@hardillb hardillb marked this pull request as ready for review March 26, 2026 13:41
Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

Should we not put the defaults in config/index.js so they are in one place and not repeated - or is there a subtlety i am missing?

Something like:

        if (config.assistant?.enabled === true && !config.assistant.service?.url) {
            config.assistant.service.url = 'https://expert.flowfuse/v1/openai'
        }
        if (config.expert?.enabled === true && !config.expert.service?.url) {
            config.expert.service.url = 'https://expert.flowfuse/v4/expert'
        }

Comment thread test/unit/forge/routes/api/assistant_spec.js Outdated
Comment thread test/unit/forge/routes/api/expert_spec.js Outdated
Comment thread forge/db/controllers/Assistant.js Outdated
Comment thread forge/expert/index.js Outdated
Comment thread forge/routes/api/assistant.js Outdated
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
Comment thread forge/config/index.js
Copy link
Copy Markdown
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

LGTM

@hardillb hardillb merged commit cea41b4 into main Apr 1, 2026
42 of 46 checks passed
@hardillb hardillb deleted the default-ff-expect-urls branch April 1, 2026 10:49
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.

Add default URL(s) for Expert and Assistant to code to minimise config setup

2 participants