Skip to content

fix: use baseURL (not baseUrl) when constructing Honcho SDK client#4

Open
strictlyskyler wants to merge 1 commit into
plastic-labs:mainfrom
strictlyskyler:fix/baseURL-casing
Open

fix: use baseURL (not baseUrl) when constructing Honcho SDK client#4
strictlyskyler wants to merge 1 commit into
plastic-labs:mainfrom
strictlyskyler:fix/baseURL-casing

Conversation

@strictlyskyler

@strictlyskyler strictlyskyler commented Apr 3, 2026

Copy link
Copy Markdown

The @honcho-ai/sdk's HonchoConfigSchema expects baseURL (acronym casing), but cursor-honcho passes baseUrl (camelCase). Zod silently strips the unrecognized key, causing the SDK to fall back to the production API URL (https://api.honcho.dev) instead of the configured custom endpoint.

This breaks all self-hosted / custom endpoint configurations: the client connects to production instead of the user's server, and any non-production API key is rejected with a 401.

Affected call sites:

  • getHonchoClientOptions() in config.ts
  • Inline Honcho() constructors for linked workspaces in session-start.ts and before-submit-prompt.ts

Summary by CodeRabbit

  • Refactor
    • Standardized naming conventions in the Honcho client configuration to improve code consistency.

The @honcho-ai/sdk's HonchoConfigSchema expects `baseURL` (acronym
casing), but cursor-honcho passes `baseUrl` (camelCase). Zod silently
strips the unrecognized key, causing the SDK to fall back to the
production API URL (https://api.honcho.dev) instead of the configured
custom endpoint.

This breaks all self-hosted / custom endpoint configurations: the
client connects to production instead of the user's server, and any
non-production API key is rejected with a 401.

Affected call sites:
- getHonchoClientOptions() in config.ts
- Inline Honcho() constructors for linked workspaces in
  session-start.ts and before-submit-prompt.ts
@coderabbitai

coderabbitai Bot commented Apr 3, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ecae4fcb-4b68-4a47-9cc2-6788d8980384

📥 Commits

Reviewing files that changed from the base of the PR and between 8383597 and 21d4cd8.

📒 Files selected for processing (3)
  • plugins/honcho/src/config.ts
  • plugins/honcho/src/hooks/before-submit-prompt.ts
  • plugins/honcho/src/hooks/session-start.ts

Walkthrough

Updated baseUrl property name to baseURL across Honcho client configuration and initialization throughout the plugin. Changes include the HonchoClientOptions interface definition, the getHonchoClientOptions() function, and two hook files that instantiate Honcho clients using this configuration.

Changes

Cohort / File(s) Summary
Configuration interface and function
plugins/honcho/src/config.ts
Updated HonchoClientOptions interface property name from baseUrl to baseURL and modified getHonchoClientOptions() to return the corrected property name.
Hook implementations
plugins/honcho/src/hooks/before-submit-prompt.ts, plugins/honcho/src/hooks/session-start.ts
Updated Honcho client instantiation in linked workspace loops to use baseURL option key instead of baseUrl when constructing client instances.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Poem

🐰 A URL base now stands up tall,
From baseUrl to baseURL call,
Camel case fixed, consistency restored,
The naming gods are quite adored!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: fixing the baseURL casing issue when constructing Honcho SDK clients across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant