delegacao-openai-compat

Delegates bulk LLM work to OpenAI-compatible endpoints via shell scripts with egress checks and key-safe configuration.

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/psiagoleal/ai-coding-agent-profiles --skill delegacao-openai-compat-psiagoleal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: delegacao-openai-compat
Source: https://github.com/psiagoleal/ai-coding-agent-profiles/tree/main/skills/delegacao-openai-compat
Command: npx skills add https://github.com/psiagoleal/ai-coding-agent-profiles --skill delegacao-openai-compat-psiagoleal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, and includes scripts (resource) components.

What problem does it solve? Delegating high-volume LLM tasks (diff reviews, log summarization, batch extraction) to a cheaper OpenAI-compatible endpoint saves subscription quota, but doing it safely is hard: API keys leak into command lines, reasoning models silently burn the token budget, and endpoints may forward data to public clouds. This Skill provides the scripts, configuration templates, and verification discipline to delegate work without exposing secrets or trusting unverified output. ## Core Features & Use Cases - Direct chat calls via oa-chat: A Bash script that calls any OpenAI-compatible endpoint (LiteLLM, vLLM, Ollama /v1, LM Studio, OpenRouter) with the API key kept out of argv, token usage reported on stderr, and distinct exit codes for empty or truncated responses. - Agent-mode delegation via agentry: A mergeable settings snippet defining a delegada task-class with an explicit egressClass, plus a wrapper script that resolves the API key from environment, vault command, or file without ever printing it. - Reasoning-model cost control: The --no-think flag disables chain-of-thought on vLLM/SGLang servers, avoiding empty responses caused by finish_reason=length. - Use Case: Pipe a staged git diff into oa-chat with a reviewer system prompt, redirect the full response to a file, and read only a sampled excerpt into the session context. ## Quick Start Ask the agent to delegate the review of the current staged diff to the LiteLLM gateway using the oa-chat script and save the response to a file.

Frequently Asked Questions about delegacao-openai-compat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call an OpenAI-compatible API endpoint from a shell script?

Use the oa-chat script with a prompt argument, file, or stdin, setting OPENAI_COMPAT_BASE_URL and a model via -m or OPENAI_COMPAT_MODEL. It posts to /v1/chat/completions, prints only the response content to stdout, and reports token usage on stderr.

How do I keep an API key out of the command line when calling an LLM gateway?

Resolve the key from the environment, a vault command like op read, or a file using OPENAI_COMPAT_KEY_CMD or OPENAI_COMPAT_KEY_FILE. The scripts pass the Authorization header through a curl config read from stdin, so the key never appears in argv or ps output.

Why does a reasoning model return an empty response with finish_reason length?

Reasoning models consume max_tokens thinking before answering, so a short budget yields empty content with finish_reason=length. The oa-chat script exits with code 3 in this case; retry with a higher --max-tokens or use --no-think to disable reasoning on vLLM/SGLang servers.

Does this work with Ollama, LM Studio, and OpenRouter?

Yes, any server speaking the OpenAI chat completions protocol works, including LiteLLM, vLLM, SGLang, Ollama on /v1, LM Studio, and OpenRouter. Features beyond the core protocol, such as JSON mode or reasoning controls, vary by server and must be verified.

When should I not delegate a task to an external LLM endpoint?

Do not delegate architecture decisions, tasks cheaper to do than to verify, or NDA-covered material to endpoints without a declared egress class. An endpoint on your network may still forward data to a public cloud, so confirm routing and retention opt-out first.