Fix: LLM API key configuration and Windows path compatibility (Issues #322, #320)#412
Open
hobostay wants to merge 1 commit intoagentscope-ai:mainfrom
Open
Fix: LLM API key configuration and Windows path compatibility (Issues #322, #320)#412hobostay wants to merge 1 commit intoagentscope-ai:mainfrom
hobostay wants to merge 1 commit intoagentscope-ai:mainfrom
Conversation
This commit fixes two issues: 1. Issue agentscope-ai#322: Fix LLM API key configuration - Previously used HICLAW_MANAGER_GATEWAY_KEY for LLM provider's apiKey - Now correctly uses HICLAW_LLM_API_KEY (with fallback to HICLAW_MANAGER_GATEWAY_KEY) - This fixes 401 errors when using OpenAI-compatible services like Zhipu GLM-5-Turbo - The two keys serve different purposes: * HICLAW_LLM_API_KEY: API key for the actual LLM provider * HICLAW_MANAGER_GATEWAY_KEY: Auth key for HiClaw Gateway service 2. Issue agentscope-ai#320: Fix Windows path format in HOST_ORIGINAL_HOME - Windows paths like "D:\Users\xxx" are invalid in Linux containers - Added detection for Windows path format (drive letter + backslash) - Convert Windows paths to Linux format: "D:\Users\xxx" → "/d/Users/xxx" - This prevents symlink creation failures on Windows hosts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
Contributor
📊 CI Metrics ReportSummary
By Role
Per-Test Breakdown
Trends✅ 4 test(s) improved (fewer LLM calls) Generated by HiClaw CI on 2026-03-23 13:23:44 UTC |
johnlanni
requested changes
Mar 24, 2026
| KNOWN_MODELS=$(cat /opt/hiclaw/configs/known-models.json 2>/dev/null || echo '[]') | ||
| # Use HICLAW_LLM_API_KEY for LLM provider API key, fallback to HICLAW_MANAGER_GATEWAY_KEY | ||
| # HICLAW_LLM_API_KEY is the actual LLM provider key (e.g., Zhipu, OpenAI), while HICLAW_MANAGER_GATEWAY_KEY | ||
| # is for authenticating with the HiClaw Gateway service itself |
Collaborator
There was a problem hiding this comment.
HICLAW_MANAGER_GATEWAY_KEY is also the consumer key configured for the manager on Higress, and it does not need to be changed to the LLM API key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two distinct issues that affect the Manager Agent initialization:
Issue #322: Fix LLM API key configuration for OpenAI-compatible providers
Problem: The
start-manager-agent.shscript was usingHICLAW_MANAGER_GATEWAY_KEYas the LLM provider's API key inopenclaw.json. This is incorrect -HICLAW_MANAGER_GATEWAY_KEYis meant for authenticating with the HiClaw Gateway service itself, whileHICLAW_LLM_API_KEYis the API key for the actual LLM provider (Zhipu, OpenAI, etc.).Impact: Users configuring OpenAI-compatible services (like Zhipu GLM-5-Turbo) would get HTTP 401 errors because the wrong API key was being used.
Fix: Changed both places where the LLM provider's
apiKeyis set to useHICLAW_LLM_API_KEYfirst, withHICLAW_MANAGER_GATEWAY_KEYas a fallback:Issue #320: Fix Windows path format in HOST_ORIGINAL_HOME
Problem: On Windows hosts, the
HOST_ORIGINAL_HOMEenvironment variable contains Windows path format likeD:\Users\xxx. Linux containers cannot use Windows paths directly when creating symlinks, causing failures like:Fix: Added Windows path detection and conversion before symlink creation:
C:\,D:\, etc.)D:\Users\xxx→/d/Users/xxxTesting
Both fixes have been validated:
Files Changed
manager/scripts/init/start-manager-agent.sh: +20 lines, -2 linesCo-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com