Skip to content

test: add offline providers.json validation (closes #2) - #5

Open
Jah-yee wants to merge 1 commit into
xydadada:mainfrom
Jah-yee:fix/provider-presets-validation
Open

test: add offline providers.json validation (closes #2)#5
Jah-yee wants to merge 1 commit into
xydadada:mainfrom
Jah-yee:fix/provider-presets-validation

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Aug 15, 2026

Copy link
Copy Markdown

Summary

Adds an offline validation test suite () that checks without calling any provider APIs.

What is validated

Check Details
Unique IDs No duplicate provider ids
Required fields id, name, description, defaultModel are non-empty
HTTP(S) baseUrl Valid URL with http:// or https:// protocol
No embedded credentials No user/password in URL; no apiKey/token/secret in auth object
Supported protocol One of: openai-chat, gemini, anthropic
Supported auth type One of: bearer, x-api-key, api-key, x-goog-api-key, google-api-key, none, custom

Acceptance criteria (from issue #2)

  • ✅ Unique IDs
  • ✅ Supported protocols and auth types
  • ✅ Valid HTTP(S) base URLs
  • ✅ Required names/descriptions
  • ✅ Absence of embedded credentials
  • ✅ Does not call provider APIs

Test result

# tests 12
# pass 12
# fail 0

Run with: node --test tests/providers-validate.test.mjs

@Jah-yee

Jah-yee commented Aug 16, 2026

Copy link
Copy Markdown
Author

Friendly ping — checking in on the offline providers.json validation tests. Happy to address any feedback.

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