Posts

AWS Bedrock configuring intelligent prompt router

Image
We want to use bedrock intelligent prompt routing because we can send prompts to different foundational models within a model family, helping you optimize for quality of responses and cost. To do that,  goto "Prompt routing model".  Depending on the region, we are limited to AWS Nova and Llama.  Provide a name for your prompt router and then select relevant models. These are the list of models that your requested gets routed to. In this scenario, we are routing to Llama.   We also need to select a default route model, that will handle all responses if it is unable to determine where to route prompts to.  Click "Submt" when ready You can test it out by, click on "Action" ->  Open in playground If you want to access from "playground", you can do the following. Goto Playground -> Select Router under Categories. Then select your newly created routers.   

AWS bedrock inference profile basic setup and test

Image
Inference profile allow us to define and enforce data residency when processing request. You can setup these profile here by selecting "Infer" -> Inference Profile.  Under the application tab, click on "Create inference profile".  Next filled up your inference details and click "Create application inference profile". Please note that your model is limited to the region. To add more destination region, you need to use the API. And to use it, we can goto "Test" -> Playground and then "select model". Then please proceed to select your model and then click on "Inference" where you can choose your inference profiles. And that's how you can create and use your inference profile. 

Azure defender for contianer - enabling it

Image
We can enable Azure Defender for container by going to Microsoft Defender -> Environment Settings -> And then we will see the following screen. Here we can enable different feature by toggling button on or off.

Azure SAML App registration

Image
We can easily configure SAML app in Azure. Goto Enterprise Application ->  New Application. Then select "Create your own appllication". Provide a name and select "".  Click "create". After that you will be directed to the new app. Goto "Single sign on" and click on SAML.  And then click on "Edit" Provide the Identifer (a unique id) for your application.   Reply Url is the endpoint Entra will send the token to upon successful login.  Click on "Save".  You will be prompted to test this application. Click "Yes" to test the application.  So you will go through the standard process of signing into Entra - then you can see you will be redirected to http://lolcalhost:4000 with a SAML response. The SAML reponse is the token issued and you can validate that by using powerhell:- [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("YOUR_BASE64_STRING")) Next step, is to expose your REPLY URL ...

aws service control policies in organization - preventing user from creating s3 bucket in a region

Image
  For those coming from Azure, Aws account is a subscription. So in this walk-through we are going to create another new account called   with number xxxxxxxx . You would have another account which is the management account  ( yyyyyyyyyy ). SCP does not applies to the management yyyyyyyy account. Assuming you already have this AWS created and a user called "mark" who is tied to xxxxxx account.  Please note: The user from yyyyyy account are exempted To create your AWS service control policies, goto AWS Organization and then -> Policies -> Service Control Policies (please make sure you enable it)  Next, click on "Create policy" and add the following in the policy and click "create". { "Version": "2012-10-17", "Statement": [ { "Sid": "PreventS3CreationInApSoutheast1", "Effect": "Deny", "Action": [ "s3:CreateBucket" ], ...

affaan - everything claude code install opencode

Image
  Think everyone is execited about affaan's everything claude code. Let's setup this for opencode.  Please make sure you have nodejs installed. Then run the following command to get you setup  git clone https://github.com/affaan-m/ECC.git cd ECC npm install npm run build:opencode node scripts/ecc.js install --profile minimal --target opencode Next we will run opencode from command line, and you should be able to access your ecc here To start using follow this guide here https://github.com/affaan-m/ecc#start-using-ecc Some notes If you try to configure --profile to anything other than minimal, you will hit an issue and those instruction templates will not be installed. 

empero-ai/Qwen3.8-2B-Distill-GGUF Q4_K_M

Image
This is a good model and really fast too. Using the smaller size Q4_K_M and found out that it this version does not know how to call tool compare to its larger version empero-ai/Qwen3.8-4B-Distill-GGUF Switching to the Q_8 version aint any better. It still does not know how to call tools - the context given is way larger about 32k.  Then switching BF16 gives a context of 26.9k which is good but still unable to make any tool calling

ornith-ai/Ornith-1.0-9B-GGUF

Image
Loving this model, it is really good and able to do coding, perform web search and use edit tool to generate the necessary code. For example, if you ask it to write a hello world app in android, all these file are generated.  Really happy with it - it is fast and really usable. It does have a context of 11.5k for me which hopefully I can crank it up. 

unsloth studio - the output path or generated path when you enable code tool

The default path for unsloth studio path unsloth\studio\sandbox . For my case that will be :-  C:\Users\nzai\.unsloth\studio\sandbox\__LOCALID_ZQvj3Mq\android-app 

terraform tomap() requires some care when using it

Terraform tomap function requires the object to have the same schema otherwise it will give you the following error  │   on main.tf line 14, in resource "null_resource" "from_yaml_files": │   14:   for_each = tomap(local.yaml_data) │     ├──────────────── │     │ while calling tomap(v) │     │ local.yaml_data is object with 3 attributes │ │ Invalid value for "v" parameter: cannot convert object to map of any single type. Let's see what that looks like in yaml - if you're loading 3 files and all of them have the following - that's great! happy days. But if you have somehing that looks different  --- name : DisabledApp version : 0.5 enabled : false environment : development items :   - id : 1     type : test     name : test-service     port : 7000 different like this --- name : DisabledApp version : 0.5 enabled : false environment : development items :   - id : 1 ...

terraform working with for and for_each

terraform "for" is used for data transformation while for_each is used to create resource for_each  locals {   servers = {     "web-1" = { cpu = 2 }     "web-2" = { cpu = 4 }   } } resource "null_resource" "servers" {   for_each = local . servers   # Creates 2 resources   triggers = { cpu = each . value . cpu } } for loop usage can be seen here locals {   names = [ "alice" , "bob" , "charlie" ]     # Transform to uppercase (just data)   upper_names = [ for name in local . names : upper (name)]     # Create map (just data)   name_map = { for name in local . names : name => upper (name)}     # Filter (just data)   short_names = [ for name in local . names : name if length (name) < 5 ] } output "result" {   value = local . upper_names   # Just prints ["ALICE", "BOB", "CHARLIE"] } Both for_each and for can be used ...

vscode unable to resolve - openai.types.eval_create_params when package is already installed azure-ai-projects

Image
Bump into this error while trying to run my python code that requires some openai evaluation modules. from openai . types . evals . create_eval_jsonl_run_data_source_param import CreateEvalJSONLRunDataSourceParam , SourceFileID from openai . types . eval_create_params import DataSourceConfigCustom from azure . identity import DefaultAzureCredential from azure . ai . projects import AIProjectClient  Then when I checked my vscode python interpreter, I noticed that my setup wasn't quite right, I had to go back to my .venv folder and start up my vscode from there. Then it was able to resolve the python modules.