-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(cli): add JSONL output for provider list #3780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ both `--adapter` and `--base-url`. | |||||||||
|
|
||||||||||
| | Subcommand | Supported flags | Action | | ||||||||||
| | --- | --- | --- | | ||||||||||
| | `list` | `--json` | List configured providers and the remaining registry entries. | | ||||||||||
| | `list` | `--json`, `--jsonl` | List configured providers and the remaining registry entries; `--jsonl` emits one configured provider object per line. | | ||||||||||
| | `add <name>` | `--adapter <adapter>`, `--base-url <url>`, `--api-key <key>`, `--default-model <model>`, `--set-default`, `--force`, `--json`, `--sync` | Add a registry/custom provider. `--force` overwrites; `--sync` refreshes a running proxy in human-output mode. | | ||||||||||
| | `edit <name>` | provider field flags, `--headers <json>`, `--json` | Edit validated live provider fields without replacing key pools. `--headers` merges custom request headers; pass `{}` or `-` to clear them. | | ||||||||||
| | `test <name>` | `--json` | Probe the real upstream model endpoint. | | ||||||||||
|
|
@@ -29,6 +29,7 @@ both `--adapter` and `--base-url`. | |||||||||
|
|
||||||||||
| ```bash | ||||||||||
| ocx provider list --json | ||||||||||
| ocx provider list --jsonl # one configured provider object per line | ||||||||||
| ocx provider test ark | ||||||||||
| ocx provider add anthropic --api-key sk-ant-... --set-default --sync | ||||||||||
| ocx provider add local-dev --adapter openai-chat --base-url http://localhost:11434/v1 | ||||||||||
|
|
@@ -37,6 +38,10 @@ ocx models --provider anthropic --json | |||||||||
| ocx models live --provider ark --json | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| `--jsonl` writes only configured providers, one JSON object per line, and omits the | ||||||||||
| `registryCount` summary from `--json`. Use it for line-oriented scripts that should not | ||||||||||
| buffer the whole provider list. | ||||||||||
|
Comment on lines
+42
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Do not claim that
Suggested documentation fix-Use it for line-oriented scripts that should not
-buffer the whole provider list.
+Use it for line-oriented scripts that process one
+configured provider object per line.As per path instructions, public documentation must stay synchronized with actual CLI behavior. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||
|
|
||||||||||
| :::caution[Custom headers are not a credential channel] | ||||||||||
| `--headers` is for non-secret request metadata — routing hints, tenant or | ||||||||||
| project selectors, tracing ids. It is **not** a place to put authentication | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When users read any localized
reference/cli/providers-accounts.mdpage, thelistrow still advertises only--json, so the new--jsonlworkflow is absent from the French, Japanese, Korean, Russian, Turkish, Simplified Chinese, and Traditional Chinese documentation. Update those directly affected pages with the new flag and its line-oriented output semantics so they remain synchronized with this canonical English table.AGENTS.md reference: docs-site/AGENTS.md:L7-L10
Useful? React with 👍 / 👎.