Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion nextcloud_mcp_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,20 @@ def __post_init__(self):
# rather than raise: the prefix set is the gateway's, not a closed
# universe, and refusing to boot over a model name we cannot validate
# would be worse than saying so.
if self.search_rerank_enabled and self.search_rerank_url:
#
# "Explicit URL" does NOT imply "not the gateway": pointing
# SEARCH_RERANK_URL at the gateway's own /v1/rerank is a legitimate
# configuration (it is how you pin the endpoint while still using the
# gateway), and the routing prefix is correct there. Only warn when the
# URL is somewhere OTHER than the configured gateway — otherwise the
# warning fires on a working setup and trains operators to ignore it.
_direct_rerank = bool(self.search_rerank_url) and not (
self.embedding_gateway_url
and self.search_rerank_url.startswith(
self.embedding_gateway_url.rstrip("/")
)
)
if self.search_rerank_enabled and _direct_rerank:
_prefix, _, _bare = self.search_rerank_model.partition("/")
if _prefix in GATEWAY_MODEL_NAMESPACES:
logger.warning(
Expand Down
20 changes: 20 additions & 0 deletions tests/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,26 @@ def test_direct_url_warns_about_the_gateway_namespaced_default_model(self, caplo
assert "SEARCH_RERANK_MODEL" in caplog.text
assert "BAAI/bge-reranker-v2-m3" in caplog.text

@patch.dict(
os.environ,
{
"SEARCH_RERANK_ENABLED": "true",
"EMBEDDING_GATEWAY_URL": "https://gw.example",
"SEARCH_RERANK_URL": "https://gw.example/v1/rerank",
},
clear=True,
)
def test_rerank_url_pointing_at_the_gateway_is_quiet(self, caplog):
"""Pinning SEARCH_RERANK_URL to the gateway's OWN /v1/rerank is a valid
configuration -- the routing prefix is correct there. Warning on it fires
on a working setup, which is how operators learn to ignore warnings."""
_reload_config()
with caplog.at_level(logging.WARNING, logger="nextcloud_mcp_server.config"):
settings = get_settings()

assert settings.search_rerank_model == "local/BAAI/bge-reranker-v2-m3"
assert "SEARCH_RERANK_MODEL" not in caplog.text

@patch.dict(
os.environ,
{
Expand Down
2 changes: 1 addition & 1 deletion third_party/astrolabe
Submodule astrolabe updated 57 files
+1 −1 .cz.toml
+2 −2 .github/workflows/bump-version.yml
+7 −7 .github/workflows/ci.yml
+2 −2 .github/workflows/claude-code-review.yml
+2 −2 .github/workflows/claude.yml
+1 −1 .github/workflows/docs.yml
+22 −6 .github/workflows/e2e.yml
+3 −4 .github/workflows/landing-pages.yml
+2 −2 .github/workflows/pact.yml
+2 −2 .github/workflows/release.yml
+70 −0 CHANGELOG.md
+8 −5 appinfo/info.xml
+13 −13 composer.lock
+21 −0 docs/content/docs/troubleshooting.mdx
+679 −626 docs/package-lock.json
+4 −4 docs/package.json
+13 −0 examples/.gitignore
+255 −0 examples/external-idp-authelia/README.md
+124 −0 examples/external-idp-authelia/authelia/configuration.yml
+15 −0 examples/external-idp-authelia/authelia/users.yml
+33 −0 examples/external-idp-authelia/certs/openssl.cnf
+209 −0 examples/external-idp-authelia/compose.yml
+125 −0 examples/external-idp-authelia/generate-secrets.sh
+91 −0 examples/external-idp-authelia/nextcloud-hooks/post-installation/10-configure.sh
+251 −0 examples/external-idp-authentik/README.md
+90 −0 examples/external-idp-authentik/authentik/astrolabe-blueprint.yaml
+233 −0 examples/external-idp-authentik/compose.yml
+47 −0 examples/external-idp-authentik/generate-secrets.sh
+111 −0 examples/external-idp-authentik/nextcloud-hooks/post-installation/10-configure.sh
+147 −18 lib/Service/McpTokenMinter.php
+15 −69 lib/Service/WebhookPresets.php
+12 −7 lib/Settings/AstrolabeAdminSettings.php
+311 −307 package-lock.json
+7 −6 package.json
+52 −0 playwright.external-idp.config.ts
+124 −5 src/App.vue
+1 −1 src/components/admin/AdminSettings.vue
+35 −0 tests/e2e-external-idp/helpers/keycloak-login.ts
+61 −0 tests/e2e-external-idp/search.spec.ts
+28 −10 tests/e2e/app-hooks/post-installation/10-install-apps.sh
+42 −0 tests/e2e/app-hooks/post-installation/15-setup-keycloak-provider.sh
+16 −0 tests/e2e/app-hooks/post-installation/25-configure-mcp-server.sh
+73 −0 tests/e2e/docker-compose.external-idp.yml
+1 −1 tests/e2e/docker-compose.yml
+75 −0 tests/e2e/keycloak/realm-export.json
+8 −4 tests/e2e/search.spec.ts
+21 −3 tests/e2e/start-server.js
+60 −5 tests/psalm-stubs/oidc-events.phpstub
+27 −0 tests/unit/Controller/ApiControllerWebhookPresetsTest.php
+140 −1 tests/unit/Service/McpTokenMinterTest.php
+23 −0 tests/unit/Service/WebhookPresetsTest.php
+68 −0 tests/unit/stubs.php
+6 −6 vendor-bin/rector/composer.lock
+301 −261 website/package-lock.json
+6 −6 website/package.json
+82 −18 website/src/app/(marketing)/pricing/page.tsx
+2 −2 website/src/lib/portal.ts
Loading