Skip to content

Fix #1000: [Bug] v0.3.10 版本 openai 接口 prompt 设置失效 - #3338

Open
victorwon2001 wants to merge 1 commit into
xinnan-tech:mainfrom
victorwon2001:fix/issue-1000
Open

Fix #1000: [Bug] v0.3.10 版本 openai 接口 prompt 设置失效#3338
victorwon2001 wants to merge 1 commit into
xinnan-tech:mainfrom
victorwon2001:fix/issue-1000

Conversation

@victorwon2001

@victorwon2001 victorwon2001 commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #1000

Implementation summary

Added a per-model OpenAI function-call opt-out that omits tools, preserves persona prompts, and falls back to nointent without tool handlers or few-shot messages. Added config documentation, idempotent manager migration, and focused tests.

Changes

.../main/resources/db/changelog/202608311000.sql   |  15 ++
 .../db/changelog/db.changelog-master.yaml          |   7 +
 main/xiaozhi-server/config.yaml                    |   2 +
 main/xiaozhi-server/core/connection.py             |   9 ++
 .../core/providers/llm/openai/openai.py            |  18 +++
 .../tests/test_connection_function_call.py         | 156 +++++++++++++++++++++
 main/xiaozhi-server/tests/test_openai_provider.py  | 141 +++++++++++++++++++
 7 files changed, 348 insertions(+)

Testing

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_openai_provider tests.test_connection_function_call -v — passed, 5 tests
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p 'test_*.py' -v — passed, 5 tests
  • AST/YAML/SQL validation script — passed
  • git diff --check — passed
  • mvn test -q in main/manager-api — blocked before tests because maven.aliyun.com was unavailable

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.

[Bug] v0.3.10 版本 openai 接口 prompt 设置失效

1 participant