Skip to content

🐛 fix agents API compatibility with openAI#67

Open
a-tokyo wants to merge 1 commit intode-id:mainfrom
a-tokyo:patch-1
Open

🐛 fix agents API compatibility with openAI#67
a-tokyo wants to merge 1 commit intode-id:mainfrom
a-tokyo:patch-1

Conversation

@a-tokyo
Copy link

@a-tokyo a-tokyo commented Jul 10, 2025

Fix: Update GPT model to resolve API validation error

Problem

The D-ID Agents API was returning a validation error when creating new agents:

{
    "kind": "ValidationError", 
    "description": "validation failed",
    "details": {
        "payload.llm": {
            "message": "Could not match the union against any of the items. Issues: [{\"payload.llm.model\":{\"message\":\"should be one of the following; ['gpt-35-turbo','gpt-4o-global','gpt-4o-mini']\",\"value\":\"gpt-3.5-turbo-1106\"}}]"
        }
    }
}

Root Cause

The code was using the deprecated GPT model gpt-3.5-turbo-1106, which is no longer supported by the D-ID API. The API now only accepts:

  • gpt-35-turbo
  • gpt-4o-global
  • gpt-4o-mini

Solution

Updated the LLM configuration in the agentsAPIworkflow() function to use gpt-4o-mini instead of the deprecated model.

Changes

  • File: agents-client-api.js
  • Line: 472
  • Change: model: 'gpt-3.5-turbo-1106'model: 'gpt-4o-mini'

Testing

  • ✅ Agent creation now works without validation errors
  • ✅ Existing functionality remains unchanged
  • ✅ No breaking changes to API

Impact

This fix resolves the "Create new Agent with Knowledge" functionality that was previously failing due to the outdated model configuration.

closes #68

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.

🐛 Agent Creation Fails with GPT Model Validation Error

1 participant