Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: move model configuration into a JSON file#1650

Merged
tusharmath merged 6 commits into
mainfrom
model-config
Oct 4, 2025
Merged

refactor: move model configuration into a JSON file#1650
tusharmath merged 6 commits into
mainfrom
model-config

Conversation

@tusharmath

Copy link
Copy Markdown
Collaborator
  • feat: refactor provider handling and add provider configuration from JSON
  • fix: standardize provider IDs to lowercase in models.json and update enum serialization

@tusharmath tusharmath changed the title model config refactor: move model configuration into a JSON file Oct 4, 2025
@github-actions github-actions Bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Oct 4, 2025
id: ProviderId::ZaiCoding,
response: ProviderResponse::OpenAI,
url: Url::parse(Self::OPEN_ROUTER_URL).unwrap(),
url: Url::parse("https://api.z.ai/api/coding/v1/").unwrap(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's an inconsistency in the URL paths for the ZAI Coding provider. In the test helper method, the URL is set to https://api.z.ai/api/coding/v1/, but in the models.json configuration file, it's defined as https://api.z.ai/api/coding/paas/v4/.

These URLs should be aligned to ensure consistent behavior between tests and production code. Consider updating one of these values to match the other to prevent potential connection issues.

Suggested change
url: Url::parse("https://api.z.ai/api/coding/v1/").unwrap(),
url: Url::parse("https://api.z.ai/api/coding/paas/v4/").unwrap(),

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@tusharmath tusharmath merged commit 0c3ad64 into main Oct 4, 2025
10 checks passed
@tusharmath tusharmath deleted the model-config branch October 4, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant