Originally created by: SAMAD101
This is the foundation issue for orko-providers: the OpenAI-compatible engine plus the openai preset. Every OpenAI-compatible provider (#4 google, [#5] deepseek, and later groq/together/openrouter/ollama/moonshot/qwen/vllm/llamacpp) is a thin preset over this engine, so the design here matters most.
// TODO block in crates/orko-providers/src/lib.rs)Codec / transport split:
orko_core::CompletionRequestorko_core::CompletionChunk (eventsource-stream for framing)orko_core::Content parts to the OpenAI wire shape: text-only messages stay plain strings (wire shape preserved); multi-part content becomes the array form with nested image_url; base64 media renders as data: URLstransport-tokio feature (default on). Connection driven with select!, no spawn.orko_core::Provider itself — implement it with any HTTP client and the rest of orko works untouched. Document both hatches in the crate README.https://api.openai.com/v1 (configurable), endpoint POST /chat/completionsAuthorization: Bearer $OPENAI_API_KEY (conventional env key)"stream": true, SSE data: lines terminated by data: [DONE]; request usage via "stream_options": {"include_usage": true}orko_core::ToolCallDelta (group by index, concatenate arguments)finish_reason → orko_core::FinishReason, usage → orko_core::Usageopenai(model) constructor returning the engine configured with the base URL and env keyfrom_str("openai:gpt-4o-mini") → Result<_, orko_core::Error>orko-core only--no-default-features must build clean (codec only, no transport)cargo clippy --all-targets --all-features -D warnings cleanexamples/hello_agent.rs works against this preset (offline stub when OPENAI_API_KEY unset is acceptable)
Tickets: #10
Tickets: #11
Tickets: #12
Tickets: #13
Tickets: #14
Tickets: #15
Tickets: #16
Tickets: #17
Tickets: #18
Tickets: #19
Tickets: #20
Tickets: #21
Tickets: #22
Tickets: #23
Tickets: #25
Tickets: #26
Tickets: #4
Tickets: #5
Tickets: #6
Tickets: #7
Tickets: #8
Tickets: #9
Originally posted by: MayurK-cmd
Hey can i work on this one?
Ticket changed by: SAMAD101