Skip to content

Conversation

@kokatesaurabh
Copy link

This PR introduces validation logic for clientOptions in LLM configurations to ensure correctness and consistency across the codebase.

Key Changes

src/utils/llm.ts

Added validateClientOptions utility to validate LLM clientOptions against provider-specific rules.

src/run.ts

Integrated validateClientOptions into the Run class, ensuring all graphs are initialized with validated client options.

src/specs/llm.utils.test.ts (new file)

Added comprehensive unit tests for validateClientOptions covering valid and invalid client options.

Why this is needed

Prevents misconfiguration of LLM client options (e.g., unsupported params for a given provider).

Improves stability and developer experience by catching errors early.

Provides test coverage for future maintainability.

Testing

All new tests in src/specs/llm.utils.test.ts pass successfully.

Existing test suite continues to pass without regressions.

@kokatesaurabh kokatesaurabh changed the title src/specs/llm.utils.test.ts feat: add clientOptions validation for LLM configurations with tests Sep 22, 2025
@kokatesaurabh
Copy link
Author

hey @danny-avila can u review it! i would like to contribute

@kokatesaurabh
Copy link
Author

hello @danny-avila can u review it

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.

1 participant