Skip to content

plugin-ai-agents: only ensure the call to knowledge for gpt-4 models#3204

Open
Iru89 wants to merge 2 commits intomasterfrom
only-call-knowledge-with-old-models
Open

plugin-ai-agents: only ensure the call to knowledge for gpt-4 models#3204
Iru89 wants to merge 2 commits intomasterfrom
only-call-knowledge-with-old-models

Conversation

@Iru89
Copy link
Copy Markdown
Contributor

@Iru89 Iru89 commented Apr 28, 2026

Description

Update AI agent tool choice logic. Only ensure the call to knowledge for GPT-4 models

  • Removed dependency on OPENAI_PROVIDER and replaced it with a check for 'gpt-4' in the model name for tool choice selection.
  • Cleaned up imports by removing unused OPENAI_PROVIDER constant.

Testing

  • update tests to check that not call knowledge with gpt-5-mini

@Iru89 Iru89 requested a review from vanbasten17 April 28, 2026 15:31
@Iru89 Iru89 self-assigned this Apr 28, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Iru89 Iru89 changed the title refactor: only ensure the call to knowledge for gpt-4 models plugin-ai-agents: only ensure the call to knowledge for gpt-4 models Apr 29, 2026

const hasRetrieveKnowledge = this.agent.tools.includes(retrieveKnowledge)
if (hasRetrieveKnowledge && OPENAI_PROVIDER === 'azure') {
if (hasRetrieveKnowledge && this.llmConfig.modelName.includes('gpt-4')) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would use a const for it like GPT_4_FAMILY = 'gpt-4'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants