Framework agents call the OpenAI Responses API regardless of the configured model

Open
#482 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start by reproducing the failure with examples/agents/93_openai_runner_hello_world.py and CONDUCTOR_AGENT_LLM_MODEL=anthropic/claude-sonnet-4-6 while the server lacks OPENAI_API_KEY. Read the conductor.ai Runner/framework-agent path, then inspect the execution and workflow responses for Assistant_llm and reasonForIncompletion. Done means the example routes to the configured model or reports the missing dependency clearly and exits non-zero.

Written by the indexing model from the issue text.

Description

bug

In short: run one of the *_openai_runner_* examples with an Anthropic model against a server that has no OpenAI key, and it fails — because this code path always calls OpenAI, whatever model you configured. It then prints None and exits 0, so nothing notices.

Files: examples/agents/93_openai_runner_hello_world.py, 94_openai_runner_tools.py, 95_openai_runner_handoffs.py, 96_openai_runner_streaming.py (the conductor.ai Runner / framework-agent path)

Symptom

With no OPENAI_API_KEY in the server process's environment:

$ CONDUCTOR_AGENT_LLM_MODEL=anthropic/claude-sonnet-4-6 python examples/agents/93_openai_runner_hello_world.py
Framework agent 'Assistant' execution FAILED
None

Both 93 and 96 exit 0 despite failing, so exit-code-based tooling — including scripts/run_examples.sh — scores them green.

Cause

The framework-agent path calls the OpenAI Responses API regardless of the configured model. With an Anthropic model and no OpenAI key on the server, the Assistant_llm LLM_CHAT_COMPLETE task sends an empty key to OpenAI instead of routing to Anthropic:

Task execution failed: OpenAI Responses API call failed: Responses API failed with status 401:
{"error": {"message": "Incorrect API key provided: ''. You can find your API key at
https://platform.openai.com/account/api-keys.", "type": "invalid_request_error",
"param": null, "code": "invalid_api_key"}}

Read it back with:

curl -s localhost:8080/api/agent/executions?size=5
curl -s "localhost:8080/api/workflow/<executionId>?includeTasks=true"   # Assistant_llm -> reasonForIncompletion

Confirmed by changing only the server's environment, one server, everything else fixed:

Server env model result
no OPENAI_API_KEY anthropic/claude-sonnet-4-6 FAILED
no OPENAI_API_KEY anthropic/claude-opus-4-6 FAILED
OPENAI_API_KEY present anthropic/claude-sonnet-4-6 pass
OPENAI_API_KEY present anthropic/claude-opus-4-6 pass

Ruled out:

  • the client's environment — fails with the client key set, passes with it unset
  • langchain-anthropic being installed — passes with it uninstalled

Only the server's environment matters.

Fix

Either drop the OpenAI dependency when the target model is not OpenAI, or fail with a message naming the missing key. Silent failure with None and exit 0 is the worst outcome.

Verify

Start the server with no OPENAI_API_KEY, run 93 with an Anthropic model — it should either work or say why, and exit non-zero if it fails.

Note: These examples document CONDUCTOR_AGENT_LLM_MODEL=openai/gpt-4o (or anthropic/claude-opus-4-6), so a user following the Anthropic option with an Anthropic-only server hits this immediately.

Dominant language
Python
Stars
104
Forks
43
Avg merge
1d 13h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from conductor-oss/python-sdk

All issues in conductor-oss/python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.