Skip to content

fix(vision): preserve ZAI credential resolution with custom base_url#16317

Closed
chenyunbo411 wants to merge 1 commit into
NousResearch:mainfrom
chenyunbo411:fix/16290-zai-vision-base-url
Closed

fix(vision): preserve ZAI credential resolution with custom base_url#16317
chenyunbo411 wants to merge 1 commit into
NousResearch:mainfrom
chenyunbo411:fix/16290-zai-vision-base-url

Conversation

@chenyunbo411

Copy link
Copy Markdown
Contributor

Summary

  • Fix resolve_vision_provider_client so a configured explicit provider (for example zai) is preserved when auxiliary.vision.base_url is set.
  • This keeps provider-specific credential pool lookup active (ZAI_API_KEY) instead of forcing the route to custom.
  • Add a regression test to cover provider=zai + custom base_url resolution behavior.

Test plan

  • Attempted to run: pytest -q -o addopts='' tests/agent/test_vision_resolved_args.py
  • Full local pass is blocked in this environment because the openai package is missing (ModuleNotFoundError: No module named 'openai').

Made with Cursor

Keep the configured vision provider when base_url is overridden so credential-pool lookup still resolves provider-specific API keys (e.g. ZAI_API_KEY), and add a regression test for this path.
@teknium1

teknium1 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Salvaged via #19726 onto current main - your commit authorship was preserved. Thanks!

@teknium1 teknium1 closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists provider/zai ZAI provider tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants