Skip to content

fix(spreadsheetbench): route codegen calls to the configured target backend - #446

Merged
Yifan Yang (Yif-Yang) merged 2 commits into
microsoft:mainfrom
nniiovoo:fix/spreadsheetbench-codegen-target-backend
Nov 23, 2026
Merged

Yifan Yang (Yif-Yang) merged 2 commits into
microsoft:mainfrom
nniiovoo:fix/spreadsheetbench-codegen-target-backend

Conversation

@nniiovoo

Copy link
Copy Markdown

Fixes #445

The single and multi codegen modes built an Azure client up front and called it directly, whatever target_backend was set to. So an openai_compatible, claude_chat, minimax_chat or copilot_chat target failed with "Azure OpenAI endpoint is not configured". If an Azure endpoint was also set, the call went to Azure instead.

What changes:

  • _chat_call now sends every target other than openai_chat through chat_target_messages, as ReAct mode already does.
  • The openai_chat path is unchanged. It still builds the Azure client, now lazily inside _chat_call instead of in run_single/run_multi, and its requests are the same as before.
  • qwen_chat: codegen used to reach vLLM through a raw OpenAI client with a fixed max_completion_tokens=16384. It now uses the qwen backend, so qwen_chat_max_tokens (default 8000), temperature and thinking mode apply, the same as in ReAct mode.

Tests:

  • New file: tests/test_spreadsheetbench_codegen_routing.py.
    • Single and multi mode with an openai_compatible target reach that client and never build an Azure client. Both tests fail on main.
    • An openai_chat target still goes through the Azure client.
  • Full suite on macOS: 2399 passed. The 2 failures in tests/test_sleep_adopt_skill_subset.py also fail on main: macOS temp dirs sit under /var → /private/var, so the error message differs.

ni (nniiovoo) and others added 2 commits November 22, 2026 23:42
…ackend

The single and multi codegen modes built an Azure client up front and
called it directly, whatever target_backend was set to. An
openai_compatible, claude_chat, minimax_chat or copilot_chat target
failed with "Azure OpenAI endpoint is not configured", or went to Azure
when an endpoint was also set, and qwen_chat skipped its qwen_chat_*
settings.

_chat_call now sends every target other than openai_chat through
chat_target_messages, as ReAct mode does. The openai_chat path is
unchanged and builds its Azure client lazily.

Fixes microsoft#445

Signed-off-by: NNIIOVO <haimingni44@gmail.com>
Keep both CHANGELOG entries; no other change.
@Yif-Yang
Yifan Yang (Yif-Yang) merged commit 8167ff7 into microsoft:main Nov 23, 2026
1 check passed
@Yif-Yang

Copy link
Copy Markdown
Contributor

Merged, thank you. SpreadsheetBench single and multi codegen now send every target except openai_chat through the shared router, as ReAct mode does, so openai_compatible, claude_chat, minimax_chat and copilot_chat targets work instead of failing with "Azure OpenAI endpoint is not configured". The openai_chat path is unchanged. Note for readers: qwen_chat codegen now honours the qwen_chat_* settings (max tokens defaults to 8000 instead of the previous hard-coded 16384, plus temperature and thinking mode), so qwen_chat SpreadsheetBench results from before this change may not match exactly. On main, the new tests fail (2 failures) and pass here. Closes #445. Your branch and an earlier PR in this batch each added an entry at the same place in CHANGELOG.md, so I pushed one maintainer merge commit to your branch that keeps both entries and changes nothing else, then merged.

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.

spreadsheetbench: codegen modes ignore the target backend and always build an Azure client

2 participants