debug: add logging for inputSchema structure inspection
This commit is contained in:
parent
c1e8e55409
commit
956f9fdbae
3 changed files with 12 additions and 2 deletions
2
apps/playground/next-env.d.ts
vendored
2
apps/playground/next-env.d.ts
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
|
|
|||
|
|
@ -78,6 +78,16 @@ async function loadAndDescribe(req: Request): Promise<Response> {
|
|||
// Extract tool definition
|
||||
// AI SDK v6 tools use jsonSchema() which wraps a plain JSON Schema object
|
||||
// Extract the raw JSON Schema from toolModule.inputSchema.schema
|
||||
|
||||
// Debug: Log the inputSchema structure
|
||||
console.log(`🔍 InputSchema structure for ${cacheKey}:`, {
|
||||
hasInputSchema: !!toolModule.inputSchema,
|
||||
inputSchemaType: typeof toolModule.inputSchema,
|
||||
hasSchema: !!toolModule.inputSchema?.schema,
|
||||
hasParameters: !!toolModule.inputSchema?.parameters,
|
||||
keys: toolModule.inputSchema ? Object.keys(toolModule.inputSchema) : [],
|
||||
});
|
||||
|
||||
const rawJsonSchema = toolModule.inputSchema?.schema ?? null;
|
||||
|
||||
return Response.json({
|
||||
|
|
|
|||
2
apps/web/next-env.d.ts
vendored
2
apps/web/next-env.d.ts
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue