← Back to PRs

#11833: 在openclaw onboard过程中,在model/auth provider选项中增加Huawei Cloud MAAS供应商的选择

by wukunming168 open 2026-02-08 12:01 View on GitHub →
docs cli commands agents stale size: M
###AI-assisted development During the openclaw onboard process for selecting Huawei as the model provider, we have implemented support for both static configuration and fetching the model list of Huawei Cloud MAAS service via API Key. We have completed local testing of the installation flow by running npx openclaw onboard. ✅ Fixed build-related issues identified by Greptile: Adjusted the position of the import statement in src/agents/models-config.providers.ts: moved the non-top-level import to the top level to comply with ESM/TS module compilation specifications; Unified the import module of ModelDefinitionConfig in src/agents/huawei-maas-models.ts to align with the rest of the code in the provider-config pipeline, resolving type checking/compilation issues; Local verification after fixes: The code compiles successfully, and both unit tests and the npx openclaw onboard installation flow tests execute normally. <img width="935" height="405" alt="image" src="https://github.com/user-attachments/assets/f7aedc7f-ad2a-45f7-8c0a-5b2d8446eac5" /> <img width="989" height="404" alt="image" src="https://github.com/user-attachments/assets/4ea06d42-300c-4d6d-bb61-6d6a24edc534" /> <img width="608" height="357" alt="image" src="https://github.com/user-attachments/assets/52fc1176-5538-45cd-8e81-d354b59c3f4b" /> <img width="486" height="316" alt="image" src="https://github.com/user-attachments/assets/164ab6d7-1750-444d-b66e-c31180d27e99" /> <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds Huawei Cloud ModelArts MAAS as a selectable auth/provider option in the onboarding flow (interactive and non-interactive), including: - A new Huawei MAAS model catalog + model-discovery via `/v2/models` - Wiring for `HUAWEI_MAAS_API_KEY` in auth choice handling and profiles - Provider config injection into generated `models.json` - Provider usage label/plumbing so it can appear in provider lists The main blocking issues are both build-time: `src/agents/models-config.providers.ts` now contains a non-top-level `import` which will fail to parse/compile, and `src/agents/huawei-maas-models.ts` imports `ModelDefinitionConfig` from a different module than the rest of the provider-config pipeline, which can break typechecking/compilation depending on exports. <h3>Confidence Score: 2/5</h3> - Not safe to merge until build-breaking syntax/type issues are fixed. - The PR introduces at least one definite syntax error (non-top-level import in an ESM/TS module), which will prevent compilation. There’s also a likely type import mismatch for `ModelDefinitionConfig` in the new Huawei MAAS models module that can break typechecking depending on exports. Once these are fixed, the remaining wiring looks consistent with existing provider patterns. - src/agents/models-config.providers.ts, src/agents/huawei-maas-models.ts <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs