I encountered an error while working on function calling,
- When using agentica.conversate, I'm observing varying behaviors between different models, particularly regarding the presence and impact of Invalid ChatCompletionChunk validation errors. These errors, which appear to be related to schema validation (possibly from Typia validation, I've already sent a pull request to the
openai-node repository pull/1525, are logged to the console before AI responses. The model behaviors can be categorized into three main types based on how these errors manifest and affect the AI's response:
Agentica version
System enviroment
- OS: macOS 15.5
- CPU: (8) arm64 Apple M1
- Memory: 304.56 MB / 16.00
- Node: 23.6.1 - /opt/homebrew/bin/node
Category 1: Expected Behavior (No Validation Errors)
- These models perform as intended, providing the correct AI response without any
Invalid ChatCompletionChunk validation errors appearing in the console.
gpt-3.5-turbo-1106
gpt-4-turbo
gpt-4-turbo-2024-04-09
- All
gpt-4o series models (excluding audio and search variants)
Category 2: Validation Errors Before Successful Response
- For these models, I observe a lot of
Invalid ChatCompletionChunk validation error being logged to the console before the intended AI response is eventually received. The error message is:
Invalid ChatCompletionChunk [
{
path: '$input.system_fingerprint',
expected: '(string | undefined)',
value: null
}
]
gpt-3.5-turbo-16k
gpt-3.5-turbo-0125
gpt-4
gpt-4-0125-preview
gpt-3.5-turbo
gpt-4-1106-preview
gpt-4-turbo-preview
Category 3: Persistent Validation Errors with No Intended Response
- This category represents the most problematic behavior. When calling
agentica.conversate with these models, the console is flooded with Invalid ChatCompletionChunk validation errors, and crucially, the AI never returns the intended response. The errors appear to loop indefinitely.
Category 4: Deprecated Models
I looked for Deprecated models just in case..
- These models consistently result in a
NotFoundError indicating that the model has been deprecated. This is expected behavior for models no longer supported by OpenAI's API. The error message includes a link to OpenAI's deprecation documentation for more details.
NotFoundError: 404 The model [model names] has been deprecated, learn more here: https://platform.openai.com/docs/deprecations
at Function.generate (/node_modules/openai/src/error.ts:84:14)
at OpenAI.makeStatusError (/node_modules/openai/src/core.ts:462:21)
at OpenAI.makeRequest (/node_modules/openai/src/core.ts:526:24)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
status: 404,
headers: {
'alt-svc': 'h3=":443"; ma=86400',
'cf-cache-status': 'DYNAMIC',
'cf-ray': '94cfa3b73df9aa87-ICN',
connection: 'keep-alive',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=utf-8',
date: 'Mon, 09 Jun 2025 09:35:33 GMT',
server: 'cloudflare',
'set-cookie': '__cf_bm=qAAYMYpPgbPBTrhQwi__Aoj14tfMKBHkMQ4ja_14LzQ-1749461733-1.0.1.1-pCsO_QFp0mbwqZk3aquWuSR9VG7q2tuIb5QUE_2qahFrQ_75o7xSZcIWIuL8GCv6YTYJyoEFCDUSmeUZMa8ZjsJsT4alsZM5YXaySCARFgo; path=/; expires=Mon, 09-Jun-25 10:05:33 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=hL.pjc5j.PQW1go_mhGSNlN58VRhfC5M3Ix9yFo7NV0-1749461733170-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None',
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
'transfer-encoding': 'chunked',
vary: 'Origin',
'x-content-type-options': 'nosniff',
'x-request-id': 'req_1bcc97b8f741dfab458c179e062dc197'
},
request_id: 'req_1bcc97b8f741dfab458c179e062dc197',
error: {
message: 'The model `gpt-3.5-turbo-0301` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations',
type: 'invalid_request_error',
param: null,
code: 'model_not_found'
},
code: 'model_not_found',
param: null,
type: 'invalid_request_error'
}
gpt-3.5-turbo-0301
gpt-3.5-turbo-16k-0613
gpt-4-0314
gpt-3.5-turbo-0613
gpt-4-32k
gpt-4-32k-0314
gpt-4-32k-0613
gpt-4-vision-preview
I encountered an error while working on function calling,
openai-noderepository pull/1525, are logged to the console before AI responses. The model behaviors can be categorized into three main types based on how these errors manifest and affect the AI's response:Agentica version
System enviroment
Category 1: Expected Behavior (No Validation Errors)
Invalid ChatCompletionChunkvalidation errors appearing in the console.gpt-3.5-turbo-1106gpt-4-turbogpt-4-turbo-2024-04-09gpt-4oseries models (excluding audio and search variants)Category 2: Validation Errors Before Successful Response
Invalid ChatCompletionChunkvalidation error being logged to the console before the intended AI response is eventually received. The error message is:Invalid ChatCompletionChunk [ { path: '$input.system_fingerprint', expected: '(string | undefined)', value: null } ]gpt-3.5-turbo-16kgpt-3.5-turbo-0125gpt-4gpt-4-0125-previewgpt-3.5-turbogpt-4-1106-previewgpt-4-turbo-previewCategory 3: Persistent Validation Errors with No Intended Response
agentica.conversatewith these models, the console is flooded withInvalid ChatCompletionChunkvalidation errors, and crucially, the AI never returns the intended response. The errors appear to loop indefinitely.gpt-4-0613Category 4: Deprecated Models
NotFoundErrorindicating that the model has been deprecated. This is expected behavior for models no longer supported by OpenAI's API. The error message includes a link to OpenAI's deprecation documentation for more details.NotFoundError: 404 The model [model names] has been deprecated, learn more here: https://platform.openai.com/docs/deprecations at Function.generate (/node_modules/openai/src/error.ts:84:14) at OpenAI.makeStatusError (/node_modules/openai/src/core.ts:462:21) at OpenAI.makeRequest (/node_modules/openai/src/core.ts:526:24) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { status: 404, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '94cfa3b73df9aa87-ICN', connection: 'keep-alive', 'content-encoding': 'gzip', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 09 Jun 2025 09:35:33 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=qAAYMYpPgbPBTrhQwi__Aoj14tfMKBHkMQ4ja_14LzQ-1749461733-1.0.1.1-pCsO_QFp0mbwqZk3aquWuSR9VG7q2tuIb5QUE_2qahFrQ_75o7xSZcIWIuL8GCv6YTYJyoEFCDUSmeUZMa8ZjsJsT4alsZM5YXaySCARFgo; path=/; expires=Mon, 09-Jun-25 10:05:33 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=hL.pjc5j.PQW1go_mhGSNlN58VRhfC5M3Ix9yFo7NV0-1749461733170-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'transfer-encoding': 'chunked', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_1bcc97b8f741dfab458c179e062dc197' }, request_id: 'req_1bcc97b8f741dfab458c179e062dc197', error: { message: 'The model `gpt-3.5-turbo-0301` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations', type: 'invalid_request_error', param: null, code: 'model_not_found' }, code: 'model_not_found', param: null, type: 'invalid_request_error' }gpt-3.5-turbo-0301gpt-3.5-turbo-16k-0613gpt-4-0314gpt-3.5-turbo-0613gpt-4-32kgpt-4-32k-0314gpt-4-32k-0613gpt-4-vision-preview