Skip to content

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Nov 9, 2025

This pull request primarily updates the typia and @samchon/openapi dependencies from their previous development versions to the latest stable releases, and refactors the usage of LLM application creation in test files to use a new factory utility. The refactoring improves maintainability and consistency by centralizing model and application instantiation logic. Additionally, file naming conventions in test outputs are updated to reflect these changes.

Dependency upgrades:

  • Updated typia from 10.0.0-dev.20251107-4 to 10.0.1 and @samchon/openapi from 5.0.0-dev.20251107-3 to 5.0.0 across all relevant entries in pnpm-lock.yaml and test/package.json. This ensures the codebase uses the latest stable versions, improving reliability and compatibility. [1] [2] [3] [4] [5] [6]

Test code refactoring:

  • Replaced direct calls to typia.llm.application with the new LlmApplicationFactory.convert utility in all LLM function calling test files, standardizing how LLM applications are instantiated and improving code maintainability. [1] [2] [3] [4]

Test output consistency:

  • Updated file output paths and naming conventions in test files to use the LLM model string instead of the previous application model property, ensuring consistency with the new instantiation approach. [1] [2] [3]

These changes collectively modernize dependency management and streamline the test codebase for easier future updates and better clarity.

@samchon samchon requested a review from Copilot November 9, 2025 13:55
@samchon samchon self-assigned this Nov 9, 2025
@samchon samchon added the enhancement New feature or request label Nov 9, 2025
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedtypia@​10.0.0-dev.20251107-4 ⏵ 10.0.1100 +1100100 +196 +1100

View full report

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors test files to use a centralized LlmApplicationFactory utility instead of directly calling typia.llm.application(), and upgrades the typia package from a development version to stable version 10.0.1 and @samchon/openapi to version 5.0.0.

  • Introduced LlmApplicationFactory utility to standardize LLM application creation from JSON schema applications
  • Updated all test files to use the new factory pattern for consistent application instantiation
  • Upgraded dependencies from development versions to stable releases

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/src/utils/LlmApplicationFactory.ts New factory utility that converts JSON schema applications to LLM applications with validation support
test/src/features/llm/function_calling/validate_llm_function_calling_union.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_tags.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_sale.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_recursive.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_optional.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_example.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_default.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/features/llm/function_calling/validate_llm_function_calling_additionalProperties.ts Refactored to use LlmApplicationFactory and pass model string instead of full application
test/src/executable/sale.ts Updated to use LlmApplicationFactory and simplified vendor configuration array
test/package.json Updated typia from development version to stable 10.0.1
pnpm-lock.yaml Updated lock file entries for [email protected] and @samchon/[email protected]
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 52 to 53
if (parameters.success === false)
throw new Error("Failed to compose schema.");
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

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

These error messages are not descriptive enough. When schema composition fails, it's unclear whether it's the parameters or output schema that failed. Consider providing more context:

  • For line 53: throw new Error("Failed to compose parameters schema.");
  • For line 81: throw new Error("Failed to compose output schema.");

Additionally, consider including the actual error details from parameters.error or output.error to help with debugging.

Copilot uses AI. Check for mistakes.
ILlmSchema<Model>,
IOpenApiSchemaError
>;
if (output.success === false) throw new Error("Failed to compose schema.");
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

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

This error message is identical to the one at line 53, making it difficult to distinguish between parameter schema composition failures and output schema composition failures. Consider using a more specific message like: throw new Error("Failed to compose output schema.");

Additionally, consider including the actual error details from output.error to help with debugging.

Suggested change
if (output.success === false) throw new Error("Failed to compose schema.");
if (output.success === false) throw new Error(`Failed to compose output schema. Details: ${JSON.stringify(output.error)}`);

Copilot uses AI. Check for mistakes.
texts: await ShoppingSalePrompt.texts(),
handleParameters: async (parameters) => {
if (process.argv.includes("--file"))
fs.promises.writeFile(
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

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

Missing await keyword before fs.promises.writeFile(). This should be await fs.promises.writeFile(...) to ensure the file write completes before continuing, consistent with the pattern used in handleCompletion at line 72 and other test files.

Suggested change
fs.promises.writeFile(
await fs.promises.writeFile(

Copilot uses AI. Check for mistakes.
@samchon samchon merged commit 66c1554 into master Nov 9, 2025
3 of 4 checks passed
@samchon samchon deleted the feat/composer branch November 9, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants