A reusable Codex skill and Swift provider kit for integrating multi-provider LLM support into iOS and macOS apps.
This repository packages one skill with a deployment-agnostic integration model:
- provider abstraction first
- direct or relay transport as a project choice
- reusable Swift templates for provider adapters and streaming support
SKILL.md: the skill definition and workflowagents/openai.yaml: UI metadata for skill discoveryassets/SwiftLLMProviderKit/: reusable Swift source templatesreferences/: abstraction model, provider matrix, playbook, validation checklistscripts/install_provider_kit.py: copy the Swift kit into a target appscripts/validate_repo.py: validate frontmatter and Swift template type-checking
This skill is aimed at Swift projects that need a reusable LLM integration layer for:
- OpenAI Responses and Chat Completions
- OpenAI-compatible providers
- Aliyun DashScope / Qwen variants
- Doubao Ark chat and responses flows
- Tencent Hunyuan compatible API and official signed API
- direct provider access or backend relay access
Clone this repository, then place it in your Codex skills directory.
A typical local setup looks like this:
git clone https://github.com/voderment/LLM-Integration.git ~/.codex/skills/swift-llm-provider-integrationIf you keep it elsewhere, copy or symlink the repository folder into your Codex skills directory.
Example prompt:
Use $swift-llm-provider-integration to add complete OpenAI and multi-provider LLM support to this Swift app.
python3 scripts/install_provider_kit.py --dest /absolute/path/to/YourApp/Core/LLMThis copies the reusable Swift files into your target project.
The repository uses one layered model:
- canonical provider and request abstractions
- provider adapters for protocol families
- transport abstraction for direct or relay deployment
- feature logic above both layers
Read references/abstraction-model.md first if you want the rationale.
Run repository validation locally:
python3 scripts/validate_repo.pyThis checks:
SKILL.mdfrontmatter- required top-level files and folders
- Swift template type-checking with
swiftc
Current curated model lists live in assets/SwiftLLMProviderKit/LLMProviderPresets.swift, with provider-side notes and official source links in references/provider-matrix.md.
For step-by-step installation and integration guidance, start from references/usage-guide.md.
.
├── SKILL.md
├── agents/
├── assets/
│ └── SwiftLLMProviderKit/
├── references/
├── scripts/
└── .github/workflows/
MIT. See LICENSE.