Skip to content

fix: map base_url to endpoint for Azure credentials - #741

Merged
lfnovo merged 2 commits into
mainfrom
fix/azure-credential-base-url-mapping
Apr 9, 2026
Merged

fix: map base_url to endpoint for Azure credentials#741
lfnovo merged 2 commits into
mainfrom
fix/azure-credential-base-url-mapping

Conversation

@lfnovo

@lfnovo lfnovo commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Maps base_url from the UI credential form to Azure's endpoint parameter across connection tester, key provisioner, and Esperanto config
  • Allows Azure credentials to work using the existing "URL Base" form field without needing a dedicated endpoint field
  • api_version already defaults to 2024-10-21 (current GA version), no change needed

Changes

  • connection_tester.py: Use base_url as fallback for endpoint when testing Azure connections
  • key_provider.py: Use base_url as fallback for endpoint when provisioning Azure env vars
  • credential.py: In to_esperanto_config(), map base_urlendpoint for Azure when endpoint is not set

Closes #727

The Azure credential form only exposes a base_url field, but the
connection tester, key provisioner, and Esperanto config all expect
an endpoint field. This maps base_url to endpoint for Azure providers
so credentials work without requiring a dedicated endpoint form field.

Closes #727

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 3 files

Confidence score: 4/5

  • Safe to merge overall; the only noted issue is a documentation mismatch in open_notebook/domain/credential.py, which is low severity and not a functional regression.
  • Most significant concern is potential user confusion: Azure credential docs should clarify that the UI “URL Base”/base_url maps to the Azure endpoint and no separate Endpoint field is required.
  • Pay close attention to open_notebook/domain/credential.py - update Azure credential docs to reflect base_url/endpoint mapping.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="open_notebook/domain/credential.py">

<violation number="1" location="open_notebook/domain/credential.py:79">
P2: Update the Azure credential docs to reflect that the UI “URL Base”/base_url field maps to the Azure endpoint (and that a dedicated Endpoint field is not required when base_url is provided).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

config["api_key"] = self.api_key.get_secret_value()
if self.base_url:
config["base_url"] = self.base_url
# For Azure, base_url from the UI form maps to endpoint

@cubic-dev-ai cubic-dev-ai Bot Apr 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Update the Azure credential docs to reflect that the UI “URL Base”/base_url field maps to the Azure endpoint (and that a dedicated Endpoint field is not required when base_url is provided).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At open_notebook/domain/credential.py, line 79:

<comment>Update the Azure credential docs to reflect that the UI “URL Base”/base_url field maps to the Azure endpoint (and that a dedicated Endpoint field is not required when base_url is provided).</comment>

<file context>
@@ -76,6 +76,9 @@ def to_esperanto_config(self) -> Dict[str, Any]:
             config["api_key"] = self.api_key.get_secret_value()
         if self.base_url:
             config["base_url"] = self.base_url
+            # For Azure, base_url from the UI form maps to endpoint
+            if self.provider and self.provider.lower() == "azure" and not self.endpoint:
+                config["endpoint"] = self.base_url
</file context>
Fix with Cubic

@lfnovo
lfnovo merged commit 4222329 into main Apr 9, 2026
8 checks passed
@lfnovo
lfnovo deleted the fix/azure-credential-base-url-mapping branch April 9, 2026 16:22
Antman1526 pushed a commit to Antman1526/Deeper-Notebook that referenced this pull request Aug 18, 2026
* fix: map base_url to endpoint for Azure credentials

The Azure credential form only exposes a base_url field, but the
connection tester, key provisioner, and Esperanto config all expect
an endpoint field. This maps base_url to endpoint for Azure providers
so credentials work without requiring a dedicated endpoint form field.

Closes lfnovo#727

* docs: update Azure credential docs to reflect base_url mapping
Antman1526 pushed a commit to Antman1526/Deeper-Notebook that referenced this pull request Aug 18, 2026
* fix: map base_url to endpoint for Azure credentials

The Azure credential form only exposes a base_url field, but the
connection tester, key provisioner, and Esperanto config all expect
an endpoint field. This maps base_url to endpoint for Azure providers
so credentials work without requiring a dedicated endpoint form field.

Closes lfnovo#727

* docs: update Azure credential docs to reflect base_url mapping
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.

bug: Azure credential form missing endpoint and api_version fields

1 participant