Skip to main content
Option 1: Native integration (recommended):

Model Selection

Vision tool

Once qianfan_api_key is configured, Agent mode can auto-discover Qianfan for the Vision tool:
  • When the main model itself is multimodal (e.g. ernie-5.1, ernie-5.0, ernie-x1.1, ernie-4.5-turbo-vl), images are handled directly by the main model with no extra setup.
  • When the main model is text-only (e.g. ernie-4.5-turbo-128k), the Vision tool automatically falls back to ernie-4.5-turbo-vl.
To force a specific Vision model, set it explicitly in config.json:
Option 2: OpenAI-compatible configuration:
Prefer qianfan_api_key for new configurations. Existing wenxin, wenxin-4, baidu_wenxin_api_key, and baidu_wenxin_secret_key configurations remain supported.