Skip to contents

foundryR 0.1.0

Initial CRAN release of foundryR, a tidy interface to Microsoft Azure AI Foundry.

New features

Improvements

  • foundry_groundedness() now supports the Content Safety correction feature via correction = TRUE with a bring-your-own Azure OpenAI deployment described by the new foundry_llm_resource(), returning a correction_text column, and surfaces per-segment ungrounded_reasons when reasoning = TRUE (roadmap 2026 H2).

  • as_foundry_schema() now converts ellmer::type_object() specifications to strict JSON Schema, so ellmer users can reuse existing type definitions in foundry_extract() and foundry_response() (roadmap 2026 H2).

  • foundry_agreement() now reports Krippendorff’s alpha alongside Cohen’s and Fleiss’ kappa, using when installed and a base-R nominal fallback otherwise (roadmap 2026 H2).

  • foundry_chat() now accepts reasoning_effort and returns reasoning_tokens and cached_input_tokens when chat-completions responses report those fields.

  • foundry_chat() now defaults to the /openai/v1/chat/completions endpoint while keeping api = "deployment" as a legacy escape hatch (roadmap 2026 H2).

  • foundry_embed() now uses the /openai/v1/embeddings array endpoint by default, returns row-level .error and .error_msg fields, and keeps api = "deployment" as a legacy escape hatch (roadmap 2026 H2).

  • foundry_extract() now accepts data frames with text_col, preserves original columns, runs requests in parallel, and returns parse or HTTP failures as .error rows instead of aborting the whole job (roadmap 2026 H2).

  • foundry_image() now uses the v1 preview image generation endpoint by default, supports newer image options such as output_format, output_compression, background, and moderation, and keeps the legacy deployment endpoint available with api = "deployment".

  • foundry_moderate() now supports Content Safety blocklists and keeps raw response payloads in list-columns (roadmap 2026 H2).

  • foundry_models() now calls the v1 model and deployment metadata endpoints instead of sending a dummy chat request.

  • foundry_response() now accepts background, conversation, prompt-cache, parallel-tool-call, max-tool-call, safety-identifier, and reasoning-summary controls from the v1 Responses API (roadmap 2026 H2).

  • foundry_response() accepts foundry_tool() objects in tools, strips local R function references from request bodies, and returns cached_input_tokens when the Responses API reports cached input tokens.

  • foundry_similarity() now computes all pairwise cosine similarities with a single vectorized matrix product, supports top_k, and can return a similarity matrix with as_matrix = TRUE (roadmap 2026 H2).

  • step_foundry_embed() now supports cache = "disk" with an optional cache_dir to persist embeddings across bakes, and builds embedding columns from a single matrix instead of a per-cell fill loop (roadmap 2026 H2).

  • foundry_transcribe(), foundry_translate_audio(), and foundry_speak() now accept api = "deployment" to reach OpenAI audio models through the /openai/deployments/{model}/... path, so a whisper transcription or translation deployment works alongside the default v1 data-plane path.

Documentation and package metadata

  • Documentation now positions foundryR around Azure AI Content Safety, Responses API workflows, strict extraction, embeddings, batch jobs, and research annotation workflows, with chat completions kept as a maintained convenience layer.
  • The README, vignettes, and website articles now show real Azure AI Foundry output. Each documentation page runs once against live resources with data-raw/record-doc-outputs.R, which captures every API response as a sanitized fixture; all later builds (R CMD check, pkgdown, CRAN, CI) replay those fixtures and render the real tibbles, images, and audio with no credentials and no network calls. When fixtures are absent the API chunks simply do not evaluate, so nothing is fabricated.
  • Added an onet2r integration as a website-only pkgdown article that pulls real occupation data from O*NET, embeds it with foundry_embed(), ranks occupations by semantic similarity, and summarizes the top match with foundry_chat(); the redactor now strips the O*NET X-API-Key header so its fixtures carry no secrets.
  • Media helpers are grouped as experimental media while the core research surface is documented separately.
  • Media documentation now uses one image and video generation vignette instead of separate overlapping image and media articles.
  • New vignettes compare foundryR with ellmer and show an end-to-end annotation workflow.
  • License metadata now uses a single MIT license file so GitHub reports one license.