Skip to content

Tinkerflow-AI

GitHub App

Tinkerflow-AI

GitHub App

🧱 Tinkerflow‑AI β€” App Authority Wall

tinkerflow.identity.agent
tinkerflow.identity.versioned
tinkerflow.identity.hexcore

tinkerflow.autonomy.plan
tinkerflow.autonomy.observe
tinkerflow.autonomy.evaluate
tinkerflow.autonomy.selftune

tinkerflow.workflow.orchestrator
tinkerflow.workflow.actions
tinkerflow.workflow.integrations
tinkerflow.workflow.daemon

tinkerflow.pysci.compute
tinkerflow.pysci.metrics
tinkerflow.pysci.modeling

tinkerflow.docs.gradeA
tinkerflow.repo.structured
tinkerflow.repo.auditready

tinkerflow.security.sandboxed
tinkerflow.security.integrity
tinkerflow.security.secrets


πŸ›‘οΈ GitDigital Badge Authority β€” Governing Authority Wall

gda.authority.master
gda.authority.badge
gda.authority.registry
gda.authority.rules

gda.governance.schema
gda.governance.versioning
gda.governance.triggers
gda.governance.audit

gda.security.signature
gda.security.qr
gda.security.webhook

gda.ecosystem.githubapp
gda.ecosystem.solana
gda.ecosystem.registry

πŸ”– Authority Badges

🧱 Tinkerflow‑AI β€” App Authority

tinkerflow.identity.agent
tinkerflow.autonomy.plan
tinkerflow.workflow.orchestrator
tinkerflow.pysci.compute
tinkerflow.repo.auditready
tinkerflow.security.integrity

πŸ›‘οΈ Governing Authority β€” GitDigital Badge Authority

gda.authority.badge
gda.governance.schema
gda.security.signature
gda.ecosystem.githubapp

Tinkerflow-AI

Tinkerflow AI Gateway

A unified, secure, and scalable proxy for multiple AI providers

Tinkerflow AI Gateway sits between your applications and AI services like OpenAI and Ollama, providing a single API endpoint with built-in authentication, rate limiting, metrics, and flexible model routing. It's designed for developers who want to manage multiple AI backends without changing their code.


πŸš€ Why Tinkerflow?

Β· Unified API – Use the same OpenAI-compatible interface for all providers.
Β· Production‑ready – Redis‑backed rate limiting, Prometheus metrics, and comprehensive tests.
Β· Extensible – Easily add new providers (Anthropic, Cohere, etc.) via simple modules.
Β· Self‑hosted – Full control over your data and costs.


✨ Features

Feature Description
πŸ”‘ API Key Authentication Simple shared‑secret security with header or query parameter support.
⏱️ Rate Limiting Sliding window rate limiting per key (in‑memory for dev, Redis for production).
πŸ€– Multi‑Provider Route requests to OpenAI, Ollama, or custom backends.
🧠 Model Mapping YAML configuration to map model names to providers (e.g., gpt‑4 β†’ openai).
πŸ”„ Streaming Full support for Server‑Sent Events (SSE) – compatible with OpenAI's streaming API.
πŸ“Š Metrics Prometheus metrics for requests, latencies, and errors.
🐍 Python Client Drop‑in replacement for the OpenAI Python library.
πŸ§ͺ Tested 90%+ test coverage with GitHub Actions CI.


πŸ“¦ Quick Start (2 minutes)

# Clone and enter
git clone https://github.com/RickCreator87/Tinkerflow-AI.git
cd Tinkerflow-AI

# Install dependencies
pip install -r requirements.txt

# Configure (copy and edit .env)
cp .env.example .env
# Edit with your OpenAI API key and gateway secret

# Run Redis (if not already)
docker run -d -p 6379:6379 redis

# Start the gateway
uvicorn gateway.main:app --reload

The gateway is now live at http://localhost:8000. Test it:

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Authorization: Bearer your-gateway-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello!"}]}'

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Client  β”‚ ──►  β”‚ Tinkerflow Gateway    β”‚ ──►  β”‚ OpenAI       β”‚
β”‚ (your   β”‚      β”‚ - Auth                 β”‚      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  app)   β”‚      β”‚ - Rate limiting        β”‚ ──►  β”‚ Ollama       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ - Model routing        β”‚      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                 β”‚ - Metrics               β”‚ ──►  β”‚ (other)      β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚ Redis    β”‚
                         β”‚ (rate    β”‚
                         β”‚  limits) β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Β· All requests hit the gateway first.
Β· The gateway authenticates, rate‑limits, and routes based on model field.
Β· Responses (including streaming) are proxied transparently.
Β· Metrics are exposed for Prometheus.


πŸ“š Documentation

All documentation is in the repository:

Β· Installation & Setup
Β· Configuration Reference
Β· Usage Examples
Β· Model Management
Β· Security Notes
Β· Troubleshooting
Β· Roadmap


🧩 Use Cases

Β· Centralized AI access for multiple microservices.
Β· Cost control – enforce rate limits per team or project.
Β· Local development – use Ollama locally, switch to OpenAI in production.
Β· Vendor‑agnostic – change providers without rewriting code.


🀝 Contributing

Contributions are welcome! Check the Roadmap for ideas or open an issue.


πŸ“„ License

MIT Β© RickCreator87


Built with ❀️ using FastAPI, Redis, and a lot of coffee.

Developer

Tinkerflow-AI is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

Report abuse